From 5bc83a25063330ab9177a291ab984c5c7052aa02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 7 Feb 2016 09:50:16 +0100 Subject: [PATCH] Update BGFX (nw) --- 3rdparty/bgfx/.appveyor.yml | 22 + 3rdparty/bgfx/.travis.yml | 22 + .../bgfx/3rdparty/dxsdk/include/d3dcommon.h | 2 + 3rdparty/bgfx/3rdparty/etc2/LICENSE.txt | 24 + 3rdparty/bgfx/3rdparty/etc2/Math.hpp | 90 + 3rdparty/bgfx/3rdparty/etc2/ProcessCommon.hpp | 51 + 3rdparty/bgfx/3rdparty/etc2/ProcessRGB.cpp | 719 ++++ 3rdparty/bgfx/3rdparty/etc2/ProcessRGB.hpp | 9 + 3rdparty/bgfx/3rdparty/etc2/Tables.cpp | 109 + 3rdparty/bgfx/3rdparty/etc2/Tables.hpp | 25 + 3rdparty/bgfx/3rdparty/etc2/Types.hpp | 17 + 3rdparty/bgfx/3rdparty/etc2/Vector.hpp | 222 ++ .../forsythtriangleorderoptimizer.cpp | 2 +- .../glsl-optimizer/src/glsl/glcpp/.gitignore | 2 - .../3rdparty/nvtt/nvcore/defsgnucdarwin.h | 2 +- .../bgfx/3rdparty/nvtt/nvcore/defsgnuclinux.h | 2 +- .../bgfx/3rdparty/nvtt/nvcore/defsgnucwin32.h | 2 +- .../bgfx/3rdparty/nvtt/nvcore/defsvcwin32.h | 2 +- 3rdparty/bgfx/3rdparty/nvtt/nvmath/nvmath.h | 5 + .../bgfx/3rdparty/ocornut-imgui/imgui.cpp | 230 +- 3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h | 132 +- .../3rdparty/ocornut-imgui/imgui_demo.cpp | 25 +- .../3rdparty/ocornut-imgui/imgui_draw.cpp | 49 +- .../3rdparty/ocornut-imgui/imgui_internal.h | 15 +- 3rdparty/bgfx/3rdparty/pvrtc/BitScale.h | 2 +- .../bgfx/3rdparty/remotery/lib/Remotery.c | 3 +- 3rdparty/bgfx/3rdparty/stb/stb_image.c | 1 + 3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h | 15 +- 3rdparty/bgfx/README.md | 18 +- .../examples/02-metaballs/fs_metaballs.bin.h | 51 +- .../examples/02-metaballs/vs_metaballs.bin.h | 36 +- 3rdparty/bgfx/examples/08-update/update.cpp | 10 +- 3rdparty/bgfx/examples/09-hdr/hdr.cpp | 4 +- 3rdparty/bgfx/examples/13-stencil/stencil.cpp | 4 +- .../14-shadowvolumes/shadowvolumes.cpp | 8 +- .../15-shadowmaps-simple/fs_sms_shadow_pd.sc | 6 +- .../shadowmaps_simple.cpp | 15 +- .../examples/16-shadowmaps/shadowmaps.cpp | 22 +- .../17-drawstress/fs_drawstress.bin.h | 14 +- .../17-drawstress/vs_drawstress.bin.h | 25 +- 3rdparty/bgfx/examples/27-terrain/terrain.cpp | 26 +- 3rdparty/bgfx/examples/common/aviwriter.h | 6 +- 3rdparty/bgfx/examples/common/bgfx_utils.cpp | 23 +- .../bgfx/examples/common/entry/entry_ios.mm | 10 +- 3rdparty/bgfx/examples/common/entry/entry_p.h | 2 +- .../bgfx/examples/common/entry/entry_sdl.cpp | 157 +- .../examples/common/entry/entry_windows.cpp | 2 +- .../bgfx/examples/common/entry/entry_x11.cpp | 35 + .../examples/common/font/fs_font_basic.bin.h | 47 +- .../common/font/fs_font_distance_field.bin.h | 84 +- .../fs_font_distance_field_subpixel.bin.h | 102 +- .../examples/common/font/vs_font_basic.bin.h | 27 +- .../common/font/vs_font_distance_field.bin.h | 27 +- .../vs_font_distance_field_subpixel.bin.h | 27 +- .../common/imgui/fs_imgui_color.bin.h | 14 +- .../common/imgui/fs_imgui_cubemap.bin.h | 26 +- .../common/imgui/fs_imgui_image.bin.h | 26 +- .../common/imgui/fs_imgui_image_swizz.bin.h | 28 +- .../common/imgui/fs_imgui_latlong.bin.h | 46 +- .../common/imgui/fs_imgui_texture.bin.h | 22 +- .../common/imgui/fs_ocornut_imgui.bin.h | 17 +- .../common/imgui/vs_imgui_color.bin.h | 26 +- .../common/imgui/vs_imgui_cubemap.bin.h | 25 +- .../common/imgui/vs_imgui_image.bin.h | 26 +- .../common/imgui/vs_imgui_latlong.bin.h | 25 +- .../common/imgui/vs_imgui_texture.bin.h | 30 +- .../common/imgui/vs_ocornut_imgui.bin.h | 33 +- .../common/nanovg/fs_nanovg_fill.bin.h | 132 +- .../examples/common/nanovg/nanovg_bgfx.cpp | 34 +- .../common/nanovg/vs_nanovg_fill.bin.h | 35 +- 3rdparty/bgfx/examples/common/shaderlib.sh | 30 +- .../examples/runtime/gamecontrollerdb.txt | 35 +- .../runtime/shaders/dx11/fs_particle.bin | Bin 603 -> 603 bytes .../dx11/fs_shadowmaps_color_lighting_esm.bin | Bin 3573 -> 3573 bytes .../fs_shadowmaps_color_lighting_esm_csm.bin | Bin 6510 -> 6534 bytes ...s_shadowmaps_color_lighting_esm_linear.bin | Bin 3545 -> 3545 bytes ...adowmaps_color_lighting_esm_linear_csm.bin | Bin 6398 -> 6422 bytes ...dowmaps_color_lighting_esm_linear_omni.bin | Bin 5203 -> 5203 bytes .../fs_shadowmaps_color_lighting_esm_omni.bin | Bin 5231 -> 5231 bytes .../fs_shadowmaps_color_lighting_hard.bin | Bin 3457 -> 3457 bytes .../fs_shadowmaps_color_lighting_hard_csm.bin | Bin 6046 -> 6070 bytes ..._shadowmaps_color_lighting_hard_linear.bin | Bin 3429 -> 3429 bytes ...dowmaps_color_lighting_hard_linear_csm.bin | Bin 5934 -> 5958 bytes ...owmaps_color_lighting_hard_linear_omni.bin | Bin 5087 -> 5087 bytes ...fs_shadowmaps_color_lighting_hard_omni.bin | Bin 5115 -> 5115 bytes .../dx11/fs_shadowmaps_color_lighting_pcf.bin | Bin 11918 -> 11918 bytes .../fs_shadowmaps_color_lighting_pcf_csm.bin | Bin 39963 -> 40071 bytes ...s_shadowmaps_color_lighting_pcf_linear.bin | Bin 10842 -> 10850 bytes ...adowmaps_color_lighting_pcf_linear_csm.bin | Bin 35579 -> 35715 bytes ...dowmaps_color_lighting_pcf_linear_omni.bin | Bin 12436 -> 12436 bytes .../fs_shadowmaps_color_lighting_pcf_omni.bin | Bin 13524 -> 13524 bytes .../dx11/fs_shadowmaps_color_lighting_vsm.bin | Bin 3749 -> 3717 bytes .../fs_shadowmaps_color_lighting_vsm_csm.bin | Bin 7214 -> 7206 bytes ...s_shadowmaps_color_lighting_vsm_linear.bin | Bin 3721 -> 3689 bytes ...adowmaps_color_lighting_vsm_linear_csm.bin | Bin 7102 -> 7094 bytes ...dowmaps_color_lighting_vsm_linear_omni.bin | Bin 5379 -> 5347 bytes .../fs_shadowmaps_color_lighting_vsm_omni.bin | Bin 5407 -> 5375 bytes .../runtime/shaders/dx11/fs_sms_mesh.bin | Bin 4815 -> 4239 bytes .../runtime/shaders/dx11/fs_sms_mesh_pd.bin | Bin 5631 -> 5631 bytes .../runtime/shaders/dx11/fs_sms_shadow_pd.bin | Bin 428 -> 477 bytes .../examples/runtime/shaders/dx9/fs_bump.bin | Bin 2274 -> 2278 bytes .../runtime/shaders/dx9/fs_callback.bin | Bin 553 -> 557 bytes .../examples/runtime/shaders/dx9/fs_cubes.bin | Bin 137 -> 141 bytes .../shaders/dx9/fs_deferred_combine.bin | Bin 618 -> 622 bytes .../runtime/shaders/dx9/fs_deferred_debug.bin | Bin 218 -> 222 bytes .../shaders/dx9/fs_deferred_debug_line.bin | Bin 137 -> 141 bytes .../runtime/shaders/dx9/fs_deferred_geom.bin | Bin 696 -> 700 bytes .../runtime/shaders/dx9/fs_deferred_light.bin | Bin 1088 -> 1092 bytes .../runtime/shaders/dx9/fs_hdr_blur.bin | Bin 618 -> 622 bytes .../runtime/shaders/dx9/fs_hdr_bright.bin | Bin 1656 -> 1664 bytes .../runtime/shaders/dx9/fs_hdr_lum.bin | Bin 1469 -> 1473 bytes .../runtime/shaders/dx9/fs_hdr_lumavg.bin | Bin 1793 -> 1797 bytes .../runtime/shaders/dx9/fs_hdr_mesh.bin | Bin 1433 -> 1381 bytes .../runtime/shaders/dx9/fs_hdr_skybox.bin | Bin 525 -> 529 bytes .../runtime/shaders/dx9/fs_hdr_tonemap.bin | Bin 1673 -> 1677 bytes .../runtime/shaders/dx9/fs_ibl_mesh.bin | Bin 1661 -> 1661 bytes .../runtime/shaders/dx9/fs_ibl_skybox.bin | Bin 556 -> 560 bytes .../runtime/shaders/dx9/fs_instancing.bin | Bin 137 -> 141 bytes .../examples/runtime/shaders/dx9/fs_mesh.bin | Bin 1278 -> 1206 bytes .../examples/runtime/shaders/dx9/fs_oit.bin | Bin 183 -> 187 bytes .../runtime/shaders/dx9/fs_oit_wb.bin | Bin 459 -> 463 bytes .../runtime/shaders/dx9/fs_oit_wb_blit.bin | Bin 429 -> 433 bytes .../shaders/dx9/fs_oit_wb_separate.bin | Bin 431 -> 435 bytes .../shaders/dx9/fs_oit_wb_separate_blit.bin | Bin 429 -> 433 bytes .../runtime/shaders/dx9/fs_particle.bin | Bin 404 -> 408 bytes .../runtime/shaders/dx9/fs_raymarching.bin | Bin 47438 -> 47442 bytes .../shaders/dx9/fs_shadowmaps_color_black.bin | Bin 149 -> 153 bytes .../dx9/fs_shadowmaps_color_lighting_esm.bin | Bin 2726 -> 2730 bytes .../fs_shadowmaps_color_lighting_esm_csm.bin | Bin 4507 -> 4511 bytes ...s_shadowmaps_color_lighting_esm_linear.bin | Bin 2722 -> 2726 bytes ...adowmaps_color_lighting_esm_linear_csm.bin | Bin 4471 -> 4475 bytes ...dowmaps_color_lighting_esm_linear_omni.bin | Bin 3772 -> 3776 bytes .../fs_shadowmaps_color_lighting_esm_omni.bin | Bin 3776 -> 3780 bytes .../dx9/fs_shadowmaps_color_lighting_hard.bin | Bin 2686 -> 2690 bytes .../fs_shadowmaps_color_lighting_hard_csm.bin | Bin 4375 -> 4379 bytes ..._shadowmaps_color_lighting_hard_linear.bin | Bin 2682 -> 2686 bytes ...dowmaps_color_lighting_hard_linear_csm.bin | Bin 4419 -> 4423 bytes ...owmaps_color_lighting_hard_linear_omni.bin | Bin 3744 -> 3748 bytes ...fs_shadowmaps_color_lighting_hard_omni.bin | Bin 3728 -> 3732 bytes .../dx9/fs_shadowmaps_color_lighting_pcf.bin | Bin 7591 -> 7591 bytes .../fs_shadowmaps_color_lighting_pcf_csm.bin | Bin 24496 -> 24496 bytes ...s_shadowmaps_color_lighting_pcf_linear.bin | Bin 7267 -> 7267 bytes ...adowmaps_color_lighting_pcf_linear_csm.bin | Bin 22316 -> 22316 bytes ...dowmaps_color_lighting_pcf_linear_omni.bin | Bin 7961 -> 7965 bytes .../fs_shadowmaps_color_lighting_pcf_omni.bin | Bin 8665 -> 8669 bytes .../dx9/fs_shadowmaps_color_lighting_vsm.bin | Bin 2806 -> 2810 bytes .../fs_shadowmaps_color_lighting_vsm_csm.bin | Bin 4891 -> 4895 bytes ...s_shadowmaps_color_lighting_vsm_linear.bin | Bin 2790 -> 2794 bytes ...adowmaps_color_lighting_vsm_linear_csm.bin | Bin 4827 -> 4831 bytes ...dowmaps_color_lighting_vsm_linear_omni.bin | Bin 3872 -> 3876 bytes .../fs_shadowmaps_color_lighting_vsm_omni.bin | Bin 3888 -> 3892 bytes .../dx9/fs_shadowmaps_color_texture.bin | Bin 572 -> 576 bytes .../shaders/dx9/fs_shadowmaps_hblur.bin | Bin 960 -> 964 bytes .../shaders/dx9/fs_shadowmaps_hblur_vsm.bin | Bin 1152 -> 1156 bytes .../shaders/dx9/fs_shadowmaps_packdepth.bin | Bin 269 -> 273 bytes .../dx9/fs_shadowmaps_packdepth_linear.bin | Bin 221 -> 225 bytes .../dx9/fs_shadowmaps_packdepth_vsm.bin | Bin 333 -> 337 bytes .../fs_shadowmaps_packdepth_vsm_linear.bin | Bin 261 -> 265 bytes .../shaders/dx9/fs_shadowmaps_texture.bin | Bin 218 -> 222 bytes .../shaders/dx9/fs_shadowmaps_unpackdepth.bin | Bin 380 -> 384 bytes .../dx9/fs_shadowmaps_unpackdepth_vsm.bin | Bin 384 -> 388 bytes .../shaders/dx9/fs_shadowmaps_vblur.bin | Bin 960 -> 964 bytes .../shaders/dx9/fs_shadowmaps_vblur_vsm.bin | Bin 1152 -> 1156 bytes .../dx9/fs_shadowvolume_color_lighting.bin | Bin 1910 -> 1914 bytes .../dx9/fs_shadowvolume_color_texture.bin | Bin 572 -> 576 bytes .../dx9/fs_shadowvolume_svbackblank.bin | Bin 149 -> 153 bytes .../dx9/fs_shadowvolume_svbackcolor.bin | Bin 227 -> 231 bytes .../dx9/fs_shadowvolume_svbacktex1.bin | Bin 201 -> 205 bytes .../dx9/fs_shadowvolume_svbacktex2.bin | Bin 201 -> 205 bytes .../dx9/fs_shadowvolume_svfrontblank.bin | Bin 149 -> 153 bytes .../dx9/fs_shadowvolume_svfrontcolor.bin | Bin 227 -> 231 bytes .../dx9/fs_shadowvolume_svfronttex1.bin | Bin 201 -> 205 bytes .../dx9/fs_shadowvolume_svfronttex2.bin | Bin 201 -> 205 bytes .../shaders/dx9/fs_shadowvolume_svside.bin | Bin 277 -> 281 bytes .../dx9/fs_shadowvolume_svsideblank.bin | Bin 149 -> 153 bytes .../dx9/fs_shadowvolume_svsidecolor.bin | Bin 227 -> 231 bytes .../shaders/dx9/fs_shadowvolume_svsidetex.bin | Bin 374 -> 378 bytes .../shaders/dx9/fs_shadowvolume_texture.bin | Bin 218 -> 222 bytes .../dx9/fs_shadowvolume_texture_lighting.bin | Bin 2061 -> 2065 bytes .../runtime/shaders/dx9/fs_sms_mesh.bin | Bin 2464 -> 2468 bytes .../runtime/shaders/dx9/fs_sms_mesh_pd.bin | Bin 3300 -> 3304 bytes .../runtime/shaders/dx9/fs_sms_shadow.bin | Bin 149 -> 153 bytes .../runtime/shaders/dx9/fs_sms_shadow_pd.bin | Bin 269 -> 354 bytes .../shaders/dx9/fs_stencil_color_black.bin | Bin 149 -> 153 bytes .../shaders/dx9/fs_stencil_color_lighting.bin | Bin 1976 -> 1980 bytes .../shaders/dx9/fs_stencil_color_texture.bin | Bin 572 -> 576 bytes .../shaders/dx9/fs_stencil_texture.bin | Bin 218 -> 222 bytes .../dx9/fs_stencil_texture_lighting.bin | Bin 2169 -> 2173 bytes .../examples/runtime/shaders/dx9/fs_tree.bin | Bin 1018 -> 1022 bytes .../runtime/shaders/dx9/fs_update.bin | Bin 217 -> 221 bytes .../runtime/shaders/dx9/fs_update_3d.bin | Bin 427 -> 431 bytes .../runtime/shaders/dx9/fs_update_cmp.bin | Bin 262 -> 266 bytes .../shaders/dx9/fs_vectordisplay_blit.bin | Bin 325 -> 329 bytes .../shaders/dx9/fs_vectordisplay_blur.bin | Bin 813 -> 817 bytes .../shaders/dx9/fs_vectordisplay_fb.bin | Bin 337 -> 341 bytes .../examples/runtime/shaders/dx9/vs_bump.bin | Bin 1089 -> 1093 bytes .../runtime/shaders/dx9/vs_bump_instanced.bin | Bin 1083 -> 1087 bytes .../runtime/shaders/dx9/vs_callback.bin | Bin 461 -> 465 bytes .../examples/runtime/shaders/dx9/vs_cubes.bin | Bin 319 -> 323 bytes .../shaders/dx9/vs_deferred_combine.bin | Bin 319 -> 323 bytes .../runtime/shaders/dx9/vs_deferred_debug.bin | Bin 319 -> 323 bytes .../shaders/dx9/vs_deferred_debug_line.bin | Bin 319 -> 323 bytes .../runtime/shaders/dx9/vs_deferred_geom.bin | Bin 1089 -> 1093 bytes .../runtime/shaders/dx9/vs_deferred_light.bin | Bin 319 -> 323 bytes .../runtime/shaders/dx9/vs_hdr_blur.bin | Bin 665 -> 669 bytes .../runtime/shaders/dx9/vs_hdr_bright.bin | Bin 319 -> 323 bytes .../runtime/shaders/dx9/vs_hdr_lum.bin | Bin 319 -> 323 bytes .../runtime/shaders/dx9/vs_hdr_lumavg.bin | Bin 319 -> 323 bytes .../runtime/shaders/dx9/vs_hdr_mesh.bin | Bin 577 -> 581 bytes .../runtime/shaders/dx9/vs_hdr_skybox.bin | Bin 319 -> 323 bytes .../runtime/shaders/dx9/vs_hdr_tonemap.bin | Bin 653 -> 657 bytes .../runtime/shaders/dx9/vs_ibl_mesh.bin | Bin 672 -> 676 bytes .../runtime/shaders/dx9/vs_ibl_skybox.bin | Bin 443 -> 447 bytes .../runtime/shaders/dx9/vs_instancing.bin | Bin 474 -> 478 bytes .../examples/runtime/shaders/dx9/vs_mesh.bin | Bin 982 -> 986 bytes .../examples/runtime/shaders/dx9/vs_oit.bin | Bin 553 -> 557 bytes .../runtime/shaders/dx9/vs_oit_blit.bin | Bin 319 -> 323 bytes .../runtime/shaders/dx9/vs_particle.bin | Bin 682 -> 686 bytes .../runtime/shaders/dx9/vs_raymarching.bin | Bin 355 -> 359 bytes .../shaders/dx9/vs_shadowmaps_color.bin | Bin 283 -> 287 bytes .../dx9/vs_shadowmaps_color_lighting.bin | Bin 802 -> 806 bytes .../dx9/vs_shadowmaps_color_lighting_csm.bin | Bin 1451 -> 1455 bytes .../vs_shadowmaps_color_lighting_linear.bin | Bin 818 -> 822 bytes ...s_shadowmaps_color_lighting_linear_csm.bin | Bin 1515 -> 1519 bytes ..._shadowmaps_color_lighting_linear_omni.bin | Bin 1462 -> 1466 bytes .../dx9/vs_shadowmaps_color_lighting_omni.bin | Bin 1398 -> 1402 bytes .../dx9/vs_shadowmaps_color_texture.bin | Bin 319 -> 323 bytes .../shaders/dx9/vs_shadowmaps_depth.bin | Bin 283 -> 287 bytes .../shaders/dx9/vs_shadowmaps_hblur.bin | Bin 754 -> 758 bytes .../shaders/dx9/vs_shadowmaps_packdepth.bin | Bin 319 -> 323 bytes .../dx9/vs_shadowmaps_packdepth_linear.bin | Bin 351 -> 355 bytes .../shaders/dx9/vs_shadowmaps_texture.bin | Bin 319 -> 323 bytes .../dx9/vs_shadowmaps_texture_lighting.bin | Bin 577 -> 581 bytes .../shaders/dx9/vs_shadowmaps_unpackdepth.bin | Bin 319 -> 323 bytes .../shaders/dx9/vs_shadowmaps_vblur.bin | Bin 754 -> 758 bytes .../dx9/vs_shadowvolume_color_lighting.bin | Bin 541 -> 545 bytes .../dx9/vs_shadowvolume_color_texture.bin | Bin 319 -> 323 bytes .../shaders/dx9/vs_shadowvolume_svback.bin | Bin 437 -> 441 bytes .../shaders/dx9/vs_shadowvolume_svfront.bin | Bin 283 -> 287 bytes .../shaders/dx9/vs_shadowvolume_svside.bin | Bin 545 -> 549 bytes .../shaders/dx9/vs_shadowvolume_texture.bin | Bin 319 -> 323 bytes .../dx9/vs_shadowvolume_texture_lighting.bin | Bin 577 -> 581 bytes .../runtime/shaders/dx9/vs_sms_mesh.bin | Bin 738 -> 742 bytes .../runtime/shaders/dx9/vs_sms_shadow.bin | Bin 283 -> 287 bytes .../runtime/shaders/dx9/vs_sms_shadow_pd.bin | Bin 319 -> 323 bytes .../runtime/shaders/dx9/vs_stencil_color.bin | Bin 283 -> 287 bytes .../shaders/dx9/vs_stencil_color_lighting.bin | Bin 541 -> 545 bytes .../shaders/dx9/vs_stencil_color_texture.bin | Bin 319 -> 323 bytes .../shaders/dx9/vs_stencil_texture.bin | Bin 319 -> 323 bytes .../dx9/vs_stencil_texture_lighting.bin | Bin 577 -> 581 bytes .../examples/runtime/shaders/dx9/vs_tree.bin | Bin 629 -> 633 bytes .../runtime/shaders/dx9/vs_update.bin | Bin 319 -> 323 bytes .../shaders/dx9/vs_vectordisplay_fb.bin | Bin 355 -> 359 bytes .../runtime/shaders/gles/fs_oit_wb.bin | Bin 373 -> 371 bytes .../shaders/gles/fs_oit_wb_separate.bin | Bin 320 -> 318 bytes .../gles/fs_shadowmaps_color_lighting_esm.bin | Bin 4213 -> 4207 bytes .../fs_shadowmaps_color_lighting_esm_csm.bin | Bin 10222 -> 10204 bytes ...s_shadowmaps_color_lighting_esm_linear.bin | Bin 4257 -> 4251 bytes ...adowmaps_color_lighting_esm_linear_csm.bin | Bin 10442 -> 10424 bytes ...dowmaps_color_lighting_esm_linear_omni.bin | Bin 7587 -> 7581 bytes .../fs_shadowmaps_color_lighting_esm_omni.bin | Bin 7541 -> 7535 bytes .../fs_shadowmaps_color_lighting_hard.bin | Bin 4085 -> 4079 bytes .../fs_shadowmaps_color_lighting_hard_csm.bin | Bin 9678 -> 9660 bytes ..._shadowmaps_color_lighting_hard_linear.bin | Bin 4117 -> 4111 bytes ...dowmaps_color_lighting_hard_linear_csm.bin | Bin 9814 -> 9796 bytes ...owmaps_color_lighting_hard_linear_omni.bin | Bin 7448 -> 7442 bytes ...fs_shadowmaps_color_lighting_hard_omni.bin | Bin 7414 -> 7408 bytes .../gles/fs_shadowmaps_color_lighting_pcf.bin | Bin 15736 -> 15670 bytes .../fs_shadowmaps_color_lighting_pcf_csm.bin | Bin 63472 -> 63214 bytes ...s_shadowmaps_color_lighting_pcf_linear.bin | Bin 15787 -> 15721 bytes ...adowmaps_color_lighting_pcf_linear_csm.bin | Bin 63918 -> 63660 bytes ...dowmaps_color_lighting_pcf_linear_omni.bin | Bin 19328 -> 19262 bytes .../fs_shadowmaps_color_lighting_pcf_omni.bin | Bin 19273 -> 19207 bytes .../gles/fs_shadowmaps_color_lighting_vsm.bin | Bin 4635 -> 4633 bytes .../fs_shadowmaps_color_lighting_vsm_csm.bin | Bin 12152 -> 12150 bytes ...s_shadowmaps_color_lighting_vsm_linear.bin | Bin 4679 -> 4677 bytes ...adowmaps_color_lighting_vsm_linear_csm.bin | Bin 12372 -> 12370 bytes ...dowmaps_color_lighting_vsm_linear_omni.bin | Bin 8011 -> 8009 bytes .../fs_shadowmaps_color_lighting_vsm_omni.bin | Bin 7965 -> 7963 bytes .../shaders/gles/fs_shadowmaps_hblur.bin | Bin 1746 -> 1708 bytes .../shaders/gles/fs_shadowmaps_packdepth.bin | Bin 302 -> 300 bytes .../gles/fs_shadowmaps_packdepth_linear.bin | Bin 254 -> 252 bytes .../gles/fs_shadowmaps_unpackdepth.bin | Bin 421 -> 417 bytes .../shaders/gles/fs_shadowmaps_vblur.bin | Bin 1746 -> 1708 bytes .../runtime/shaders/gles/fs_sms_mesh_pd.bin | Bin 8652 -> 8588 bytes .../runtime/shaders/gles/fs_sms_shadow_pd.bin | Bin 302 -> 398 bytes .../runtime/shaders/glsl/fs_oit_wb.bin | Bin 355 -> 353 bytes .../shaders/glsl/fs_oit_wb_separate.bin | Bin 302 -> 300 bytes .../glsl/fs_shadowmaps_color_lighting_esm.bin | Bin 3976 -> 3970 bytes .../fs_shadowmaps_color_lighting_esm_csm.bin | Bin 9840 -> 9822 bytes ...s_shadowmaps_color_lighting_esm_linear.bin | Bin 4020 -> 4014 bytes ...adowmaps_color_lighting_esm_linear_csm.bin | Bin 10060 -> 10042 bytes ...dowmaps_color_lighting_esm_linear_omni.bin | Bin 7231 -> 7225 bytes .../fs_shadowmaps_color_lighting_esm_omni.bin | Bin 7185 -> 7179 bytes .../fs_shadowmaps_color_lighting_hard.bin | Bin 3854 -> 3848 bytes .../fs_shadowmaps_color_lighting_hard_csm.bin | Bin 9320 -> 9302 bytes ..._shadowmaps_color_lighting_hard_linear.bin | Bin 3886 -> 3880 bytes ...dowmaps_color_lighting_hard_linear_csm.bin | Bin 9456 -> 9438 bytes ...owmaps_color_lighting_hard_linear_omni.bin | Bin 7098 -> 7092 bytes ...fs_shadowmaps_color_lighting_hard_omni.bin | Bin 7064 -> 7058 bytes .../glsl/fs_shadowmaps_color_lighting_pcf.bin | Bin 15123 -> 15057 bytes .../fs_shadowmaps_color_lighting_pcf_csm.bin | Bin 61633 -> 61375 bytes ...s_shadowmaps_color_lighting_pcf_linear.bin | Bin 15168 -> 15102 bytes ...adowmaps_color_lighting_pcf_linear_csm.bin | Bin 62055 -> 61797 bytes ...dowmaps_color_lighting_pcf_linear_omni.bin | Bin 18584 -> 18518 bytes .../fs_shadowmaps_color_lighting_pcf_omni.bin | Bin 18535 -> 18469 bytes .../glsl/fs_shadowmaps_color_lighting_vsm.bin | Bin 4373 -> 4371 bytes .../fs_shadowmaps_color_lighting_vsm_csm.bin | Bin 11670 -> 11668 bytes ...s_shadowmaps_color_lighting_vsm_linear.bin | Bin 4417 -> 4415 bytes ...adowmaps_color_lighting_vsm_linear_csm.bin | Bin 11890 -> 11888 bytes ...dowmaps_color_lighting_vsm_linear_omni.bin | Bin 7630 -> 7628 bytes .../fs_shadowmaps_color_lighting_vsm_omni.bin | Bin 7584 -> 7582 bytes .../shaders/glsl/fs_shadowmaps_hblur.bin | Bin 1619 -> 1581 bytes .../shaders/glsl/fs_shadowmaps_packdepth.bin | Bin 290 -> 288 bytes .../glsl/fs_shadowmaps_packdepth_linear.bin | Bin 242 -> 240 bytes .../glsl/fs_shadowmaps_unpackdepth.bin | Bin 356 -> 352 bytes .../shaders/glsl/fs_shadowmaps_vblur.bin | Bin 1619 -> 1581 bytes .../runtime/shaders/glsl/fs_sms_mesh_pd.bin | Bin 8286 -> 8222 bytes .../runtime/shaders/glsl/fs_sms_shadow_pd.bin | Bin 290 -> 380 bytes .../shaders/metal/fs_sms_shadow_pd.bin | Bin 623 -> 700 bytes 3rdparty/bgfx/include/bgfx/bgfxdefines.h | 4 +- 3rdparty/bgfx/include/bgfx/bgfxplatform.h | 77 +- 3rdparty/bgfx/include/bgfx/c99/bgfx.h | 135 - 3rdparty/bgfx/include/bgfx/c99/bgfxplatform.h | 157 +- 3rdparty/bgfx/makefile | 29 +- 3rdparty/bgfx/scripts/bgfx.lua | 2 +- 3rdparty/bgfx/scripts/genie.lua | 18 +- 3rdparty/bgfx/scripts/makedisttex.lua | 19 - 3rdparty/bgfx/scripts/shader.mk | 29 +- 3rdparty/bgfx/scripts/shaderc.lua | 6 +- 3rdparty/bgfx/scripts/texturec.lua | 4 + 3rdparty/bgfx/src/bgfx.cpp | 166 +- 3rdparty/bgfx/src/bgfx_p.h | 48 +- 3rdparty/bgfx/src/bgfx_shader.sh | 26 +- 3rdparty/bgfx/src/config.h | 37 +- 3rdparty/bgfx/src/glcontext_eagl.mm | 2 + 3rdparty/bgfx/src/glcontext_egl.cpp | 2 + 3rdparty/bgfx/src/glcontext_glx.cpp | 2 + 3rdparty/bgfx/src/glcontext_nsgl.mm | 2 + 3rdparty/bgfx/src/glcontext_ppapi.cpp | 2 + 3rdparty/bgfx/src/glcontext_wgl.cpp | 2 + 3rdparty/bgfx/src/glimports.h | 6 + 3rdparty/bgfx/src/image.cpp | 1228 ++++++- 3rdparty/bgfx/src/image.h | 31 +- 3rdparty/bgfx/src/renderer_d3d11.cpp | 66 +- 3rdparty/bgfx/src/renderer_d3d11.h | 1 + 3rdparty/bgfx/src/renderer_d3d12.cpp | 25 +- 3rdparty/bgfx/src/renderer_d3d9.cpp | 197 +- 3rdparty/bgfx/src/renderer_d3d9.h | 12 +- 3rdparty/bgfx/src/renderer_gl.cpp | 158 +- 3rdparty/bgfx/src/renderer_gl.h | 19 +- 3rdparty/bgfx/src/renderer_mtl.mm | 28 +- 3rdparty/bgfx/src/renderer_null.cpp | 9 + 3rdparty/bgfx/src/shader_dx9bc.cpp | 3 +- 3rdparty/bgfx/src/shader_dxbc.cpp | 3 +- 3rdparty/bgfx/tools/geometryc/geometryc.cpp | 6 +- 3rdparty/bgfx/tools/makedisttex.cpp | 195 - 3rdparty/bgfx/tools/shaderc/shaderc.cpp | 3157 +++++++++-------- 3rdparty/bgfx/tools/shaderc/shaderc.h | 126 +- 3rdparty/bgfx/tools/shaderc/shaderc_glsl.cpp | 376 +- 3rdparty/bgfx/tools/shaderc/shaderc_hlsl.cpp | 1285 ++++--- 3rdparty/bgfx/tools/texturec/texturec.cpp | 360 +- 3rdparty/bx/.appveyor.yml | 21 + 3rdparty/bx/.travis.yml | 20 + 3rdparty/bx/README.md | 3 + 3rdparty/bx/include/bx/bx.h | 27 + 3rdparty/bx/include/bx/config.h | 1 + 3rdparty/bx/include/bx/error.h | 111 + 3rdparty/bx/include/bx/fpumath.h | 18 +- 3rdparty/bx/include/bx/handlealloc.h | 2 +- 3rdparty/bx/include/bx/os.h | 15 +- 3rdparty/bx/include/bx/platform.h | 36 +- 3rdparty/bx/include/bx/readerwriter.h | 159 +- 3rdparty/bx/makefile | 5 + 3rdparty/bx/scripts/genie.lua | 8 +- 3rdparty/bx/scripts/toolchain.lua | 103 +- 3rdparty/bx/tools/bin/darwin/genie | Bin 422176 -> 422176 bytes 3rdparty/bx/tools/bin/linux/genie | Bin 396856 -> 396856 bytes 3rdparty/bx/tools/bin/windows/genie.exe | Bin 399872 -> 400384 bytes 3rdparty/bx/tools/bin2c/bin2c.cpp | 6 +- 380 files changed, 7709 insertions(+), 4085 deletions(-) create mode 100644 3rdparty/bgfx/.appveyor.yml create mode 100644 3rdparty/bgfx/.travis.yml create mode 100644 3rdparty/bgfx/3rdparty/etc2/LICENSE.txt create mode 100644 3rdparty/bgfx/3rdparty/etc2/Math.hpp create mode 100644 3rdparty/bgfx/3rdparty/etc2/ProcessCommon.hpp create mode 100644 3rdparty/bgfx/3rdparty/etc2/ProcessRGB.cpp create mode 100644 3rdparty/bgfx/3rdparty/etc2/ProcessRGB.hpp create mode 100644 3rdparty/bgfx/3rdparty/etc2/Tables.cpp create mode 100644 3rdparty/bgfx/3rdparty/etc2/Tables.hpp create mode 100644 3rdparty/bgfx/3rdparty/etc2/Types.hpp create mode 100644 3rdparty/bgfx/3rdparty/etc2/Vector.hpp delete mode 100644 3rdparty/bgfx/scripts/makedisttex.lua delete mode 100644 3rdparty/bgfx/tools/makedisttex.cpp create mode 100644 3rdparty/bx/.appveyor.yml create mode 100644 3rdparty/bx/.travis.yml create mode 100644 3rdparty/bx/include/bx/error.h diff --git a/3rdparty/bgfx/.appveyor.yml b/3rdparty/bgfx/.appveyor.yml new file mode 100644 index 00000000000..852cf22cf98 --- /dev/null +++ b/3rdparty/bgfx/.appveyor.yml @@ -0,0 +1,22 @@ +shallow_clone: true + +os: + - Visual Studio 2015 + +environment: + matrix: + - TOOLSET: vs2010 + - TOOLSET: vs2012 + - TOOLSET: vs2013 + - TOOLSET: vs2015 + +configuration: + - Debug + - Release + +install: + - git clone https://github.com/bkaradzic/bx ..\bx + - ..\bx\tools\bin\windows\genie --with-tools %TOOLSET% + +build: + project: .build/projects/$(TOOLSET)/bgfx.sln diff --git a/3rdparty/bgfx/.travis.yml b/3rdparty/bgfx/.travis.yml new file mode 100644 index 00000000000..8c081703032 --- /dev/null +++ b/3rdparty/bgfx/.travis.yml @@ -0,0 +1,22 @@ +language: cpp +matrix: + include: + - compiler: gcc + os: linux + - compiler: clang + os: osx + +before_script: + git clone https://github.com/bkaradzic/bx ../bx + +script: + make build + +branches: + only: + - master + +notifications: + email: false + +osx_image: xcode7.3 diff --git a/3rdparty/bgfx/3rdparty/dxsdk/include/d3dcommon.h b/3rdparty/bgfx/3rdparty/dxsdk/include/d3dcommon.h index 17e646e0773..7daa83b3604 100644 --- a/3rdparty/bgfx/3rdparty/dxsdk/include/d3dcommon.h +++ b/3rdparty/bgfx/3rdparty/dxsdk/include/d3dcommon.h @@ -42,6 +42,7 @@ #define VS2008_SAL_COMPAT // BK - SAL compatibility for VS2008 +#if _MSC_VER < 1600 #define DEFINE_ENUM_FLAG_OPERATORS(ENUMTYPE) \ extern "C++" { \ inline ENUMTYPE operator | (ENUMTYPE _a, ENUMTYPE _b) { return ENUMTYPE ( ( (int) _a) | ( (int)_b) ); } \ @@ -52,6 +53,7 @@ inline ENUMTYPE operator ^ (ENUMTYPE _a, ENUMTYPE _b) { return ENUMTYPE ( ( (int) _a) ^ ( (int)_b) ); } \ inline ENUMTYPE operator ^= (ENUMTYPE &_a, ENUMTYPE _b) { return (ENUMTYPE &)( ( (int &)_a) ^= ( (int)_b) ); } \ } +#endif // _MSC_VER < 1600 #undef _Out_ #define _Out_ diff --git a/3rdparty/bgfx/3rdparty/etc2/LICENSE.txt b/3rdparty/bgfx/3rdparty/etc2/LICENSE.txt new file mode 100644 index 00000000000..2254f9ece88 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/etc2/LICENSE.txt @@ -0,0 +1,24 @@ +Copyright (c) 2013, Bartosz Taudul +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/3rdparty/bgfx/3rdparty/etc2/Math.hpp b/3rdparty/bgfx/3rdparty/etc2/Math.hpp new file mode 100644 index 00000000000..3a92a2e7317 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/etc2/Math.hpp @@ -0,0 +1,90 @@ +#ifndef __DARKRL__MATH_HPP__ +#define __DARKRL__MATH_HPP__ + +#include +#include + +#include "Types.hpp" + +template +inline T AlignPOT( T val ) +{ + if( val == 0 ) return 1; + val--; + for( unsigned int i=1; i> i; + } + return val + 1; +} + +inline int CountSetBits( uint32 val ) +{ + val -= ( val >> 1 ) & 0x55555555; + val = ( ( val >> 2 ) & 0x33333333 ) + ( val & 0x33333333 ); + val = ( ( val >> 4 ) + val ) & 0x0f0f0f0f; + val += val >> 8; + val += val >> 16; + return val & 0x0000003f; +} + +inline int CountLeadingZeros( uint32 val ) +{ + val |= val >> 1; + val |= val >> 2; + val |= val >> 4; + val |= val >> 8; + val |= val >> 16; + return 32 - CountSetBits( val ); +} + +inline float sRGB2linear( float v ) +{ + const float a = 0.055f; + if( v <= 0.04045f ) + { + return v / 12.92f; + } + else + { + return powf( ( v + a ) / ( 1 + a ), 2.4f ); + } +} + +inline float linear2sRGB( float v ) +{ + const float a = 0.055f; + if( v <= 0.0031308f ) + { + return 12.92f * v; + } + else + { + return ( 1 + a ) * pow( v, 1/2.4f ) - a; + } +} + +template +inline T SmoothStep( T x ) +{ + return x*x*(3-2*x); +} + +inline uint8 clampu8( int32 val ) +{ + return std::min( std::max( 0, val ), 255 ); +} + +template +inline T sq( T val ) +{ + return val * val; +} + +static inline int mul8bit( int a, int b ) +{ + int t = a*b + 128; + return ( t + ( t >> 8 ) ) >> 8; +} + +#endif diff --git a/3rdparty/bgfx/3rdparty/etc2/ProcessCommon.hpp b/3rdparty/bgfx/3rdparty/etc2/ProcessCommon.hpp new file mode 100644 index 00000000000..7e6addbcdc2 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/etc2/ProcessCommon.hpp @@ -0,0 +1,51 @@ +#ifndef __PROCESSCOMMON_HPP__ +#define __PROCESSCOMMON_HPP__ + +#include +#include + +#include "Types.hpp" + +template +static size_t GetLeastError( const T* err, size_t num ) +{ + size_t idx = 0; + for( size_t i=1; i> 24 ) | + ( ( d & 0x000000FF00000000 ) << 24 ) | + ( ( d & 0x00FF000000000000 ) >> 8 ) | + ( ( d & 0x0000FF0000000000 ) << 8 ); +} + +template +static uint64 EncodeSelectors( uint64 d, const T terr[2][8], const S tsel[16][8], const uint32* id ) +{ + size_t tidx[2]; + tidx[0] = GetLeastError( terr[0], 8 ); + tidx[1] = GetLeastError( terr[1], 8 ); + + d |= tidx[0] << 26; + d |= tidx[1] << 29; + for( int i=0; i<16; i++ ) + { + uint64 t = tsel[i][tidx[id[i]%2]]; + d |= ( t & 0x1 ) << ( i + 32 ); + d |= ( t & 0x2 ) << ( i + 47 ); + } + + return d; +} + +#endif diff --git a/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.cpp b/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.cpp new file mode 100644 index 00000000000..de03845c838 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.cpp @@ -0,0 +1,719 @@ +#include + +#include "Math.hpp" +#include "ProcessCommon.hpp" +#include "ProcessRGB.hpp" +#include "Tables.hpp" +#include "Types.hpp" +#include "Vector.hpp" + +#include + +#ifdef __SSE4_1__ +# ifdef _MSC_VER +# include +# include +# else +# include +# endif +#endif + +namespace +{ + +typedef uint16 v4i[4]; + +void Average( const uint8* data, v4i* a ) +{ +#ifdef __SSE4_1__ + __m128i d0 = _mm_loadu_si128(((__m128i*)data) + 0); + __m128i d1 = _mm_loadu_si128(((__m128i*)data) + 1); + __m128i d2 = _mm_loadu_si128(((__m128i*)data) + 2); + __m128i d3 = _mm_loadu_si128(((__m128i*)data) + 3); + + __m128i d0l = _mm_unpacklo_epi8(d0, _mm_setzero_si128()); + __m128i d0h = _mm_unpackhi_epi8(d0, _mm_setzero_si128()); + __m128i d1l = _mm_unpacklo_epi8(d1, _mm_setzero_si128()); + __m128i d1h = _mm_unpackhi_epi8(d1, _mm_setzero_si128()); + __m128i d2l = _mm_unpacklo_epi8(d2, _mm_setzero_si128()); + __m128i d2h = _mm_unpackhi_epi8(d2, _mm_setzero_si128()); + __m128i d3l = _mm_unpacklo_epi8(d3, _mm_setzero_si128()); + __m128i d3h = _mm_unpackhi_epi8(d3, _mm_setzero_si128()); + + __m128i sum0 = _mm_add_epi16(d0l, d1l); + __m128i sum1 = _mm_add_epi16(d0h, d1h); + __m128i sum2 = _mm_add_epi16(d2l, d3l); + __m128i sum3 = _mm_add_epi16(d2h, d3h); + + __m128i sum0l = _mm_unpacklo_epi16(sum0, _mm_setzero_si128()); + __m128i sum0h = _mm_unpackhi_epi16(sum0, _mm_setzero_si128()); + __m128i sum1l = _mm_unpacklo_epi16(sum1, _mm_setzero_si128()); + __m128i sum1h = _mm_unpackhi_epi16(sum1, _mm_setzero_si128()); + __m128i sum2l = _mm_unpacklo_epi16(sum2, _mm_setzero_si128()); + __m128i sum2h = _mm_unpackhi_epi16(sum2, _mm_setzero_si128()); + __m128i sum3l = _mm_unpacklo_epi16(sum3, _mm_setzero_si128()); + __m128i sum3h = _mm_unpackhi_epi16(sum3, _mm_setzero_si128()); + + __m128i b0 = _mm_add_epi32(sum0l, sum0h); + __m128i b1 = _mm_add_epi32(sum1l, sum1h); + __m128i b2 = _mm_add_epi32(sum2l, sum2h); + __m128i b3 = _mm_add_epi32(sum3l, sum3h); + + __m128i a0 = _mm_srli_epi32(_mm_add_epi32(_mm_add_epi32(b2, b3), _mm_set1_epi32(4)), 3); + __m128i a1 = _mm_srli_epi32(_mm_add_epi32(_mm_add_epi32(b0, b1), _mm_set1_epi32(4)), 3); + __m128i a2 = _mm_srli_epi32(_mm_add_epi32(_mm_add_epi32(b1, b3), _mm_set1_epi32(4)), 3); + __m128i a3 = _mm_srli_epi32(_mm_add_epi32(_mm_add_epi32(b0, b2), _mm_set1_epi32(4)), 3); + + _mm_storeu_si128((__m128i*)&a[0], _mm_packus_epi32(_mm_shuffle_epi32(a0, _MM_SHUFFLE(3, 0, 1, 2)), _mm_shuffle_epi32(a1, _MM_SHUFFLE(3, 0, 1, 2)))); + _mm_storeu_si128((__m128i*)&a[2], _mm_packus_epi32(_mm_shuffle_epi32(a2, _MM_SHUFFLE(3, 0, 1, 2)), _mm_shuffle_epi32(a3, _MM_SHUFFLE(3, 0, 1, 2)))); +#else + uint32 r[4]; + uint32 g[4]; + uint32 b[4]; + + memset(r, 0, sizeof(r)); + memset(g, 0, sizeof(g)); + memset(b, 0, sizeof(b)); + + for( int j=0; j<4; j++ ) + { + for( int i=0; i<4; i++ ) + { + int index = (j & 2) + (i >> 1); + b[index] += *data++; + g[index] += *data++; + r[index] += *data++; + data++; + } + } + + a[0][0] = uint16( (r[2] + r[3] + 4) / 8 ); + a[0][1] = uint16( (g[2] + g[3] + 4) / 8 ); + a[0][2] = uint16( (b[2] + b[3] + 4) / 8 ); + a[0][3] = 0; + a[1][0] = uint16( (r[0] + r[1] + 4) / 8 ); + a[1][1] = uint16( (g[0] + g[1] + 4) / 8 ); + a[1][2] = uint16( (b[0] + b[1] + 4) / 8 ); + a[1][3] = 0; + a[2][0] = uint16( (r[1] + r[3] + 4) / 8 ); + a[2][1] = uint16( (g[1] + g[3] + 4) / 8 ); + a[2][2] = uint16( (b[1] + b[3] + 4) / 8 ); + a[2][3] = 0; + a[3][0] = uint16( (r[0] + r[2] + 4) / 8 ); + a[3][1] = uint16( (g[0] + g[2] + 4) / 8 ); + a[3][2] = uint16( (b[0] + b[2] + 4) / 8 ); + a[3][3] = 0; +#endif +} + +void CalcErrorBlock( const uint8* data, uint err[4][4] ) +{ +#ifdef __SSE4_1__ + __m128i d0 = _mm_loadu_si128(((__m128i*)data) + 0); + __m128i d1 = _mm_loadu_si128(((__m128i*)data) + 1); + __m128i d2 = _mm_loadu_si128(((__m128i*)data) + 2); + __m128i d3 = _mm_loadu_si128(((__m128i*)data) + 3); + + __m128i dm0 = _mm_and_si128(d0, _mm_set1_epi32(0x00FFFFFF)); + __m128i dm1 = _mm_and_si128(d1, _mm_set1_epi32(0x00FFFFFF)); + __m128i dm2 = _mm_and_si128(d2, _mm_set1_epi32(0x00FFFFFF)); + __m128i dm3 = _mm_and_si128(d3, _mm_set1_epi32(0x00FFFFFF)); + + __m128i d0l = _mm_unpacklo_epi8(dm0, _mm_setzero_si128()); + __m128i d0h = _mm_unpackhi_epi8(dm0, _mm_setzero_si128()); + __m128i d1l = _mm_unpacklo_epi8(dm1, _mm_setzero_si128()); + __m128i d1h = _mm_unpackhi_epi8(dm1, _mm_setzero_si128()); + __m128i d2l = _mm_unpacklo_epi8(dm2, _mm_setzero_si128()); + __m128i d2h = _mm_unpackhi_epi8(dm2, _mm_setzero_si128()); + __m128i d3l = _mm_unpacklo_epi8(dm3, _mm_setzero_si128()); + __m128i d3h = _mm_unpackhi_epi8(dm3, _mm_setzero_si128()); + + __m128i sum0 = _mm_add_epi16(d0l, d1l); + __m128i sum1 = _mm_add_epi16(d0h, d1h); + __m128i sum2 = _mm_add_epi16(d2l, d3l); + __m128i sum3 = _mm_add_epi16(d2h, d3h); + + __m128i sum0l = _mm_unpacklo_epi16(sum0, _mm_setzero_si128()); + __m128i sum0h = _mm_unpackhi_epi16(sum0, _mm_setzero_si128()); + __m128i sum1l = _mm_unpacklo_epi16(sum1, _mm_setzero_si128()); + __m128i sum1h = _mm_unpackhi_epi16(sum1, _mm_setzero_si128()); + __m128i sum2l = _mm_unpacklo_epi16(sum2, _mm_setzero_si128()); + __m128i sum2h = _mm_unpackhi_epi16(sum2, _mm_setzero_si128()); + __m128i sum3l = _mm_unpacklo_epi16(sum3, _mm_setzero_si128()); + __m128i sum3h = _mm_unpackhi_epi16(sum3, _mm_setzero_si128()); + + __m128i b0 = _mm_add_epi32(sum0l, sum0h); + __m128i b1 = _mm_add_epi32(sum1l, sum1h); + __m128i b2 = _mm_add_epi32(sum2l, sum2h); + __m128i b3 = _mm_add_epi32(sum3l, sum3h); + + __m128i a0 = _mm_add_epi32(b2, b3); + __m128i a1 = _mm_add_epi32(b0, b1); + __m128i a2 = _mm_add_epi32(b1, b3); + __m128i a3 = _mm_add_epi32(b0, b2); + + _mm_storeu_si128((__m128i*)&err[0], a0); + _mm_storeu_si128((__m128i*)&err[1], a1); + _mm_storeu_si128((__m128i*)&err[2], a2); + _mm_storeu_si128((__m128i*)&err[3], a3); +#else + uint terr[4][4]; + + memset(terr, 0, 16 * sizeof(uint)); + + for( int j=0; j<4; j++ ) + { + for( int i=0; i<4; i++ ) + { + int index = (j & 2) + (i >> 1); + uint d = *data++; + terr[index][0] += d; + d = *data++; + terr[index][1] += d; + d = *data++; + terr[index][2] += d; + data++; + } + } + + for( int i=0; i<3; i++ ) + { + err[0][i] = terr[2][i] + terr[3][i]; + err[1][i] = terr[0][i] + terr[1][i]; + err[2][i] = terr[1][i] + terr[3][i]; + err[3][i] = terr[0][i] + terr[2][i]; + } + for( int i=0; i<4; i++ ) + { + err[i][3] = 0; + } +#endif +} + +uint CalcError( const uint block[4], const v4i& average ) +{ + uint err = 0x3FFFFFFF; // Big value to prevent negative values, but small enough to prevent overflow + err -= block[0] * 2 * average[2]; + err -= block[1] * 2 * average[1]; + err -= block[2] * 2 * average[0]; + err += 8 * ( sq( average[0] ) + sq( average[1] ) + sq( average[2] ) ); + return err; +} + +void ProcessAverages( v4i* a ) +{ +#ifdef __SSE4_1__ + for( int i=0; i<2; i++ ) + { + __m128i d = _mm_loadu_si128((__m128i*)a[i*2].data()); + + __m128i t = _mm_add_epi16(_mm_mullo_epi16(d, _mm_set1_epi16(31)), _mm_set1_epi16(128)); + + __m128i c = _mm_srli_epi16(_mm_add_epi16(t, _mm_srli_epi16(t, 8)), 8); + + __m128i c1 = _mm_shuffle_epi32(c, _MM_SHUFFLE(3, 2, 3, 2)); + __m128i diff = _mm_sub_epi16(c, c1); + diff = _mm_max_epi16(diff, _mm_set1_epi16(-4)); + diff = _mm_min_epi16(diff, _mm_set1_epi16(3)); + + __m128i co = _mm_add_epi16(c1, diff); + + c = _mm_blend_epi16(co, c, 0xF0); + + __m128i a0 = _mm_or_si128(_mm_slli_epi16(c, 3), _mm_srli_epi16(c, 2)); + + _mm_storeu_si128((__m128i*)a[4+i*2].data(), a0); + } + + for( int i=0; i<2; i++ ) + { + __m128i d = _mm_loadu_si128((__m128i*)a[i*2].data()); + + __m128i t0 = _mm_add_epi16(_mm_mullo_epi16(d, _mm_set1_epi16(15)), _mm_set1_epi16(128)); + __m128i t1 = _mm_srli_epi16(_mm_add_epi16(t0, _mm_srli_epi16(t0, 8)), 8); + + __m128i t2 = _mm_or_si128(t1, _mm_slli_epi16(t1, 4)); + + _mm_storeu_si128((__m128i*)a[i*2].data(), t2); + } +#else + for( int i=0; i<2; i++ ) + { + for( int j=0; j<3; j++ ) + { + int32 c1 = mul8bit( a[i*2+1][j], 31 ); + int32 c2 = mul8bit( a[i*2][j], 31 ); + + int32 diff = c2 - c1; + if( diff > 3 ) diff = 3; + else if( diff < -4 ) diff = -4; + + int32 co = c1 + diff; + + a[5+i*2][j] = ( c1 << 3 ) | ( c1 >> 2 ); + a[4+i*2][j] = ( co << 3 ) | ( co >> 2 ); + } + } + + for( int i=0; i<4; i++ ) + { + a[i][0] = g_avg2[mul8bit( a[i][0], 15 )]; + a[i][1] = g_avg2[mul8bit( a[i][1], 15 )]; + a[i][2] = g_avg2[mul8bit( a[i][2], 15 )]; + } +#endif +} + +void EncodeAverages( uint64& _d, const v4i* a, size_t idx ) +{ + uint64 d = _d; + d |= ( idx << 24 ); + size_t base = idx << 1; + + if( ( idx & 0x2 ) == 0 ) + { + for( int i=0; i<3; i++ ) + { + d |= uint64( a[base+0][i] >> 4 ) << ( i*8 ); + d |= uint64( a[base+1][i] >> 4 ) << ( i*8 + 4 ); + } + } + else + { + for( int i=0; i<3; i++ ) + { + d |= uint64( a[base+1][i] & 0xF8 ) << ( i*8 ); + int32 c = ( ( a[base+0][i] & 0xF8 ) - ( a[base+1][i] & 0xF8 ) ) >> 3; + c &= ~0xFFFFFFF8; + d |= ((uint64)c) << ( i*8 ); + } + } + _d = d; +} + +uint64 CheckSolid( const uint8* src ) +{ +#ifdef __SSE4_1__ + __m128i d0 = _mm_loadu_si128(((__m128i*)src) + 0); + __m128i d1 = _mm_loadu_si128(((__m128i*)src) + 1); + __m128i d2 = _mm_loadu_si128(((__m128i*)src) + 2); + __m128i d3 = _mm_loadu_si128(((__m128i*)src) + 3); + + __m128i c = _mm_shuffle_epi32(d0, _MM_SHUFFLE(0, 0, 0, 0)); + + __m128i c0 = _mm_cmpeq_epi8(d0, c); + __m128i c1 = _mm_cmpeq_epi8(d1, c); + __m128i c2 = _mm_cmpeq_epi8(d2, c); + __m128i c3 = _mm_cmpeq_epi8(d3, c); + + __m128i m0 = _mm_and_si128(c0, c1); + __m128i m1 = _mm_and_si128(c2, c3); + __m128i m = _mm_and_si128(m0, m1); + + if (!_mm_testc_si128(m, _mm_set1_epi32(-1))) + { + return 0; + } +#else + const uint8* ptr = src + 4; + for( int i=1; i<16; i++ ) + { + if( memcmp( src, ptr, 4 ) != 0 ) + { + return 0; + } + ptr += 4; + } +#endif + return 0x02000000 | + ( uint( src[0] & 0xF8 ) << 16 ) | + ( uint( src[1] & 0xF8 ) << 8 ) | + ( uint( src[2] & 0xF8 ) ); +} + +void PrepareAverages( v4i a[8], const uint8* src, uint err[4] ) +{ + Average( src, a ); + ProcessAverages( a ); + + uint errblock[4][4]; + CalcErrorBlock( src, errblock ); + + for( int i=0; i<4; i++ ) + { + err[i/2] += CalcError( errblock[i], a[i] ); + err[2+i/2] += CalcError( errblock[i], a[i+4] ); + } +} + +void FindBestFit( uint64 terr[2][8], uint16 tsel[16][8], v4i a[8], const uint32* id, const uint8* data ) +{ + for( size_t i=0; i<16; i++ ) + { + uint16* sel = tsel[i]; + uint bid = id[i]; + uint64* ter = terr[bid%2]; + + uint8 b = *data++; + uint8 g = *data++; + uint8 r = *data++; + data++; + + int dr = a[bid][0] - r; + int dg = a[bid][1] - g; + int db = a[bid][2] - b; + +#ifdef __SSE4_1__ + // Reference implementation + + __m128i pix = _mm_set1_epi32(dr * 77 + dg * 151 + db * 28); + // Taking the absolute value is way faster. The values are only used to sort, so the result will be the same. + __m128i error0 = _mm_abs_epi32(_mm_add_epi32(pix, g_table256_SIMD[0])); + __m128i error1 = _mm_abs_epi32(_mm_add_epi32(pix, g_table256_SIMD[1])); + __m128i error2 = _mm_abs_epi32(_mm_sub_epi32(pix, g_table256_SIMD[0])); + __m128i error3 = _mm_abs_epi32(_mm_sub_epi32(pix, g_table256_SIMD[1])); + + __m128i index0 = _mm_and_si128(_mm_cmplt_epi32(error1, error0), _mm_set1_epi32(1)); + __m128i minError0 = _mm_min_epi32(error0, error1); + + __m128i index1 = _mm_sub_epi32(_mm_set1_epi32(2), _mm_cmplt_epi32(error3, error2)); + __m128i minError1 = _mm_min_epi32(error2, error3); + + __m128i minIndex0 = _mm_blendv_epi8(index0, index1, _mm_cmplt_epi32(minError1, minError0)); + __m128i minError = _mm_min_epi32(minError0, minError1); + + // Squaring the minimum error to produce correct values when adding + __m128i minErrorLow = _mm_shuffle_epi32(minError, _MM_SHUFFLE(1, 1, 0, 0)); + __m128i squareErrorLow = _mm_mul_epi32(minErrorLow, minErrorLow); + squareErrorLow = _mm_add_epi64(squareErrorLow, _mm_loadu_si128(((__m128i*)ter) + 0)); + _mm_storeu_si128(((__m128i*)ter) + 0, squareErrorLow); + __m128i minErrorHigh = _mm_shuffle_epi32(minError, _MM_SHUFFLE(3, 3, 2, 2)); + __m128i squareErrorHigh = _mm_mul_epi32(minErrorHigh, minErrorHigh); + squareErrorHigh = _mm_add_epi64(squareErrorHigh, _mm_loadu_si128(((__m128i*)ter) + 1)); + _mm_storeu_si128(((__m128i*)ter) + 1, squareErrorHigh); + + // Taking the absolute value is way faster. The values are only used to sort, so the result will be the same. + error0 = _mm_abs_epi32(_mm_add_epi32(pix, g_table256_SIMD[2])); + error1 = _mm_abs_epi32(_mm_add_epi32(pix, g_table256_SIMD[3])); + error2 = _mm_abs_epi32(_mm_sub_epi32(pix, g_table256_SIMD[2])); + error3 = _mm_abs_epi32(_mm_sub_epi32(pix, g_table256_SIMD[3])); + + index0 = _mm_and_si128(_mm_cmplt_epi32(error1, error0), _mm_set1_epi32(1)); + minError0 = _mm_min_epi32(error0, error1); + + index1 = _mm_sub_epi32(_mm_set1_epi32(2), _mm_cmplt_epi32(error3, error2)); + minError1 = _mm_min_epi32(error2, error3); + + __m128i minIndex1 = _mm_blendv_epi8(index0, index1, _mm_cmplt_epi32(minError1, minError0)); + minError = _mm_min_epi32(minError0, minError1); + + // Squaring the minimum error to produce correct values when adding + minErrorLow = _mm_shuffle_epi32(minError, _MM_SHUFFLE(1, 1, 0, 0)); + squareErrorLow = _mm_mul_epi32(minErrorLow, minErrorLow); + squareErrorLow = _mm_add_epi64(squareErrorLow, _mm_loadu_si128(((__m128i*)ter) + 2)); + _mm_storeu_si128(((__m128i*)ter) + 2, squareErrorLow); + minErrorHigh = _mm_shuffle_epi32(minError, _MM_SHUFFLE(3, 3, 2, 2)); + squareErrorHigh = _mm_mul_epi32(minErrorHigh, minErrorHigh); + squareErrorHigh = _mm_add_epi64(squareErrorHigh, _mm_loadu_si128(((__m128i*)ter) + 3)); + _mm_storeu_si128(((__m128i*)ter) + 3, squareErrorHigh); + __m128i minIndex = _mm_packs_epi32(minIndex0, minIndex1); + _mm_storeu_si128((__m128i*)sel, minIndex); +#else + int pix = dr * 77 + dg * 151 + db * 28; + + for( int t=0; t<8; t++ ) + { + const int64* tab = g_table256[t]; + uint idx = 0; + uint64 err = sq( tab[0] + pix ); + for( int j=1; j<4; j++ ) + { + uint64 local = sq( tab[j] + pix ); + if( local < err ) + { + err = local; + idx = j; + } + } + *sel++ = idx; + *ter++ += err; + } +#endif + } +} + +#ifdef __SSE4_1__ +// Non-reference implementation, but faster. Produces same results as the AVX2 version +void FindBestFit( uint32 terr[2][8], uint16 tsel[16][8], v4i a[8], const uint32* id, const uint8* data ) +{ + for( size_t i=0; i<16; i++ ) + { + uint16* sel = tsel[i]; + uint bid = id[i]; + uint32* ter = terr[bid%2]; + + uint8 b = *data++; + uint8 g = *data++; + uint8 r = *data++; + data++; + + int dr = a[bid][0] - r; + int dg = a[bid][1] - g; + int db = a[bid][2] - b; + + // The scaling values are divided by two and rounded, to allow the differences to be in the range of signed int16 + // This produces slightly different results, but is significant faster + __m128i pixel = _mm_set1_epi16(dr * 38 + dg * 76 + db * 14); + __m128i pix = _mm_abs_epi16(pixel); + + // Taking the absolute value is way faster. The values are only used to sort, so the result will be the same. + // Since the selector table is symmetrical, we need to calculate the difference only for half of the entries. + __m128i error0 = _mm_abs_epi16(_mm_sub_epi16(pix, g_table128_SIMD[0])); + __m128i error1 = _mm_abs_epi16(_mm_sub_epi16(pix, g_table128_SIMD[1])); + + __m128i index = _mm_and_si128(_mm_cmplt_epi16(error1, error0), _mm_set1_epi16(1)); + __m128i minError = _mm_min_epi16(error0, error1); + + // Exploiting symmetry of the selector table and use the sign bit + // This produces slightly different results, but is needed to produce same results as AVX2 implementation + __m128i indexBit = _mm_andnot_si128(_mm_srli_epi16(pixel, 15), _mm_set1_epi8(-1)); + __m128i minIndex = _mm_or_si128(index, _mm_add_epi16(indexBit, indexBit)); + + // Squaring the minimum error to produce correct values when adding + __m128i squareErrorLo = _mm_mullo_epi16(minError, minError); + __m128i squareErrorHi = _mm_mulhi_epi16(minError, minError); + + __m128i squareErrorLow = _mm_unpacklo_epi16(squareErrorLo, squareErrorHi); + __m128i squareErrorHigh = _mm_unpackhi_epi16(squareErrorLo, squareErrorHi); + + squareErrorLow = _mm_add_epi32(squareErrorLow, _mm_loadu_si128(((__m128i*)ter) + 0)); + _mm_storeu_si128(((__m128i*)ter) + 0, squareErrorLow); + squareErrorHigh = _mm_add_epi32(squareErrorHigh, _mm_loadu_si128(((__m128i*)ter) + 1)); + _mm_storeu_si128(((__m128i*)ter) + 1, squareErrorHigh); + + _mm_storeu_si128((__m128i*)sel, minIndex); + } +} +#endif + +uint8_t convert6(float f) +{ + int i = (std::min(std::max(static_cast(f), 0), 1023) - 15) >> 1; + return (i + 11 - ((i + 11) >> 7) - ((i + 4) >> 7)) >> 3; +} + +uint8_t convert7(float f) +{ + int i = (std::min(std::max(static_cast(f), 0), 1023) - 15) >> 1; + return (i + 9 - ((i + 9) >> 8) - ((i + 6) >> 8)) >> 2; +} + +std::pair Planar(const uint8* src) +{ + int32 r = 0; + int32 g = 0; + int32 b = 0; + + for (int i = 0; i < 16; ++i) + { + b += src[i * 4 + 0]; + g += src[i * 4 + 1]; + r += src[i * 4 + 2]; + } + + int32 difRyz = 0; + int32 difGyz = 0; + int32 difByz = 0; + int32 difRxz = 0; + int32 difGxz = 0; + int32 difBxz = 0; + + const int32 scaling[] = { -255, -85, 85, 255 }; + + for (int i = 0; i < 16; ++i) + { + int32 difB = (static_cast(src[i * 4 + 0]) << 4) - b; + int32 difG = (static_cast(src[i * 4 + 1]) << 4) - g; + int32 difR = (static_cast(src[i * 4 + 2]) << 4) - r; + + difRyz += difR * scaling[i % 4]; + difGyz += difG * scaling[i % 4]; + difByz += difB * scaling[i % 4]; + + difRxz += difR * scaling[i / 4]; + difGxz += difG * scaling[i / 4]; + difBxz += difB * scaling[i / 4]; + } + + const float scale = -4.0f / ((255 * 255 * 8.0f + 85 * 85 * 8.0f) * 16.0f); + + float aR = difRxz * scale; + float aG = difGxz * scale; + float aB = difBxz * scale; + + float bR = difRyz * scale; + float bG = difGyz * scale; + float bB = difByz * scale; + + float dR = r * (4.0f / 16.0f); + float dG = g * (4.0f / 16.0f); + float dB = b * (4.0f / 16.0f); + + // calculating the three colors RGBO, RGBH, and RGBV. RGB = df - af * x - bf * y; + float cofR = (aR * 255.0f + (bR * 255.0f + dR)); + float cofG = (aG * 255.0f + (bG * 255.0f + dG)); + float cofB = (aB * 255.0f + (bB * 255.0f + dB)); + float chfR = (aR * -425.0f + (bR * 255.0f + dR)); + float chfG = (aG * -425.0f + (bG * 255.0f + dG)); + float chfB = (aB * -425.0f + (bB * 255.0f + dB)); + float cvfR = (aR * 255.0f + (bR * -425.0f + dR)); + float cvfG = (aG * 255.0f + (bG * -425.0f + dG)); + float cvfB = (aB * 255.0f + (bB * -425.0f + dB)); + + // convert to r6g7b6 + int32 coR = convert6(cofR); + int32 coG = convert7(cofG); + int32 coB = convert6(cofB); + int32 chR = convert6(chfR); + int32 chG = convert7(chfG); + int32 chB = convert6(chfB); + int32 cvR = convert6(cvfR); + int32 cvG = convert7(cvfG); + int32 cvB = convert6(cvfB); + + // Error calculation + int32 ro0 = coR; + int32 go0 = coG; + int32 bo0 = coB; + int32 ro1 = (ro0 >> 4) | (ro0 << 2); + int32 go1 = (go0 >> 6) | (go0 << 1); + int32 bo1 = (bo0 >> 4) | (bo0 << 2); + int32 ro2 = (ro1 << 2) + 2; + int32 go2 = (go1 << 2) + 2; + int32 bo2 = (bo1 << 2) + 2; + + int32 rh0 = chR; + int32 gh0 = chG; + int32 bh0 = chB; + int32 rh1 = (rh0 >> 4) | (rh0 << 2); + int32 gh1 = (gh0 >> 6) | (gh0 << 1); + int32 bh1 = (bh0 >> 4) | (bh0 << 2); + + int32 rh2 = rh1 - ro1; + int32 gh2 = gh1 - go1; + int32 bh2 = bh1 - bo1; + + int32 rv0 = cvR; + int32 gv0 = cvG; + int32 bv0 = cvB; + int32 rv1 = (rv0 >> 4) | (rv0 << 2); + int32 gv1 = (gv0 >> 6) | (gv0 << 1); + int32 bv1 = (bv0 >> 4) | (bv0 << 2); + + int32 rv2 = rv1 - ro1; + int32 gv2 = gv1 - go1; + int32 bv2 = bv1 - bo1; + + uint64 error = 0; + + for (int i = 0; i < 16; ++i) + { + int32 cR = clampu8((rh2 * (i / 4) + rv2 * (i % 4) + ro2) >> 2); + int32 cG = clampu8((gh2 * (i / 4) + gv2 * (i % 4) + go2) >> 2); + int32 cB = clampu8((bh2 * (i / 4) + bv2 * (i % 4) + bo2) >> 2); + + int32 difB = static_cast(src[i * 4 + 0]) - cB; + int32 difG = static_cast(src[i * 4 + 1]) - cG; + int32 difR = static_cast(src[i * 4 + 2]) - cR; + + int32 dif = difR * 38 + difG * 76 + difB * 14; + + error += dif * dif; + } + + /**/ + uint32 rgbv = cvB | (cvG << 6) | (cvR << 13); + uint32 rgbh = chB | (chG << 6) | (chR << 13); + uint32 hi = rgbv | ((rgbh & 0x1FFF) << 19); + uint32 lo = (chR & 0x1) | 0x2 | ((chR << 1) & 0x7C); + lo |= ((coB & 0x07) << 7) | ((coB & 0x18) << 8) | ((coB & 0x20) << 11); + lo |= ((coG & 0x3F) << 17) | ((coG & 0x40) << 18); + lo |= coR << 25; + + const int32 idx = (coR & 0x20) | ((coG & 0x20) >> 1) | ((coB & 0x1E) >> 1); + + lo |= g_flags[idx]; + + uint64 result = static_cast(bx::endianSwap(lo)); + result |= static_cast(static_cast(bx::endianSwap(hi))) << 32; + + return std::make_pair(result, error); +} + +template +uint64 EncodeSelectors( uint64 d, const T terr[2][8], const S tsel[16][8], const uint32* id, const uint64 value, const uint64 error) +{ + size_t tidx[2]; + tidx[0] = GetLeastError( terr[0], 8 ); + tidx[1] = GetLeastError( terr[1], 8 ); + + if ((terr[0][tidx[0]] + terr[1][tidx[1]]) >= error) + { + return value; + } + + d |= tidx[0] << 26; + d |= tidx[1] << 29; + for( int i=0; i<16; i++ ) + { + uint64 t = tsel[i][tidx[id[i]%2]]; + d |= ( t & 0x1 ) << ( i + 32 ); + d |= ( t & 0x2 ) << ( i + 47 ); + } + + return FixByteOrder(d); +} +} + +uint64 ProcessRGB( const uint8* src ) +{ + uint64 d = CheckSolid( src ); + if( d != 0 ) return d; + + v4i a[8]; + uint err[4] = {}; + PrepareAverages( a, src, err ); + size_t idx = GetLeastError( err, 4 ); + EncodeAverages( d, a, idx ); + +#if defined __SSE4_1__ && !defined REFERENCE_IMPLEMENTATION + uint32 terr[2][8] = {}; +#else + uint64 terr[2][8] = {}; +#endif + uint16 tsel[16][8]; + const uint32* id = g_id[idx]; + FindBestFit( terr, tsel, a, id, src ); + + return FixByteOrder( EncodeSelectors( d, terr, tsel, id ) ); +} + +uint64 ProcessRGB_ETC2( const uint8* src ) +{ + std::pair result = Planar( src ); + + uint64 d = 0; + + v4i a[8]; + uint err[4] = {}; + PrepareAverages( a, src, err ); + size_t idx = GetLeastError( err, 4 ); + EncodeAverages( d, a, idx ); + + uint64 terr[2][8] = {}; + uint16 tsel[16][8]; + const uint32* id = g_id[idx]; + FindBestFit( terr, tsel, a, id, src ); + + return EncodeSelectors( d, terr, tsel, id, result.first, result.second ); +} diff --git a/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.hpp b/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.hpp new file mode 100644 index 00000000000..21434a3b267 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/etc2/ProcessRGB.hpp @@ -0,0 +1,9 @@ +#ifndef __PROCESSRGB_HPP__ +#define __PROCESSRGB_HPP__ + +#include "Types.hpp" + +uint64 ProcessRGB( const uint8* src ); +uint64 ProcessRGB_ETC2( const uint8* src ); + +#endif diff --git a/3rdparty/bgfx/3rdparty/etc2/Tables.cpp b/3rdparty/bgfx/3rdparty/etc2/Tables.cpp new file mode 100644 index 00000000000..968fbf5838c --- /dev/null +++ b/3rdparty/bgfx/3rdparty/etc2/Tables.cpp @@ -0,0 +1,109 @@ +#include "Tables.hpp" + +const int32 g_table[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 } +}; + +const int64 g_table256[8][4] = { + { 2*256, 8*256, -2*256, -8*256 }, + { 5*256, 17*256, -5*256, -17*256 }, + { 9*256, 29*256, -9*256, -29*256 }, + { 13*256, 42*256, -13*256, -42*256 }, + { 18*256, 60*256, -18*256, -60*256 }, + { 24*256, 80*256, -24*256, -80*256 }, + { 33*256, 106*256, -33*256, -106*256 }, + { 47*256, 183*256, -47*256, -183*256 } +}; + +const uint32 g_id[4][16] = { + { 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, + { 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2 }, + { 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4 }, + { 7, 7, 6, 6, 7, 7, 6, 6, 7, 7, 6, 6, 7, 7, 6, 6 } +}; + +const uint32 g_avg2[16] = { + 0x00, + 0x11, + 0x22, + 0x33, + 0x44, + 0x55, + 0x66, + 0x77, + 0x88, + 0x99, + 0xAA, + 0xBB, + 0xCC, + 0xDD, + 0xEE, + 0xFF +}; + +const uint32 g_flags[64] = { + 0x80800402, 0x80800402, 0x80800402, 0x80800402, + 0x80800402, 0x80800402, 0x80800402, 0x8080E002, + 0x80800402, 0x80800402, 0x8080E002, 0x8080E002, + 0x80800402, 0x8080E002, 0x8080E002, 0x8080E002, + 0x80000402, 0x80000402, 0x80000402, 0x80000402, + 0x80000402, 0x80000402, 0x80000402, 0x8000E002, + 0x80000402, 0x80000402, 0x8000E002, 0x8000E002, + 0x80000402, 0x8000E002, 0x8000E002, 0x8000E002, + 0x00800402, 0x00800402, 0x00800402, 0x00800402, + 0x00800402, 0x00800402, 0x00800402, 0x0080E002, + 0x00800402, 0x00800402, 0x0080E002, 0x0080E002, + 0x00800402, 0x0080E002, 0x0080E002, 0x0080E002, + 0x00000402, 0x00000402, 0x00000402, 0x00000402, + 0x00000402, 0x00000402, 0x00000402, 0x0000E002, + 0x00000402, 0x00000402, 0x0000E002, 0x0000E002, + 0x00000402, 0x0000E002, 0x0000E002, 0x0000E002 +}; + +#ifdef __SSE4_1__ +const uint8 g_flags_AVX2[64] = +{ + 0x63, 0x63, 0x63, 0x63, + 0x63, 0x63, 0x63, 0x7D, + 0x63, 0x63, 0x7D, 0x7D, + 0x63, 0x7D, 0x7D, 0x7D, + 0x43, 0x43, 0x43, 0x43, + 0x43, 0x43, 0x43, 0x5D, + 0x43, 0x43, 0x5D, 0x5D, + 0x43, 0x5D, 0x5D, 0x5D, + 0x23, 0x23, 0x23, 0x23, + 0x23, 0x23, 0x23, 0x3D, + 0x23, 0x23, 0x3D, 0x3D, + 0x23, 0x3D, 0x3D, 0x3D, + 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x1D, + 0x03, 0x03, 0x1D, 0x1D, + 0x03, 0x1D, 0x1D, 0x1D, +}; + +const __m128i g_table_SIMD[2] = +{ + _mm_setr_epi16( 2, 5, 9, 13, 18, 24, 33, 47), + _mm_setr_epi16( 8, 17, 29, 42, 60, 80, 106, 183) +}; +const __m128i g_table128_SIMD[2] = +{ + _mm_setr_epi16( 2*128, 5*128, 9*128, 13*128, 18*128, 24*128, 33*128, 47*128), + _mm_setr_epi16( 8*128, 17*128, 29*128, 42*128, 60*128, 80*128, 106*128, 183*128) +}; +const __m128i g_table256_SIMD[4] = +{ + _mm_setr_epi32( 2*256, 5*256, 9*256, 13*256), + _mm_setr_epi32( 8*256, 17*256, 29*256, 42*256), + _mm_setr_epi32( 18*256, 24*256, 33*256, 47*256), + _mm_setr_epi32( 60*256, 80*256, 106*256, 183*256) +}; +#endif + diff --git a/3rdparty/bgfx/3rdparty/etc2/Tables.hpp b/3rdparty/bgfx/3rdparty/etc2/Tables.hpp new file mode 100644 index 00000000000..b570526dc57 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/etc2/Tables.hpp @@ -0,0 +1,25 @@ +#ifndef __TABLES_HPP__ +#define __TABLES_HPP__ + +#include "Types.hpp" +#ifdef __SSE4_1__ +#include +#endif + +extern const int32 g_table[8][4]; +extern const int64 g_table256[8][4]; + +extern const uint32 g_id[4][16]; + +extern const uint32 g_avg2[16]; + +extern const uint32 g_flags[64]; + +#ifdef __SSE4_1__ +extern const uint8 g_flags_AVX2[64]; +extern const __m128i g_table_SIMD[2]; +extern const __m128i g_table128_SIMD[2]; +extern const __m128i g_table256_SIMD[4]; +#endif + +#endif diff --git a/3rdparty/bgfx/3rdparty/etc2/Types.hpp b/3rdparty/bgfx/3rdparty/etc2/Types.hpp new file mode 100644 index 00000000000..b31da22e4d8 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/etc2/Types.hpp @@ -0,0 +1,17 @@ +#ifndef __DARKRL__TYPES_HPP__ +#define __DARKRL__TYPES_HPP__ + +#include + +typedef int8_t int8; +typedef uint8_t uint8; +typedef int16_t int16; +typedef uint16_t uint16; +typedef int32_t int32; +typedef uint32_t uint32; +typedef int64_t int64; +typedef uint64_t uint64; + +typedef unsigned int uint; + +#endif diff --git a/3rdparty/bgfx/3rdparty/etc2/Vector.hpp b/3rdparty/bgfx/3rdparty/etc2/Vector.hpp new file mode 100644 index 00000000000..3005fdc5395 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/etc2/Vector.hpp @@ -0,0 +1,222 @@ +#ifndef __DARKRL__VECTOR_HPP__ +#define __DARKRL__VECTOR_HPP__ + +#include +#include +#include + +#include "Math.hpp" +#include "Types.hpp" + +template +struct Vector2 +{ + Vector2() : x( 0 ), y( 0 ) {} + Vector2( T v ) : x( v ), y( v ) {} + Vector2( T _x, T _y ) : x( _x ), y( _y ) {} + + bool operator==( const Vector2& rhs ) const { return x == rhs.x && y == rhs.y; } + bool operator!=( const Vector2& rhs ) const { return !( *this == rhs ); } + + Vector2& operator+=( const Vector2& rhs ) + { + x += rhs.x; + y += rhs.y; + return *this; + } + Vector2& operator-=( const Vector2& rhs ) + { + x -= rhs.x; + y -= rhs.y; + return *this; + } + Vector2& operator*=( const Vector2& rhs ) + { + x *= rhs.x; + y *= rhs.y; + return *this; + } + + T x, y; +}; + +template +Vector2 operator+( const Vector2& lhs, const Vector2& rhs ) +{ + return Vector2( lhs.x + rhs.x, lhs.y + rhs.y ); +} + +template +Vector2 operator-( const Vector2& lhs, const Vector2& rhs ) +{ + return Vector2( lhs.x - rhs.x, lhs.y - rhs.y ); +} + +template +Vector2 operator*( const Vector2& lhs, const float& rhs ) +{ + return Vector2( lhs.x * rhs, lhs.y * rhs ); +} + +template +Vector2 operator/( const Vector2& lhs, const T& rhs ) +{ + return Vector2( lhs.x / rhs, lhs.y / rhs ); +} + + +typedef Vector2 v2i; +typedef Vector2 v2f; + + +template +struct Vector3 +{ + Vector3() : x( 0 ), y( 0 ), z( 0 ) {} + Vector3( T v ) : x( v ), y( v ), z( v ) {} + Vector3( T _x, T _y, T _z ) : x( _x ), y( _y ), z( _z ) {} + template + Vector3( const Vector3& v ) : x( T( v.x ) ), y( T( v.y ) ), z( T( v.z ) ) {} + + T Luminance() const { return T( x * 0.3f + y * 0.59f + z * 0.11f ); } + void Clamp() + { + x = std::min( T(1), std::max( T(0), x ) ); + y = std::min( T(1), std::max( T(0), y ) ); + z = std::min( T(1), std::max( T(0), z ) ); + } + + bool operator==( const Vector3& rhs ) const { return x == rhs.x && y == rhs.y && z == rhs.z; } + bool operator!=( const Vector2& rhs ) const { return !( *this == rhs ); } + + T& operator[]( uint idx ) { assert( idx < 3 ); return ((T*)this)[idx]; } + const T& operator[]( uint idx ) const { assert( idx < 3 ); return ((T*)this)[idx]; } + + Vector3 operator+=( const Vector3& rhs ) + { + x += rhs.x; + y += rhs.y; + z += rhs.z; + return *this; + } + + Vector3 operator*=( const Vector3& rhs ) + { + x *= rhs.x; + y *= rhs.y; + z *= rhs.z; + return *this; + } + + Vector3 operator*=( const float& rhs ) + { + x *= rhs; + y *= rhs; + z *= rhs; + return *this; + } + + T x, y, z; + T padding; +}; + +template +Vector3 operator+( const Vector3& lhs, const Vector3& rhs ) +{ + return Vector3( lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z ); +} + +template +Vector3 operator-( const Vector3& lhs, const Vector3& rhs ) +{ + return Vector3( lhs.x - rhs.x, lhs.y - rhs.y, lhs.z - rhs.z ); +} + +template +Vector3 operator*( const Vector3& lhs, const Vector3& rhs ) +{ + return Vector3( lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z ); +} + +template +Vector3 operator*( const Vector3& lhs, const float& rhs ) +{ + return Vector3( T( lhs.x * rhs ), T( lhs.y * rhs ), T( lhs.z * rhs ) ); +} + +template +Vector3 operator/( const Vector3& lhs, const T& rhs ) +{ + return Vector3( lhs.x / rhs, lhs.y / rhs, lhs.z / rhs ); +} + +template +bool operator<( const Vector3& lhs, const Vector3& rhs ) +{ + return lhs.Luminance() < rhs.Luminance(); +} + +typedef Vector3 v3i; +typedef Vector3 v3f; +typedef Vector3 v3b; + + +static inline v3b v3f_to_v3b( const v3f& v ) +{ + return v3b( uint8( std::min( 1.f, v.x ) * 255 ), uint8( std::min( 1.f, v.y ) * 255 ), uint8( std::min( 1.f, v.z ) * 255 ) ); +} + +template +Vector3 Mix( const Vector3& v1, const Vector3& v2, float amount ) +{ + return v1 + ( v2 - v1 ) * amount; +} + +template<> +inline v3b Mix( const v3b& v1, const v3b& v2, float amount ) +{ + return v3b( v3f( v1 ) + ( v3f( v2 ) - v3f( v1 ) ) * amount ); +} + +template +Vector3 Desaturate( const Vector3& v ) +{ + T l = v.Luminance(); + return Vector3( l, l, l ); +} + +template +Vector3 Desaturate( const Vector3& v, float mul ) +{ + T l = T( v.Luminance() * mul ); + return Vector3( l, l, l ); +} + +template +Vector3 pow( const Vector3& base, float exponent ) +{ + return Vector3( + pow( base.x, exponent ), + pow( base.y, exponent ), + pow( base.z, exponent ) ); +} + +template +Vector3 sRGB2linear( const Vector3& v ) +{ + return Vector3( + sRGB2linear( v.x ), + sRGB2linear( v.y ), + sRGB2linear( v.z ) ); +} + +template +Vector3 linear2sRGB( const Vector3& v ) +{ + return Vector3( + linear2sRGB( v.x ), + linear2sRGB( v.y ), + linear2sRGB( v.z ) ); +} + +#endif diff --git a/3rdparty/bgfx/3rdparty/forsyth-too/forsythtriangleorderoptimizer.cpp b/3rdparty/bgfx/3rdparty/forsyth-too/forsythtriangleorderoptimizer.cpp index 0dd59c63cbe..3d23d2ba0ab 100644 --- a/3rdparty/bgfx/3rdparty/forsyth-too/forsythtriangleorderoptimizer.cpp +++ b/3rdparty/bgfx/3rdparty/forsyth-too/forsythtriangleorderoptimizer.cpp @@ -293,7 +293,7 @@ namespace Forsyth assert(vertexData.activeFaceListSize > 0); uint* begin = &activeFaceList[vertexData.activeFaceListStart]; - uint* end = &activeFaceList[vertexData.activeFaceListStart + vertexData.activeFaceListSize]; + uint* end = &(activeFaceList[vertexData.activeFaceListStart + vertexData.activeFaceListSize - 1]) + 1; uint* it = std::find(begin, end, bestFace); assert(it != end); std::swap(*it, *(end-1)); diff --git a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glcpp/.gitignore b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glcpp/.gitignore index 1c9b0ddd6db..722300c5026 100644 --- a/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glcpp/.gitignore +++ b/3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glcpp/.gitignore @@ -1,7 +1,5 @@ glcpp glcpp-parse.output -glcpp-parse.c -glcpp-parse.h *.o *.lo diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucdarwin.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucdarwin.h index 04900cfb0a0..968f4bc0069 100644 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucdarwin.h +++ b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucdarwin.h @@ -29,7 +29,7 @@ #endif #define NV_FASTCALL __attribute__((fastcall)) -#define NV_FORCEINLINE __attribute__((always_inline)) inline +#define NV_FORCEINLINE inline #define NV_DEPRECATED __attribute__((deprecated)) #define NV_THREAD_LOCAL //ACS: there's no "__thread" or equivalent on iOS/OSX diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnuclinux.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnuclinux.h index 5d2e4b8dcd0..117d342ea7d 100644 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnuclinux.h +++ b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnuclinux.h @@ -31,7 +31,7 @@ #define NV_FASTCALL __attribute__((fastcall)) //#if __GNUC__ > 3 // It seems that GCC does not assume always_inline implies inline. I think this depends on the GCC version :( -#define NV_FORCEINLINE inline __attribute__((always_inline)) +#define NV_FORCEINLINE inline //#else // Some compilers complain that inline and always_inline are redundant. //#define NV_FORCEINLINE __attribute__((always_inline)) diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucwin32.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucwin32.h index e416d3d4153..68465c8247f 100644 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucwin32.h +++ b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsgnucwin32.h @@ -19,7 +19,7 @@ #endif #define NV_FASTCALL __attribute__((fastcall)) -#define NV_FORCEINLINE __attribute__((always_inline)) +#define NV_FORCEINLINE inline #define NV_DEPRECATED __attribute__((deprecated)) #if __GNUC__ > 2 diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsvcwin32.h b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsvcwin32.h index 7b3876ab4b3..a6c6bf93bda 100644 --- a/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsvcwin32.h +++ b/3rdparty/bgfx/3rdparty/nvtt/nvcore/defsvcwin32.h @@ -48,7 +48,7 @@ #endif #define NV_NOINLINE __declspec(noinline) -#define NV_FORCEINLINE __forceinline +#define NV_FORCEINLINE inline #define NV_THREAD_LOCAL __declspec(thread) diff --git a/3rdparty/bgfx/3rdparty/nvtt/nvmath/nvmath.h b/3rdparty/bgfx/3rdparty/nvtt/nvmath/nvmath.h index 7a64f600153..94f7ec7947a 100644 --- a/3rdparty/bgfx/3rdparty/nvtt/nvmath/nvmath.h +++ b/3rdparty/bgfx/3rdparty/nvtt/nvmath/nvmath.h @@ -35,7 +35,12 @@ namespace nv inline bool isFinite(const float f) { +#if defined(_MSC_VER) && _MSC_VER <= 1800 + (void)f; + return true; +#else return std::isfinite(f); +#endif // defined(_MSC_VER) && _MSC_VER <= 1800 } // Eliminates negative zeros from a float array. diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp index c7adf2efba6..0949fe7de96 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp @@ -17,6 +17,7 @@ - PROGRAMMER GUIDE (read me!) - API BREAKING CHANGES (read me when you update!) - FREQUENTLY ASKED QUESTIONS (FAQ), TIPS + - How can I help? - How do I update to a newer version of ImGui? - Can I have multiple widgets with the same label? Can I have widget without a label? (Yes) - I integrated ImGui in my engine and the text or lines are blurry.. @@ -148,6 +149,7 @@ Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code. Also read releases logs https://github.com/ocornut/imgui/releases for more details. + - 2016/01/23 (1.48) - fixed not honoring exact width passed to PushItemWidth(), previously it would add extra FramePadding.x*2 over that width. if you had manual pixel-perfect alignment in place it might affect you. - 2015/12/27 (1.48) - fixed ImDrawList::AddRect() which used to render a rectangle 1 px too large on each axis. - 2015/12/04 (1.47) - renamed Color() helpers to ValueColor() - dangerously named, rarely used and probably to be made obsolete. - 2015/08/29 (1.45) - with the addition of horizontal scrollbar we made various fixes to inconsistencies with dealing with cursor position. @@ -236,6 +238,10 @@ FREQUENTLY ASKED QUESTIONS (FAQ), TIPS ====================================== + Q: How can I help? + A: - If you are experienced enough with ImGui and with C/C++, look at the todo list and see how you want/can help! + - Become a Patron/donate. Convince your company to become a Patron or provide serious funding for development time. + Q: How do I update to a newer version of ImGui? A: Overwrite the following files: imgui.cpp @@ -359,6 +365,7 @@ Q: How can I load multiple fonts? A: Use the font atlas to pack them into a single texture: + (Read extra_fonts/README.txt and the code in ImFontAtlas for more details.) ImGuiIO& io = ImGui::GetIO(); ImFont* font0 = io.Fonts->AddFontDefault(); @@ -371,7 +378,7 @@ // Options ImFontConfig config; config.OversampleH = 3; - config.OversampleV = 3; + config.OversampleV = 1; config.GlyphExtraSpacing.x = 1.0f; io.Fonts->LoadFromFileTTF("myfontfile.ttf", size_pixels, &config); @@ -383,8 +390,6 @@ io.Fonts->LoadFromFileTTF("fontawesome-webfont.ttf", 16.0f, &config, ranges); io.Fonts->LoadFromFileTTF("myfontfile.ttf", size_pixels, NULL, &config, io.Fonts->GetGlyphRangesJapanese()); - Read extra_fonts/README.txt or ImFontAtlas class for more details. - Q: How can I display and input non-Latin characters such as Chinese, Japanese, Korean, Cyrillic? A: When loading a font, pass custom Unicode ranges to specify the glyphs to load. ImGui will support UTF-8 encoding across the board. Character input depends on you passing the right character code to io.AddInputCharacter(). The example applications do that. @@ -402,9 +407,10 @@ ISSUES & TODO-LIST ================== - Issue numbers (#) refer to github issues. + Issue numbers (#) refer to github issues listed at https://github.com/ocornut/imgui/issues The list below consist mostly of notes of things to do before they are requested/discussed by users (at that point it usually happens on the github) + - doc: add a proper documentation+regression testing system (#435) - window: maximum window size settings (per-axis). for large popups in particular user may not want the popup to fill all space. - window: add a way for very transient windows (non-saved, temporary overlay over hundreds of objects) to "clean" up from the global window list. perhaps a lightweight explicit cleanup pass. - window: calling SetNextWindowSize() every frame with <= 0 doesn't do anything, may be useful to allow (particularly when used for a single axis). @@ -421,7 +427,7 @@ - window/tooltip: allow to set the width of a tooltip to allow TextWrapped() etc. while keeping the height automatic. - draw-list: maintaining bounding box per command would allow to merge draw command when clipping isn't relied on (typical non-scrolling window or non-overflowing column would merge with previous command). !- scrolling: allow immediately effective change of scroll if we haven't appended items yet - - splitter: formalize the splitter idiom into an official api (we want to handle n-way split) + - splitter/separator: formalize the splitter idiom into an official api (we want to handle n-way split) (#319) - widgets: display mode: widget-label, label-widget (aligned on column or using fixed size), label-newline-tab-widget etc. - widgets: clean up widgets internal toward exposing everything. - widgets: add disabled and read-only modes (#211) @@ -444,13 +450,14 @@ - layout: horizontal flow until no space left (#404) - layout: more generic alignment state (left/right/centered) for single items? - layout: clean up the InputFloatN/SliderFloatN/ColorEdit4 layout code. item width should include frame padding. + - columns: declare column set (each column: fixed size, %, fill, distribute default size among fills) (#513, #125) + - columns: add a conditional parameter to SetColumnOffset() (#513, #125) - columns: separator function or parameter that works within the column (currently Separator() bypass all columns) (#125) - - columns: declare column set (each column: fixed size, %, fill, distribute default size among fills) (#125) - - columns: columns header to act as button (~sort op) and allow resize/reorder (#125) - - columns: user specify columns size (#125) + - columns: columns header to act as button (~sort op) and allow resize/reorder (#513, #125) + - columns: user specify columns size (#513, #125) - columns: flag to add horizontal separator above/below? - columns/layout: setup minimum line height (equivalent of automatically calling AlignFirstTextHeightToWidgets) - - combo: sparse combo boxes (via function call?) + - combo: sparse combo boxes (via function call?) / iterators - combo: contents should extends to fit label if combo widget is small - combo/listbox: keyboard control. need InputText-like non-active focus + key handling. considering keyboard for custom listbox (pr #203) - listbox: multiple selection @@ -460,15 +467,16 @@ !- popups/menus: clarify usage of popups id, how MenuItem/Selectable closing parent popups affects the ID, etc. this is quite fishy needs improvement! (#331, #402) - popups: add variant using global identifier similar to Begin/End (#402) - popups: border options. richer api like BeginChild() perhaps? (#197) - - menus: local shortcuts, global shortcuts (#126) + - menus: local shortcuts, global shortcuts (#456, #126) - menus: icons - menus: menubars: some sort of priority / effect of main menu-bar on desktop size? - statusbar: add a per-window status bar helper similar to what menubar does. - - tabs + - tabs (#261, #351) - separator: separator on the initial position of a window is not visible (cursorpos.y <= clippos.y) - - gauge: various forms of gauge/loading bars widgets - color: the color helpers/typing is a mess and needs sorting out. - - color: add a better color picker + - color: add a better color picker (#346) + - node/graph editor (#306) + - pie menus patterns (#434) - plot: PlotLines() should use the polygon-stroke facilities (currently issues with averaging normals) - plot: make it easier for user to draw extra stuff into the graph (e.g: draw basis, highlight certain points, 2d plots, multiple plots) - plot: "smooth" automatic scale over time, user give an input 0.0(full user scale) 1.0(full derived from value) @@ -491,12 +499,14 @@ - textwrapped: figure out better way to use TextWrapped() in an always auto-resize context (tooltip, etc.) (git issue #249) - settings: write more decent code to allow saving/loading new fields - settings: api for per-tool simple persistent data (bool,int,float,columns sizes,etc.) in .ini file + - style: add window shadows. - style/optimization: store rounded corners in texture to use 1 quad per corner (filled and wireframe) to lower the cost of rounding. - style: color-box not always square? - style: a concept of "compact style" that the end-user can easily rely on (e.g. PushStyleCompact()?) that maps to other settings? avoid implementing duplicate helpers such as SmallCheckbox(), etc. - style: try to make PushStyleVar() more robust to incorrect parameters (to be more friendly to edit & continues situation). - style: global scale setting. - text: simple markup language for color change? + - font: dynamic font atlas to avoid baking huge ranges into bitmap and make scaling easier. - font: helper to add glyph redirect/replacements (e.g. redirect alternate apostrophe unicode code points to ascii one, etc.) - log: LogButtons() options for specifying depth and/or hiding depth slider - log: have more control over the log scope (e.g. stop logging when leaving current tree node scope) @@ -506,14 +516,16 @@ - filters: handle wildcards (with implicit leading/trailing *), regexps - shortcuts: add a shortcut api, e.g. parse "&Save" and/or "Save (CTRL+S)", pass in to widgets or provide simple ways to use (button=activate, input=focus) !- keyboard: tooltip & combo boxes are messing up / not honoring keyboard tabbing - - keyboard: full keyboard navigation and focus. + - keyboard: full keyboard navigation and focus. (#323) - focus: SetKeyboardFocusHere() on with >= 0 offset could be done on same frame (else latch and modulate on beginning of next frame) - input: rework IO system to be able to pass actual ordered/timestamped events. + - input: allow to decide and pass explicit double-clicks (e.g. for windows by the CS_DBLCLKS style). - input: support track pad style scrolling & slider edit. - misc: provide a way to compile out the entire implementation while providing a dummy API (e.g. #define IMGUI_DUMMY_IMPL) - misc: double-clicking on title bar to minimize isn't consistent, perhaps move to single-click on left-most collapse icon? - style editor: have a more global HSV setter (e.g. alter hue on all elements). consider replacing active/hovered by offset in HSV space? (#438) - style editor: color child window height expressed in multiple of line height. + - remote: make a system like RemoteImGui first-class citizen/project (#75) - drawlist: user probably can't call Clear() because we expect a texture to be pushed in the stack. - examples: directx9/directx11: save/restore device state more thoroughly. - optimization: use another hash function than crc32, e.g. FNV1a @@ -528,13 +540,13 @@ #include "imgui.h" #define IMGUI_DEFINE_MATH_OPERATORS +#define IMGUI_DEFINE_PLACEMENT_NEW #include "imgui_internal.h" #include // toupper, isprint #include // sqrtf, fabsf, fmodf, powf, cosf, sinf, floorf, ceilf #include // NULL, malloc, free, qsort, atoi #include // vsnprintf, sscanf, printf -#include // new (ptr) #if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier #include // intptr_t #else @@ -611,7 +623,7 @@ static void ClosePopupToLevel(int remaining); static void ClosePopup(ImGuiID id); static bool IsPopupOpen(ImGuiID id); static ImGuiWindow* GetFrontMostModalRootWindow(); -static ImVec2 FindBestPopupWindowPos(const ImVec2& base_pos, const ImVec2& size, ImGuiWindowFlags flags, int* last_dir, const ImRect& r_inner); +static ImVec2 FindBestPopupWindowPos(const ImVec2& base_pos, const ImVec2& size, int* last_dir, const ImRect& rect_to_avoid); static bool InputTextFilterCharacter(unsigned int* p_char, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data); static int InputTextCalcTextLenAndLineCount(const char* text_begin, const char** out_text_end); @@ -1535,6 +1547,7 @@ ImGuiWindow::ImGuiWindow(const char* name) ScrollTargetCenterRatio = ImVec2(0.5f, 0.5f); ScrollbarX = ScrollbarY = false; ScrollbarSizes = ImVec2(0.0f, 0.0f); + BorderSize = 0.0f; Active = WasActive = false; Accessed = false; Collapsed = false; @@ -1553,7 +1566,7 @@ ImGuiWindow::ImGuiWindow(const char* name) FontWindowScale = 1.0f; DrawList = (ImDrawList*)ImGui::MemAlloc(sizeof(ImDrawList)); - new(DrawList) ImDrawList(); + IM_PLACEMENT_NEW(DrawList) ImDrawList(); DrawList->_OwnerName = Name; RootWindow = NULL; RootNonPopupWindow = NULL; @@ -1827,7 +1840,7 @@ size_t ImGui::GetInternalStateSize() void ImGui::SetInternalState(void* state, bool construct) { if (construct) - new (state) ImGuiState(); + IM_PLACEMENT_NEW(state) ImGuiState(); GImGui = (ImGuiState*)state; } @@ -1872,7 +1885,7 @@ void ImGui::NewFrame() { // Initialize on first frame g.LogClipboard = (ImGuiTextBuffer*)ImGui::MemAlloc(sizeof(ImGuiTextBuffer)); - new(g.LogClipboard) ImGuiTextBuffer(); + IM_PLACEMENT_NEW(g.LogClipboard) ImGuiTextBuffer(); IM_ASSERT(g.Settings.empty()); LoadSettings(); @@ -2276,15 +2289,19 @@ static void AddDrawListToRenderList(ImVector& out_render_list, ImDr { if (!draw_list->CmdBuffer.empty() && !draw_list->VtxBuffer.empty()) { - if (draw_list->CmdBuffer.back().ElemCount == 0) + // Remove trailing command if unused + ImDrawCmd& last_cmd = draw_list->CmdBuffer.back(); + if (last_cmd.ElemCount == 0 && last_cmd.UserCallback == NULL) draw_list->CmdBuffer.pop_back(); + out_render_list.push_back(draw_list); // Check that draw_list doesn't use more vertices than indexable (default ImDrawIdx = 2 bytes = 64K vertices) // If this assert triggers because you are drawing lots of stuff manually, A) workaround by calling BeginChild()/EndChild() to put your draw commands in multiple draw lists, B) #define ImDrawIdx to a 'unsigned int' in imconfig.h and render accordingly. const unsigned long long int max_vtx_idx = (unsigned long long int)1L << (sizeof(ImDrawIdx)*8); (void)max_vtx_idx; - IM_ASSERT((unsigned long long int)draw_list->_VtxCurrentIdx <= max_vtx_idx); // Too many vertices in same ImDrawList + IM_ASSERT((int)draw_list->_VtxCurrentIdx == draw_list->VtxBuffer.Size); // Sanity check. Bug or mismatch between PrimReserve() calls and incrementing _VtxCurrentIdx, _VtxWritePtr etc. + IM_ASSERT((unsigned long long int)draw_list->_VtxCurrentIdx <= max_vtx_idx); // Too many vertices in same ImDrawList. See comment above. GImGui->IO.MetricsRenderVertices += draw_list->VtxBuffer.Size; GImGui->IO.MetricsRenderIndices += draw_list->IdxBuffer.Size; @@ -2488,17 +2505,8 @@ static const char* FindTextDisplayEnd(const char* text, const char* text_end) if (!text_end) text_end = (const char*)-1; - ImGuiState& g = *GImGui; - if (g.DisableHideTextAfterDoubleHash > 0) - { - while (text_display_end < text_end && *text_display_end != '\0') - text_display_end++; - } - else - { - while (text_display_end < text_end && *text_display_end != '\0' && (text_display_end[0] != '#' || text_display_end[1] != '#')) - text_display_end++; - } + while (text_display_end < text_end && *text_display_end != '\0' && (text_display_end[0] != '#' || text_display_end[1] != '#')) + text_display_end++; return text_display_end; } @@ -2736,6 +2744,8 @@ ImVec2 ImGui::CalcTextSize(const char* text, const char* text_end, bool hide_tex ImFont* font = g.Font; const float font_size = g.FontSize; + if (text == text_display_end) + return ImVec2(0.0f, font_size); ImVec2 text_size = font->CalcTextSizeA(font_size, FLT_MAX, wrap_width, text, text_display_end, NULL); // Cancel out character spacing for the last character of a line (it is baked into glyph->XAdvance field) @@ -3421,7 +3431,7 @@ static void CheckStacksSize(ImGuiWindow* window, bool write) IM_ASSERT(p_backup == window->DC.StackSizesBackup + IM_ARRAYSIZE(window->DC.StackSizesBackup)); } -static ImVec2 FindBestPopupWindowPos(const ImVec2& base_pos, const ImVec2& size, ImGuiWindowFlags flags, int* last_dir, const ImRect& r_inner) +static ImVec2 FindBestPopupWindowPos(const ImVec2& base_pos, const ImVec2& size, int* last_dir, const ImRect& r_inner) { const ImGuiStyle& style = GImGui->Style; @@ -3431,7 +3441,7 @@ static ImVec2 FindBestPopupWindowPos(const ImVec2& base_pos, const ImVec2& size, r_outer.Reduce(ImVec2((size.x - r_outer.GetWidth() > safe_padding.x*2) ? safe_padding.x : 0.0f, (size.y - r_outer.GetHeight() > safe_padding.y*2) ? safe_padding.y : 0.0f)); ImVec2 base_pos_clamped = ImClamp(base_pos, r_outer.Min, r_outer.Max - size); - for (int n = (*last_dir != -1) ? -1 : 0; n < 4; n++) // Right, down, up, left. Favor last used direction. + for (int n = (*last_dir != -1) ? -1 : 0; n < 4; n++) // Last, Right, down, up, left. (Favor last used direction). { const int dir = (n == -1) ? *last_dir : n; ImRect rect(dir == 0 ? r_inner.Max.x : r_outer.Min.x, dir == 1 ? r_inner.Max.y : r_outer.Min.y, dir == 3 ? r_inner.Min.x : r_outer.Max.x, dir == 2 ? r_inner.Min.y : r_outer.Max.y); @@ -3441,12 +3451,8 @@ static ImVec2 FindBestPopupWindowPos(const ImVec2& base_pos, const ImVec2& size, return ImVec2(dir == 0 ? r_inner.Max.x : dir == 3 ? r_inner.Min.x - size.x : base_pos_clamped.x, dir == 1 ? r_inner.Max.y : dir == 2 ? r_inner.Min.y - size.y : base_pos_clamped.y); } - // Fallback + // Fallback, try to keep within display *last_dir = -1; - if (flags & ImGuiWindowFlags_Tooltip) // For tooltip we prefer avoiding the cursor at all cost even if it means that part of the tooltip won't be visible. - return base_pos + ImVec2(2,2); - - // Otherwise try to keep within display ImVec2 pos = base_pos; pos.x = ImMax(ImMin(pos.x + size.x, r_outer.Max.x) - size.x, r_outer.Min.x); pos.y = ImMax(ImMin(pos.y + size.y, r_outer.Max.y) - size.y, r_outer.Min.y); @@ -3470,7 +3476,7 @@ static ImGuiWindow* CreateNewWindow(const char* name, ImVec2 size, ImGuiWindowFl // Create window the first time ImGuiWindow* window = (ImGuiWindow*)ImGui::MemAlloc(sizeof(ImGuiWindow)); - new(window) ImGuiWindow(name); + IM_PLACEMENT_NEW(window) ImGuiWindow(name); window->Flags = flags; if (flags & ImGuiWindowFlags_NoSavedSettings) @@ -3810,19 +3816,21 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ rect_to_avoid = ImRect(-FLT_MAX, parent_window->Pos.y + parent_window->TitleBarHeight(), FLT_MAX, parent_window->Pos.y + parent_window->TitleBarHeight() + parent_window->MenuBarHeight()); else rect_to_avoid = ImRect(parent_window->Pos.x + style.ItemSpacing.x, -FLT_MAX, parent_window->Pos.x + parent_window->Size.x - style.ItemSpacing.x - parent_window->ScrollbarSizes.x, FLT_MAX); // We want some overlap to convey the relative depth of each popup (here hard-coded to 4) - window->PosFloat = FindBestPopupWindowPos(window->PosFloat, window->Size, flags, &window->AutoPosLastDirection, rect_to_avoid); + window->PosFloat = FindBestPopupWindowPos(window->PosFloat, window->Size, &window->AutoPosLastDirection, rect_to_avoid); } else if ((flags & ImGuiWindowFlags_Popup) != 0 && !window_pos_set_by_api && window_appearing_after_being_hidden) { ImRect rect_to_avoid(window->PosFloat.x - 1, window->PosFloat.y - 1, window->PosFloat.x + 1, window->PosFloat.y + 1); - window->PosFloat = FindBestPopupWindowPos(window->PosFloat, window->Size, flags, &window->AutoPosLastDirection, rect_to_avoid); + window->PosFloat = FindBestPopupWindowPos(window->PosFloat, window->Size, &window->AutoPosLastDirection, rect_to_avoid); } // Position tooltip (always follows mouse) if ((flags & ImGuiWindowFlags_Tooltip) != 0 && !window_pos_set_by_api) { ImRect rect_to_avoid(g.IO.MousePos.x - 16, g.IO.MousePos.y - 8, g.IO.MousePos.x + 24, g.IO.MousePos.y + 24); // FIXME: Completely hard-coded. Perhaps center on cursor hit-point instead? - window->PosFloat = FindBestPopupWindowPos(g.IO.MousePos, window->Size, flags, &window->AutoPosLastDirection, rect_to_avoid); + window->PosFloat = FindBestPopupWindowPos(g.IO.MousePos, window->Size, &window->AutoPosLastDirection, rect_to_avoid); + if (window->AutoPosLastDirection == -1) + window->PosFloat = g.IO.MousePos + ImVec2(2,2); // If there's not enough room, for tooltip we prefer avoiding the cursor at all cost even if it means that part of the tooltip won't be visible. } // User moving window (at the beginning of the frame to avoid input lag or sheering). Only valid for root windows. @@ -3936,9 +3944,10 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ } // Scrollbars - window->ScrollbarY = (window->SizeContents.y > window->Size.y + style.ItemSpacing.y) && !(flags & ImGuiWindowFlags_NoScrollbar); - window->ScrollbarX = (window->SizeContents.x > window->Size.x - (window->ScrollbarY ? style.ScrollbarSize : 0.0f) - window->WindowPadding.x) && !(flags & ImGuiWindowFlags_NoScrollbar) && (flags & ImGuiWindowFlags_HorizontalScrollbar); + window->ScrollbarY = (flags & ImGuiWindowFlags_ForceVerticalScrollbar) || ((window->SizeContents.y > window->Size.y + style.ItemSpacing.y) && !(flags & ImGuiWindowFlags_NoScrollbar)); + window->ScrollbarX = (flags & ImGuiWindowFlags_ForceHorizontalScrollbar) || ((window->SizeContents.x > window->Size.x - (window->ScrollbarY ? style.ScrollbarSize : 0.0f) - window->WindowPadding.x) && !(flags & ImGuiWindowFlags_NoScrollbar) && (flags & ImGuiWindowFlags_HorizontalScrollbar)); window->ScrollbarSizes = ImVec2(window->ScrollbarY ? style.ScrollbarSize : 0.0f, window->ScrollbarX ? style.ScrollbarSize : 0.0f); + window->BorderSize = (flags & ImGuiWindowFlags_ShowBorders) ? 1.0f : 0.0f; // Window background if (bg_alpha > 0.0f) @@ -3978,11 +3987,10 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ // (after the input handling so we don't have a frame of latency) if (!(flags & ImGuiWindowFlags_NoResize)) { - const float border_size = (window->Flags & ImGuiWindowFlags_ShowBorders) ? 1.0f : 0.0f; const ImVec2 br = window->Rect().GetBR(); - window->DrawList->PathLineTo(br + ImVec2(-resize_corner_size, -border_size)); - window->DrawList->PathLineTo(br + ImVec2(-border_size, -resize_corner_size)); - window->DrawList->PathArcToFast(ImVec2(br.x - window_rounding - border_size, br.y - window_rounding - border_size), window_rounding, 0, 3); + window->DrawList->PathLineTo(br + ImVec2(-resize_corner_size, -window->BorderSize)); + window->DrawList->PathLineTo(br + ImVec2(-window->BorderSize, -resize_corner_size)); + window->DrawList->PathArcToFast(ImVec2(br.x - window_rounding - window->BorderSize, br.y - window_rounding - window->BorderSize), window_rounding, 0, 3); window->DrawList->PathFill(resize_col); } @@ -4072,13 +4080,12 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ // We set this up after processing the resize grip so that our clip rectangle doesn't lag by a frame // Note that if our window is collapsed we will end up with a null clipping rectangle which is the correct behavior. const ImRect title_bar_rect = window->TitleBarRect(); - const float border_size = (flags & ImGuiWindowFlags_ShowBorders) ? 1.0f : 0.0f; + const float border_size = window->BorderSize; ImRect clip_rect; clip_rect.Min.x = title_bar_rect.Min.x + 0.5f + ImMax(border_size, window->WindowPadding.x*0.5f); clip_rect.Min.y = title_bar_rect.Max.y + window->MenuBarHeight() + 0.5f + border_size; clip_rect.Max.x = window->Pos.x + window->Size.x - window->ScrollbarSizes.x - ImMax(border_size, window->WindowPadding.x*0.5f); clip_rect.Max.y = window->Pos.y + window->Size.y - border_size - window->ScrollbarSizes.y; - PushClipRect(clip_rect.Min, clip_rect.Max, true); // Clear 'accessed' flag last thing @@ -4094,7 +4101,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ window->Collapsed = parent_window && parent_window->Collapsed; if (!(flags & ImGuiWindowFlags_AlwaysAutoResize) && window->AutoFitFramesX <= 0 && window->AutoFitFramesY <= 0) - window->Collapsed |= (window->ClipRect.Min.x >= window->ClipRect.Max.x || window->ClipRect.Min.y >= window->ClipRect.Max.y); + window->Collapsed |= (window->ClippedWindowRect.Min.x >= window->ClippedWindowRect.Max.x || window->ClippedWindowRect.Min.y >= window->ClippedWindowRect.Max.y); // We also hide the window from rendering because we've already added its border to the command list. // (we could perform the check earlier in the function but it is simpler at this point) @@ -4145,7 +4152,7 @@ static void Scrollbar(ImGuiWindow* window, bool horizontal) bool other_scrollbar = (horizontal ? window->ScrollbarY : window->ScrollbarX); float other_scrollbar_size_w = other_scrollbar ? style.ScrollbarSize : 0.0f; const ImRect window_rect = window->Rect(); - const float border_size = (window->Flags & ImGuiWindowFlags_ShowBorders) ? 1.0f : 0.0f; + const float border_size = window->BorderSize; ImRect bb = horizontal ? ImRect(window->Pos.x + border_size, window_rect.Max.y - style.ScrollbarSize, window_rect.Max.x - other_scrollbar_size_w - border_size, window_rect.Max.y - border_size) : ImRect(window_rect.Max.x - style.ScrollbarSize, window->Pos.y + border_size, window_rect.Max.x - border_size, window_rect.Max.y - other_scrollbar_size_w - border_size); @@ -4278,8 +4285,8 @@ static void PushMultiItemsWidths(int components, float w_full) const ImGuiStyle& style = GImGui->Style; if (w_full <= 0.0f) w_full = ImGui::CalcItemWidth(); - const float w_item_one = ImMax(1.0f, (float)(int)((w_full - (style.FramePadding.x*2.0f + style.ItemInnerSpacing.x) * (components-1)) / (float)components)); - const float w_item_last = ImMax(1.0f, (float)(int)(w_full - (w_item_one + style.FramePadding.x*2.0f + style.ItemInnerSpacing.x) * (components-1))); + const float w_item_one = ImMax(1.0f, (float)(int)((w_full - (style.ItemInnerSpacing.x) * (components-1)) / (float)components)); + const float w_item_last = ImMax(1.0f, (float)(int)(w_full - (w_item_one + style.ItemInnerSpacing.x) * (components-1))); window->DC.ItemWidthStack.push_back(w_item_last); for (int i = 0; i < components-1; i++) window->DC.ItemWidthStack.push_back(w_item_one); @@ -4300,9 +4307,8 @@ float ImGui::CalcItemWidth() if (w < 0.0f) { // Align to a right-side limit. We include 1 frame padding in the calculation because this is how the width is always used (we add 2 frame padding to it), but we could move that responsibility to the widget as well. - ImGuiState& g = *GImGui; float width_to_right_edge = ImGui::GetContentRegionAvail().x; - w = ImMax(1.0f, width_to_right_edge + w - g.Style.FramePadding.x * 2.0f); + w = ImMax(1.0f, width_to_right_edge + w); } w = (float)(int)w; return w; @@ -5163,8 +5169,8 @@ void ImGui::LabelTextV(const char* label, const char* fmt, va_list args) const float w = CalcItemWidth(); const ImVec2 label_size = CalcTextSize(label, NULL, true); - const ImRect value_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w + style.FramePadding.x*2, label_size.y + style.FramePadding.y*2)); - const ImRect total_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w + style.FramePadding.x*2 + (label_size.x > 0.0f ? style.ItemInnerSpacing.x : 0.0f), style.FramePadding.y*2) + label_size); + const ImRect value_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y*2)); + const ImRect total_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w + (label_size.x > 0.0f ? style.ItemInnerSpacing.x : 0.0f), style.FramePadding.y*2) + label_size); ItemSize(total_bb, style.FramePadding.y); if (!ItemAdd(total_bb, NULL)) return; @@ -5173,7 +5179,8 @@ void ImGui::LabelTextV(const char* label, const char* fmt, va_list args) const char* value_text_begin = &g.TempBuffer[0]; const char* value_text_end = value_text_begin + ImFormatStringV(g.TempBuffer, IM_ARRAYSIZE(g.TempBuffer), fmt, args); RenderTextClipped(value_bb.Min, value_bb.Max, value_text_begin, value_text_end, NULL, ImGuiAlign_VCenter); - RenderText(ImVec2(value_bb.Max.x + style.ItemInnerSpacing.x, value_bb.Min.y + style.FramePadding.y), label); + if (label_size.x > 0.0f) + RenderText(ImVec2(value_bb.Max.x + style.ItemInnerSpacing.x, value_bb.Min.y + style.FramePadding.y), label); } void ImGui::LabelText(const char* label, const char* fmt, ...) @@ -5271,7 +5278,7 @@ bool ImGui::ButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFlags ImGuiState& g = *GImGui; const ImGuiStyle& style = g.Style; const ImGuiID id = window->GetID(label); - const ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true); + const ImVec2 label_size = CalcTextSize(label, NULL, true); ImVec2 pos = window->DC.CursorPos; if ((flags & ImGuiButtonFlags_AlignTextBaseLine) && style.FramePadding.y < window->DC.CurrentLineTextBaseOffset) @@ -5361,7 +5368,7 @@ static bool CloseWindowButton(bool* p_opened) } if (p_opened != NULL && pressed) - *p_opened = !*p_opened; + *p_opened = false; return pressed; } @@ -5599,8 +5606,9 @@ bool ImGui::CollapsingHeader(const char* label, const char* str_id, bool display str_id = label; if (label == NULL) label = str_id; + const bool label_hide_text_after_double_hash = (label == str_id); // Only search and hide text after ## if we have passed label and ID separately, otherwise allow "##" within format string. const ImGuiID id = window->GetID(str_id); - const ImVec2 label_size = CalcTextSize(label, NULL, true); + const ImVec2 label_size = CalcTextSize(label, NULL, label_hide_text_after_double_hash); // We vertically grow up to current line height up the typical widget height. const float text_base_offset_y = ImMax(0.0f, window->DC.CurrentLineTextBaseOffset - padding.y); // Latch before ItemSize changes it @@ -5663,7 +5671,7 @@ bool ImGui::CollapsingHeader(const char* label, const char* str_id, bool display RenderCollapseTriangle(bb.Min + ImVec2(padding.x, g.FontSize*0.15f + text_base_offset_y), opened, 0.70f, false); if (g.LogEnabled) LogRenderedText(text_pos, ">"); - RenderText(text_pos, label); + RenderText(text_pos, label, NULL, label_hide_text_after_double_hash); } return opened; @@ -5963,7 +5971,7 @@ bool ImGui::InputScalarAsWidgetReplacement(const ImRect& aabb, const char* label char buf[32]; DataTypeFormatString(data_type, data_ptr, decimal_precision, buf, IM_ARRAYSIZE(buf)); - bool value_changed = InputTextEx(label, buf, IM_ARRAYSIZE(buf), aabb.GetSize() - g.Style.FramePadding*2.0f, ImGuiInputTextFlags_CharsDecimal | ImGuiInputTextFlags_AutoSelectAll); + bool value_changed = InputTextEx(label, buf, IM_ARRAYSIZE(buf), aabb.GetSize(), ImGuiInputTextFlags_CharsDecimal | ImGuiInputTextFlags_AutoSelectAll); if (g.ScalarAsInputTextId == 0) { // First frame @@ -6164,7 +6172,7 @@ bool ImGui::SliderFloat(const char* label, float* v, float v_min, float v_max, c const float w = CalcItemWidth(); const ImVec2 label_size = CalcTextSize(label, NULL, true); - const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y) + style.FramePadding*2.0f); + const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y*2.0f)); const ImRect total_bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); // NB- we don't call ItemSize() yet because we may turn into a text edit box below @@ -6255,7 +6263,6 @@ bool ImGui::VSliderFloat(const char* label, const ImVec2& size, float* v, float char value_buf[64]; char* value_buf_end = value_buf + ImFormatString(value_buf, IM_ARRAYSIZE(value_buf), display_format, *v); RenderTextClipped(ImVec2(frame_bb.Min.x, frame_bb.Min.y + style.FramePadding.y), frame_bb.Max, value_buf, value_buf_end, NULL, ImGuiAlign_Center); - if (label_size.x > 0.0f) RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, frame_bb.Min.y + style.FramePadding.y), label); @@ -6462,7 +6469,7 @@ bool ImGui::DragFloat(const char* label, float* v, float v_speed, float v_min, f const float w = CalcItemWidth(); const ImVec2 label_size = CalcTextSize(label, NULL, true); - const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y) + style.FramePadding*2.0f); + const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y*2.0f)); const ImRect inner_bb(frame_bb.Min + style.FramePadding, frame_bb.Max - style.FramePadding); const ImRect total_bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); @@ -6667,9 +6674,9 @@ void ImGui::PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_ge ImGuiState& g = *GImGui; const ImGuiStyle& style = g.Style; - const ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true); + const ImVec2 label_size = CalcTextSize(label, NULL, true); if (graph_size.x == 0.0f) - graph_size.x = CalcItemWidth() + (style.FramePadding.x * 2); + graph_size.x = CalcItemWidth(); if (graph_size.y == 0.0f) graph_size.y = label_size.y + (style.FramePadding.y * 2); @@ -6758,7 +6765,8 @@ void ImGui::PlotEx(ImGuiPlotType plot_type, const char* label, float (*values_ge if (overlay_text) RenderTextClipped(ImVec2(frame_bb.Min.x, frame_bb.Min.y + style.FramePadding.y), frame_bb.Max, overlay_text, NULL, NULL, ImGuiAlign_Center); - RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, inner_bb.Min.y), label); + if (label_size.x > 0.0f) + RenderText(ImVec2(frame_bb.Max.x + style.ItemInnerSpacing.x, inner_bb.Min.y), label); } struct ImGuiPlotArrayGetterData @@ -6809,15 +6817,16 @@ void ImGui::ProgressBar(float fraction, const ImVec2& size_arg, const char* over const ImGuiStyle& style = g.Style; ImVec2 pos = window->DC.CursorPos; - const ImRect bb(pos, pos + CalcItemSize(size_arg, CalcItemWidth() + style.FramePadding.x*2.0f, g.FontSize + style.FramePadding.y*2.0f)); + ImRect bb(pos, pos + CalcItemSize(size_arg, CalcItemWidth(), g.FontSize + style.FramePadding.y*2.0f)); ItemSize(bb, style.FramePadding.y); if (!ItemAdd(bb, NULL)) return; // Render fraction = ImSaturate(fraction); - const ImVec2 fill_br = ImVec2(ImLerp(bb.Min.x, bb.Max.x, fraction), bb.Max.y); RenderFrame(bb.Min, bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding); + bb.Reduce(ImVec2(window->BorderSize, window->BorderSize)); + const ImVec2 fill_br = ImVec2(ImLerp(bb.Min.x, bb.Max.x, fraction), bb.Max.y); RenderFrame(bb.Min, fill_br, GetColorU32(ImGuiCol_PlotHistogram), false, style.FrameRounding); // Default displaying the fraction as percentage string, but user can override it @@ -6875,7 +6884,8 @@ bool ImGui::Checkbox(const char* label, bool* v) if (g.LogEnabled) LogRenderedText(text_bb.GetTL(), *v ? "[x]" : "[ ]"); - RenderText(text_bb.GetTL(), label); + if (label_size.x > 0.0f) + RenderText(text_bb.GetTL(), label); return pressed; } @@ -6942,7 +6952,8 @@ bool ImGui::RadioButton(const char* label, bool active) if (g.LogEnabled) LogRenderedText(text_bb.GetTL(), active ? "(x)" : "( )"); - RenderText(text_bb.GetTL(), label); + if (label_size.x > 0.0f) + RenderText(text_bb.GetTL(), label); return pressed; } @@ -7218,9 +7229,9 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 const bool is_editable = (flags & ImGuiInputTextFlags_ReadOnly) == 0; const bool is_password = (flags & ImGuiInputTextFlags_Password) != 0; - const ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true); - ImVec2 size = CalcItemSize(size_arg, CalcItemWidth(), is_multiline ? ImGui::GetTextLineHeight() * 8.0f : label_size.y); // Arbitrary default of 8 lines high for multi-line - const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + size + style.FramePadding*2.0f); + const ImVec2 label_size = CalcTextSize(label, NULL, true); + ImVec2 size = CalcItemSize(size_arg, CalcItemWidth(), (is_multiline ? ImGui::GetTextLineHeight() * 8.0f : label_size.y) + style.FramePadding.y*2.0f); // Arbitrary default of 8 lines high for multi-line + const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + size); const ImRect total_bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? (style.ItemInnerSpacing.x + label_size.x) : 0.0f, 0.0f)); ImGuiWindow* draw_window = window; @@ -7580,7 +7591,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2 RenderFrame(frame_bb.Min, frame_bb.Max, GetColorU32(ImGuiCol_FrameBg), true, style.FrameRounding); // Render - const ImVec4 clip_rect(frame_bb.Min.x, frame_bb.Min.y, frame_bb.Min.x + size.x + style.FramePadding.x*2.0f, frame_bb.Min.y + size.y + style.FramePadding.y*2.0f); + const ImVec4 clip_rect(frame_bb.Min.x, frame_bb.Min.y, frame_bb.Min.x + size.x, frame_bb.Min.y + size.y); // Not using frame_bb.Max because we have adjusted size ImVec2 render_pos = is_multiline ? draw_window->DC.CursorPos : frame_bb.Min + style.FramePadding; ImVec2 text_size(0.f, 0.f); if (g.ActiveId == id || (edit_state.Id == id && is_multiline && g.ActiveId == draw_window->GetID("#SCROLLY"))) @@ -7771,15 +7782,13 @@ bool ImGui::InputScalarEx(const char* label, ImGuiDataType data_type, void* data ImGuiState& g = *GImGui; const ImGuiStyle& style = g.Style; - const float w = CalcItemWidth(); - const ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true); - const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y) + style.FramePadding*2.0f); + const ImVec2 label_size = CalcTextSize(label, NULL, true); ImGui::BeginGroup(); ImGui::PushID(label); - const ImVec2 button_sz = ImVec2(g.FontSize, g.FontSize) + style.FramePadding * 2; + const ImVec2 button_sz = ImVec2(g.FontSize, g.FontSize) + style.FramePadding*2.0f; if (step_ptr) - ImGui::PushItemWidth(ImMax(1.0f, w - (button_sz.x + style.ItemInnerSpacing.x)*2)); + ImGui::PushItemWidth(ImMax(1.0f, CalcItemWidth() - (button_sz.x + style.ItemInnerSpacing.x)*2)); char buf[64]; DataTypeFormatString(data_type, data_ptr, scalar_format, buf, IM_ARRAYSIZE(buf)); @@ -7989,7 +7998,7 @@ bool ImGui::Combo(const char* label, int* current_item, bool (*items_getter)(voi const float w = CalcItemWidth(); const ImVec2 label_size = CalcTextSize(label, NULL, true); - const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y) + style.FramePadding*2.0f); + const ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(w, label_size.y + style.FramePadding.y*2.0f)); const ImRect total_bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); ItemSize(total_bb, style.FramePadding.y); if (!ItemAdd(total_bb, &id)) @@ -8091,7 +8100,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl PopClipRect(); ImGuiID id = window->GetID(label); - ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true); + ImVec2 label_size = CalcTextSize(label, NULL, true); ImVec2 size(size_arg.x != 0.0f ? size_arg.x : label_size.x, size_arg.y != 0.0f ? size_arg.y : label_size.y); ImVec2 pos = window->DC.CursorPos; pos.y += window->DC.CurrentLineTextBaseOffset; @@ -8175,10 +8184,10 @@ bool ImGui::ListBoxHeader(const char* label, const ImVec2& size_arg) const ImGuiStyle& style = ImGui::GetStyle(); const ImGuiID id = ImGui::GetID(label); - const ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true); + const ImVec2 label_size = CalcTextSize(label, NULL, true); // Size default to hold ~7 items. Fractional number of items helps seeing that we can scroll down/up without looking at scrollbar. - ImVec2 size = CalcItemSize(size_arg, CalcItemWidth() + style.FramePadding.x * 2.0f, ImGui::GetTextLineHeightWithSpacing() * 7.4f + style.ItemSpacing.y); + ImVec2 size = CalcItemSize(size_arg, CalcItemWidth(), ImGui::GetTextLineHeightWithSpacing() * 7.4f + style.ItemSpacing.y); ImVec2 frame_size = ImVec2(size.x, ImMax(size.y, label_size.y)); ImRect frame_bb(window->DC.CursorPos, window->DC.CursorPos + frame_size); ImRect bb(frame_bb.Min, frame_bb.Max + ImVec2(label_size.x > 0.0f ? style.ItemInnerSpacing.x + label_size.x : 0.0f, 0.0f)); @@ -8333,8 +8342,7 @@ bool ImGui::BeginMenuBar() ImGui::BeginGroup(); // Save position ImGui::PushID("##menubar"); ImRect rect = window->MenuBarRect(); - float border_size = (window->Flags & ImGuiWindowFlags_ShowBorders) ? 1.0f : 0.0f; - PushClipRect(ImVec2(rect.Min.x+0.5f, rect.Min.y-0.5f+border_size), ImVec2(rect.Max.x+0.5f, rect.Max.y-0.5f), false); + PushClipRect(ImVec2(rect.Min.x+0.5f, rect.Min.y-0.5f+window->BorderSize), ImVec2(rect.Max.x+0.5f, rect.Max.y-0.5f), false); window->DC.CursorPos = ImVec2(rect.Min.x + window->DC.MenuBarOffsetX, rect.Min.y);// + g.Style.FramePadding.y); window->DC.LayoutType = ImGuiLayoutType_Horizontal; window->DC.MenuBarAppending = true; @@ -8527,7 +8535,6 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha) edit_mode = g.ColorEditModeStorage.GetInt(id, 0) % 3; float f[4] = { col[0], col[1], col[2], col[3] }; - if (edit_mode == ImGuiColorEditMode_HSV) ImGui::ColorConvertRGBtoHSV(f[0], f[1], f[2], f[0], f[1], f[2]); @@ -8547,8 +8554,8 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha) { // RGB/HSV 0..255 Sliders const float w_items_all = w_full - (square_sz + style.ItemInnerSpacing.x); - const float w_item_one = ImMax(1.0f, (float)(int)((w_items_all - (style.FramePadding.x*2.0f + style.ItemInnerSpacing.x) * (components-1)) / (float)components)); - const float w_item_last = ImMax(1.0f, (float)(int)(w_items_all - (w_item_one + style.FramePadding.x*2.0f + style.ItemInnerSpacing.x) * (components-1))); + const float w_item_one = ImMax(1.0f, (float)(int)((w_items_all - (style.ItemInnerSpacing.x) * (components-1)) / (float)components)); + const float w_item_last = ImMax(1.0f, (float)(int)(w_items_all - (w_item_one + style.ItemInnerSpacing.x) * (components-1))); const bool hide_prefix = (w_item_one <= CalcTextSize("M:999").x); const char* ids[4] = { "##X", "##Y", "##Z", "##W" }; @@ -8583,18 +8590,19 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha) else ImFormatString(buf, IM_ARRAYSIZE(buf), "#%02X%02X%02X", i[0], i[1], i[2]); ImGui::PushItemWidth(w_slider_all - style.ItemInnerSpacing.x); - value_changed |= ImGui::InputText("##Text", buf, IM_ARRAYSIZE(buf), ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsUppercase); + if (ImGui::InputText("##Text", buf, IM_ARRAYSIZE(buf), ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_CharsUppercase)) + { + value_changed |= true; + char* p = buf; + while (*p == '#' || ImCharIsSpace(*p)) + p++; + i[0] = i[1] = i[2] = i[3] = 0; + if (alpha) + sscanf(p, "%02X%02X%02X%02X", (unsigned int*)&i[0], (unsigned int*)&i[1], (unsigned int*)&i[2], (unsigned int*)&i[3]); // Treat at unsigned (%X is unsigned) + else + sscanf(p, "%02X%02X%02X", (unsigned int*)&i[0], (unsigned int*)&i[1], (unsigned int*)&i[2]); + } ImGui::PopItemWidth(); - char* p = buf; - while (*p == '#' || ImCharIsSpace(*p)) - p++; - - // Treat at unsigned (%X is unsigned) - i[0] = i[1] = i[2] = i[3] = 0; - if (alpha) - sscanf(p, "%02X%02X%02X%02X", (unsigned int*)&i[0], (unsigned int*)&i[1], (unsigned int*)&i[2], (unsigned int*)&i[3]); - else - sscanf(p, "%02X%02X%02X", (unsigned int*)&i[0], (unsigned int*)&i[1], (unsigned int*)&i[2]); } break; } @@ -8615,14 +8623,14 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha) const char* button_titles[3] = { "RGB", "HSV", "HEX" }; if (ButtonEx(button_titles[edit_mode], ImVec2(0,0), ImGuiButtonFlags_DontClosePopups)) g.ColorEditModeStorage.SetInt(id, (edit_mode + 1) % 3); // Don't set local copy of 'edit_mode' right away! - ImGui::SameLine(); - } - else - { - ImGui::SameLine(0, style.ItemInnerSpacing.x); } - ImGui::TextUnformatted(label, FindTextDisplayEnd(label)); + const char* label_display_end = FindTextDisplayEnd(label); + if (label != label_display_end) + { + ImGui::SameLine(0, (window->DC.ColorEditMode == ImGuiColorEditMode_UserSelectShowButton) ? -1.0f : style.ItemInnerSpacing.x); + ImGui::TextUnformatted(label, label_display_end); + } // Convert back for (int n = 0; n < 4; n++) @@ -9283,7 +9291,6 @@ void ImGui::ShowMetricsWindow(bool* opened) }; ImGuiState& g = *GImGui; // Access private state - g.DisableHideTextAfterDoubleHash++; // Not exposed (yet). Disable processing that hides text after '##' markers. Funcs::NodeWindows(g.Windows, "Windows"); if (ImGui::TreeNode("DrawList", "Active DrawLists (%d)", g.RenderDrawLists[0].Size)) { @@ -9309,7 +9316,6 @@ void ImGui::ShowMetricsWindow(bool* opened) ImGui::Text("ActiveID: 0x%08X/0x%08X", g.ActiveId, g.ActiveIdPreviousFrame); ImGui::TreePop(); } - g.DisableHideTextAfterDoubleHash--; } ImGui::End(); } diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h index b7b0a0113a6..9e4a6c892ad 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h @@ -18,17 +18,18 @@ #define IMGUI_VERSION "1.48 WIP" +// Define attributes of all API symbols declarations, e.g. for DLL under Windows. +#ifndef IMGUI_API +#define IMGUI_API +#endif + // Define assertion handler. #ifndef IM_ASSERT #include #define IM_ASSERT(_EXPR, ...) assert(_EXPR) #endif -// Define attributes of all API symbols declarations, e.g. for DLL under Windows. -#ifndef IMGUI_API -#define IMGUI_API -#endif - +// Some compilers support applying printf-style warnings to user functions. #if defined(__clang__) || defined(__GNUC__) #define IM_PRINTFARGS(FMT) __attribute__((format(printf, FMT, (FMT+1)))) #else @@ -36,39 +37,50 @@ #endif // Forward declarations -struct ImDrawCmd; -struct ImDrawList; -struct ImDrawData; -struct ImFont; -struct ImFontAtlas; -struct ImColor; -struct ImGuiIO; -struct ImGuiStorage; -struct ImGuiStyle; +struct ImDrawChannel; // Temporary storage for outputting drawing commands out of order, used by ImDrawList::ChannelsSplit() +struct ImDrawCmd; // A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call) +struct ImDrawData; // All draw command lists required to render the frame +struct ImDrawList; // A single draw command list (generally one per window) +struct ImDrawVert; // A single vertex (20 bytes by default, override layout with IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT) +struct ImFont; // Runtime data for a single font within a parent ImFontAtlas +struct ImFontAtlas; // Runtime data for multiple fonts, bake multiple fonts into a single texture, TTF font loader +struct ImFontConfig; // Configuration data when adding a font or merging fonts +struct ImColor; // Helper functions to create a color that can be converted to either u32 or float4 +struct ImGuiIO; // Main configuration and I/O between your application and ImGui +struct ImGuiOnceUponAFrame; // Simple helper for running a block of code not more than once a frame, used by IMGUI_ONCE_UPON_A_FRAME macro +struct ImGuiStorage; // Simple custom key value storage +struct ImGuiStyle; // Runtime data for styling/colors +struct ImGuiTextFilter; // Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" +struct ImGuiTextBuffer; // Text buffer for logging/accumulating text +struct ImGuiTextEditCallbackData; // Shared state of ImGui::InputText() when using custom callbacks (advanced) +struct ImGuiListClipper; // Helper to manually clip large list of items +// Enumerations (declared as int for compatibility and to not pollute the top of this file) typedef unsigned int ImU32; typedef unsigned short ImWchar; // character for keyboard input/display typedef void* ImTextureID; // user data to refer to a texture (e.g. store your texture handle/id) typedef ImU32 ImGuiID; // unique ID used by widgets (typically hashed from a stack of string) -typedef int ImGuiCol; // enum ImGuiCol_ -typedef int ImGuiStyleVar; // enum ImGuiStyleVar_ -typedef int ImGuiKey; // enum ImGuiKey_ -typedef int ImGuiAlign; // enum ImGuiAlign_ -typedef int ImGuiColorEditMode; // enum ImGuiColorEditMode_ -typedef int ImGuiMouseCursor; // enum ImGuiMouseCursor_ -typedef int ImGuiWindowFlags; // enum ImGuiWindowFlags_ -typedef int ImGuiSetCond; // enum ImGuiSetCond_ -typedef int ImGuiInputTextFlags; // enum ImGuiInputTextFlags_ -typedef int ImGuiSelectableFlags; // enum ImGuiSelectableFlags_ -struct ImGuiTextEditCallbackData; // for advanced uses of InputText() +typedef int ImGuiCol; // a color identifier for styling // enum ImGuiCol_ +typedef int ImGuiStyleVar; // a variable identifier for styling // enum ImGuiStyleVar_ +typedef int ImGuiKey; // a key identifier (ImGui-side enum) // enum ImGuiKey_ +typedef int ImGuiAlign; // alignment // enum ImGuiAlign_ +typedef int ImGuiColorEditMode; // color edit mode for ColorEdit*() // enum ImGuiColorEditMode_ +typedef int ImGuiMouseCursor; // a mouse cursor identifier // enum ImGuiMouseCursor_ +typedef int ImGuiWindowFlags; // window flags for Begin*() // enum ImGuiWindowFlags_ +typedef int ImGuiSetCond; // condition flags for Set*() // enum ImGuiSetCond_ +typedef int ImGuiInputTextFlags; // flags for InputText*() // enum ImGuiInputTextFlags_ +typedef int ImGuiSelectableFlags; // flags for Selectable() // enum ImGuiSelectableFlags_ typedef int (*ImGuiTextEditCallback)(ImGuiTextEditCallbackData *data); +// Others helpers at bottom of the file: +// class ImVector<> // Lightweight std::vector like class. +// IMGUI_ONCE_UPON_A_FRAME // Execute a block of code once per frame only (convenient for creating UI within deep-nested code that runs multiple times) + struct ImVec2 { float x, y; ImVec2() { x = y = 0.0f; } ImVec2(float _x, float _y) { x = _x; y = _y; } - #ifdef IM_VEC2_CLASS_EXTRA // Define constructor and implicit cast operators in imconfig.h to convert back<>forth from your math types and ImVec2. IM_VEC2_CLASS_EXTRA #endif @@ -79,25 +91,11 @@ struct ImVec4 float x, y, z, w; ImVec4() { x = y = z = w = 0.0f; } ImVec4(float _x, float _y, float _z, float _w) { x = _x; y = _y; z = _z; w = _w; } - #ifdef IM_VEC4_CLASS_EXTRA // Define constructor and implicit cast operators in imconfig.h to convert back<>forth from your math types and ImVec4. IM_VEC4_CLASS_EXTRA #endif }; -// Helpers at bottom of the file: -// - class ImVector<> // Lightweight std::vector like class. -// - IMGUI_ONCE_UPON_A_FRAME // Execute a block of code once per frame only (convenient for creating UI within deep-nested code that runs multiple times) -// - struct ImGuiTextFilter // Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]" -// - struct ImGuiTextBuffer // Text buffer for logging/accumulating text -// - struct ImGuiStorage // Custom key value storage (if you need to alter open/close states manually) -// - struct ImGuiTextEditCallbackData // Shared state of ImGui::InputText() when using custom callbacks -// - struct ImGuiListClipper // Helper to manually clip large list of items. -// - struct ImColor // Helper functions to created packed 32-bit RGBA color values -// - struct ImDrawList // Draw command list -// - struct ImFontAtlas // Bake multiple fonts into a single texture, TTF font loader, bake glyphs into bitmap -// - struct ImFont // Single font - // ImGui end-user API // In a namespace so that user can add extra functions in a separate file (e.g. Value() helpers for your vector or common types) namespace ImGui @@ -376,6 +374,7 @@ namespace ImGui IMGUI_API ImVec2 GetItemRectMin(); // get bounding rect of last item in screen space IMGUI_API ImVec2 GetItemRectMax(); // " IMGUI_API ImVec2 GetItemRectSize(); // " + IMGUI_API void SetItemAllowOverlap(); // allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area. IMGUI_API bool IsWindowHovered(); // is current window hovered and hoverable (not blocked by a popup) (differentiate child windows from each others) IMGUI_API bool IsWindowFocused(); // is current window focused IMGUI_API bool IsRootWindowFocused(); // is current root window focused (top parent window in case of child windows) @@ -453,17 +452,19 @@ enum ImGuiWindowFlags_ ImGuiWindowFlags_NoTitleBar = 1 << 0, // Disable title-bar ImGuiWindowFlags_NoResize = 1 << 1, // Disable user resizing with the lower-right grip ImGuiWindowFlags_NoMove = 1 << 2, // Disable user moving the window - ImGuiWindowFlags_NoScrollbar = 1 << 3, // Disable scrollbar (window can still scroll with mouse or programatically) - ImGuiWindowFlags_NoScrollWithMouse = 1 << 4, // Disable user scrolling with mouse wheel + ImGuiWindowFlags_NoScrollbar = 1 << 3, // Disable scrollbars (window can still scroll with mouse or programatically) + ImGuiWindowFlags_NoScrollWithMouse = 1 << 4, // Disable user vertically scrolling with mouse wheel ImGuiWindowFlags_NoCollapse = 1 << 5, // Disable user collapsing window by double-clicking on it ImGuiWindowFlags_AlwaysAutoResize = 1 << 6, // Resize every window to its content every frame ImGuiWindowFlags_ShowBorders = 1 << 7, // Show borders around windows and items ImGuiWindowFlags_NoSavedSettings = 1 << 8, // Never load/save settings in .ini file ImGuiWindowFlags_NoInputs = 1 << 9, // Disable catching mouse or keyboard inputs ImGuiWindowFlags_MenuBar = 1 << 10, // Has a menu-bar - ImGuiWindowFlags_HorizontalScrollbar = 1 << 11, // Enable horizontal scrollbar (off by default). You need to use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. + ImGuiWindowFlags_HorizontalScrollbar = 1 << 11, // Allow horizontal scrollbar to appear (off by default). You need to use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. ImGuiWindowFlags_NoFocusOnAppearing = 1 << 12, // Disable taking focus when transitioning from hidden to visible state ImGuiWindowFlags_NoBringToFrontOnFocus = 1 << 13, // Disable bringing window to front when taking focus (e.g. clicking on it or programatically giving it focus) + ImGuiWindowFlags_ForceVerticalScrollbar = 1 << 14, // Always show vertical scrollbar (even if ContentSize.y < Size.y) + ImGuiWindowFlags_ForceHorizontalScrollbar=1 << 15, // Always show horizontal scrollbar (even if ContentSize.x < Size.x) // [Internal] ImGuiWindowFlags_ChildWindow = 1 << 20, // Don't use! For internal use by BeginChild() ImGuiWindowFlags_ChildWindowAutoFitX = 1 << 21, // Don't use! For internal use by BeginChild() @@ -837,7 +838,7 @@ public: inline iterator insert(const_iterator it, const value_type& v) { IM_ASSERT(it >= Data && it <= Data+Size); const ptrdiff_t off = it - Data; if (Size == Capacity) reserve(Capacity ? Capacity * 2 : 4); if (off < (int)Size) memmove(Data + off + 1, Data + off, ((size_t)Size - (size_t)off) * sizeof(value_type)); Data[off] = v; Size++; return Data + off; } }; -// Helper: execute a block of code once a frame only +// Helper: execute a block of code at maximum once a frame // Convenient if you want to quickly create an UI within deep-nested code that runs multiple times every frame. // Usage: // IMGUI_ONCE_UPON_A_FRAME @@ -919,30 +920,30 @@ struct ImGuiStorage Pair(ImGuiID _key, float _val_f) { key = _key; val_f = _val_f; } Pair(ImGuiID _key, void* _val_p) { key = _key; val_p = _val_p; } }; - ImVector Data; + ImVector Data; // - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N) // - Set***() functions find pair, insertion on demand if missing. // - Sorted insertion is costly but should amortize. A typical frame shouldn't need to insert any new pair. - IMGUI_API void Clear(); - IMGUI_API int GetInt(ImGuiID key, int default_val = 0) const; - IMGUI_API void SetInt(ImGuiID key, int val); - IMGUI_API float GetFloat(ImGuiID key, float default_val = 0.0f) const; - IMGUI_API void SetFloat(ImGuiID key, float val); - IMGUI_API void* GetVoidPtr(ImGuiID key) const; // default_val is NULL - IMGUI_API void SetVoidPtr(ImGuiID key, void* val); + IMGUI_API void Clear(); + IMGUI_API int GetInt(ImGuiID key, int default_val = 0) const; + IMGUI_API void SetInt(ImGuiID key, int val); + IMGUI_API float GetFloat(ImGuiID key, float default_val = 0.0f) const; + IMGUI_API void SetFloat(ImGuiID key, float val); + IMGUI_API void* GetVoidPtr(ImGuiID key) const; // default_val is NULL + IMGUI_API void SetVoidPtr(ImGuiID key, void* val); // - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set. // - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer. // - A typical use case where this is convenient: // float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar; // - You can also use this to quickly create temporary editable values during a session of using Edit&Continue, without restarting your application. - IMGUI_API int* GetIntRef(ImGuiID key, int default_val = 0); - IMGUI_API float* GetFloatRef(ImGuiID key, float default_val = 0); - IMGUI_API void** GetVoidPtrRef(ImGuiID key, void* default_val = NULL); + IMGUI_API int* GetIntRef(ImGuiID key, int default_val = 0); + IMGUI_API float* GetFloatRef(ImGuiID key, float default_val = 0); + IMGUI_API void** GetVoidPtrRef(ImGuiID key, void* default_val = NULL); // Use on your own storage if you know only integer are being stored (open/close all tree nodes) - IMGUI_API void SetAllInt(int val); + IMGUI_API void SetAllInt(int val); }; // Shared state of InputText(), passed to callback when a ImGuiInputTextFlags_Callback* flag is used. @@ -1028,15 +1029,20 @@ struct ImGuiListClipper // Hold a series of drawing commands. The user provides a renderer for ImDrawData which essentially contains an array of ImDrawList. //----------------------------------------------------------------------------- +// Helpers macros to generate 32-bits encoded colors +#define IM_COL32(R,G,B,A) (((ImU32)(A)<<24) | ((ImU32)(B)<<16) | ((ImU32)(G)<<8) | ((ImU32)(R))) +#define IM_COL32_WHITE (0xFFFFFFFF) +#define IM_COL32_BLACK (0xFF000000) +#define IM_COL32_BLACK_TRANS (0x00000000) // Transparent black + // Draw callbacks for advanced uses. // NB- You most likely do NOT need to use draw callbacks just to create your own widget or customized UI rendering (you can poke into the draw list for that) -// Draw callback are useful for example if you want to render a complex 3D scene inside a UI element. +// Draw callback may be useful for example, if you want to render a complex 3D scene inside a UI element, change your GPU render state, etc. // The expected behavior from your rendering loop is: // if (cmd.UserCallback != NULL) // cmd.UserCallback(parent_list, cmd); // else // RenderTriangles() -// It is up to you to decide if your rendering loop or the callback should be responsible for backup/restoring rendering state. typedef void (*ImDrawCallback)(const ImDrawList* parent_list, const ImDrawCmd* cmd); // Typically, 1 command = 1 gpu draw call (unless command is a callback) @@ -1066,9 +1072,9 @@ struct ImDrawVert ImU32 col; }; #else -// You can change the vertex format layout by defining IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT in imconfig.h +// You can override the vertex format layout by defining IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT in imconfig.h // The code expect ImVec2 pos (8 bytes), ImVec2 uv (8 bytes), ImU32 col (4 bytes), but you can re-order them or add other fields as needed to simplify integration in your engine. -// The type has to be described by the #define (you can either declare the struct or use a typedef) +// The type has to be described within the macro (you can either declare the struct or use a typedef) IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT; #endif @@ -1086,7 +1092,6 @@ struct ImDrawChannel // If you want to add custom rendering within a window, you can use ImGui::GetWindowDrawList() to access the current draw list and add your own primitives. // You can interleave normal ImGui:: calls and adding primitives to the current draw list. // All positions are in screen coordinates (0,0=top-left, 1 pixel per unit). Primitives are always added to the list and not culled (culling is done at render time and at a higher-level by ImGui:: functions). -// Note that this only gives you access to rendering polygons. If your intent is to create custom widgets and the publicly exposed functions/data aren't sufficient, you can add code in imgui_user.inl struct ImDrawList { // This is what you have to render @@ -1108,7 +1113,7 @@ struct ImDrawList ImDrawList() { _OwnerName = NULL; Clear(); } ~ImDrawList() { ClearFreeMemory(); } - IMGUI_API void PushClipRect(const ImVec4& clip_rect); // Scissoring. The values are x1, y1, x2, y2. Only apply to rendering. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling) + IMGUI_API void PushClipRect(const ImVec4& clip_rect); // Scissoring. Note that the values are (x1,y1,x2,y2) and NOT (x1,y1,w,h). This is passed down to your render function but not used for CPU-side clipping. Prefer using higher-level ImGui::PushClipRect() to affect logic (hit-testing and widget culling) IMGUI_API void PushClipRectFullScreen(); IMGUI_API void PopClipRect(); IMGUI_API void PushTextureID(const ImTextureID& texture_id); @@ -1156,8 +1161,9 @@ struct ImDrawList IMGUI_API void Clear(); IMGUI_API void ClearFreeMemory(); IMGUI_API void PrimReserve(int idx_count, int vtx_count); - IMGUI_API void PrimRect(const ImVec2& a, const ImVec2& b, ImU32 col); + IMGUI_API void PrimRect(const ImVec2& a, const ImVec2& b, ImU32 col); // Axis aligned rectangle (composed of two triangles) IMGUI_API void PrimRectUV(const ImVec2& a, const ImVec2& b, const ImVec2& uv_a, const ImVec2& uv_b, ImU32 col); + IMGUI_API void PrimQuadUV(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a, const ImVec2& uv_b, const ImVec2& uv_c, const ImVec2& uv_d, ImU32 col); inline void PrimVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col) { PrimWriteIdx((ImDrawIdx)_VtxCurrentIdx); PrimWriteVtx(pos, uv, col); } inline void PrimWriteVtx(const ImVec2& pos, const ImVec2& uv, ImU32 col){ _VtxWritePtr->pos = pos; _VtxWritePtr->uv = uv; _VtxWritePtr->col = col; _VtxWritePtr++; _VtxCurrentIdx++; } inline void PrimWriteIdx(ImDrawIdx idx) { *_IdxWritePtr = idx; _IdxWritePtr++; } diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp index 5f734abb1e7..8fd48b0b01b 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp @@ -223,8 +223,7 @@ void ImGui::ShowTestWindow(bool* p_opened) if (ImGui::TreeNode("Fonts", "Fonts (%d)", ImGui::GetIO().Fonts->Fonts.Size)) { - ImGui::SameLine(); - ShowHelpMarker("Tip: Load fonts with io.Fonts->AddFontFromFileTTF()\nbefore calling io.Fonts->GetTex* functions."); + ImGui::SameLine(); ShowHelpMarker("Tip: Load fonts with io.Fonts->AddFontFromFileTTF()\nbefore calling io.Fonts->GetTex* functions."); ImFontAtlas* atlas = ImGui::GetIO().Fonts; if (ImGui::TreeNode("Atlas texture", "Atlas texture (%dx%d pixels)", atlas->TexWidth, atlas->TexHeight)) { @@ -442,9 +441,9 @@ void ImGui::ShowTestWindow(bool* p_opened) ImGui::Text("Password input"); static char bufpass[64] = "password123"; - ImGui::InputText("password", bufpass, 64, ImGuiInputTextFlags_Password); + ImGui::InputText("password", bufpass, 64, ImGuiInputTextFlags_Password | ImGuiInputTextFlags_CharsNoBlank); ImGui::SameLine(); ShowHelpMarker("Display all characters as '*'.\nDisable clipboard cut and copy.\nDisable logging.\n"); - ImGui::InputText("password (clear)", bufpass, 64); + ImGui::InputText("password (clear)", bufpass, 64, ImGuiInputTextFlags_CharsNoBlank); ImGui::TreePop(); } @@ -812,26 +811,36 @@ void ImGui::ShowTestWindow(bool* p_opened) if (ImGui::TreeNode("Widgets Width")) { static float f = 0.0f; - ImGui::Text("PushItemWidth(100)"); + ImGui::Text("PushItemWidth(100)"); + ImGui::SameLine(); ShowHelpMarker("Fixed width."); ImGui::PushItemWidth(100); ImGui::DragFloat("float##1", &f); ImGui::PopItemWidth(); - ImGui::Text("PushItemWidth(GetWindowWidth() * 0.5f);"); + ImGui::Text("PushItemWidth(GetWindowWidth() * 0.5f)"); + ImGui::SameLine(); ShowHelpMarker("Half of window width."); ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.5f); ImGui::DragFloat("float##2", &f); ImGui::PopItemWidth(); - ImGui::Text("PushItemWidth(GetContentRegionAvailWidth() * 0.5f);"); + ImGui::Text("PushItemWidth(GetContentRegionAvailWidth() * 0.5f)"); + ImGui::SameLine(); ShowHelpMarker("Half of available width.\n(~ right-cursor_pos)\n(works within a column set)"); ImGui::PushItemWidth(ImGui::GetContentRegionAvailWidth() * 0.5f); ImGui::DragFloat("float##3", &f); ImGui::PopItemWidth(); - ImGui::Text("PushItemWidth(-100);"); + ImGui::Text("PushItemWidth(-100)"); + ImGui::SameLine(); ShowHelpMarker("Align to right edge minus 100"); ImGui::PushItemWidth(-100); ImGui::DragFloat("float##4", &f); ImGui::PopItemWidth(); + ImGui::Text("PushItemWidth(-1)"); + ImGui::SameLine(); ShowHelpMarker("Align to right edge"); + ImGui::PushItemWidth(-1); + ImGui::DragFloat("float##5", &f); + ImGui::PopItemWidth(); + ImGui::TreePop(); } diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp index b5d25eaa0be..256bbfdd751 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp @@ -14,10 +14,10 @@ #include "imgui.h" #define IMGUI_DEFINE_MATH_OPERATORS +#define IMGUI_DEFINE_PLACEMENT_NEW #include "imgui_internal.h" #include // vsnprintf, sscanf, printf -#include // new (ptr) #if !defined(alloca) && !defined(__FreeBSD__) #ifdef _WIN32 #include // alloca @@ -37,7 +37,7 @@ #pragma clang diagnostic ignored "-Wfloat-equal" // warning : comparing floating point with == or != is unsafe // storing and comparing against same constants ok. #pragma clang diagnostic ignored "-Wglobal-constructors" // warning : declaration requires a global destructor // similar to above, not sure what the exact difference it. #pragma clang diagnostic ignored "-Wsign-conversion" // warning : implicit conversion changes signedness // -#pragma clang diagnostic ignored "-Wreserved-id-macro" // warning : macro name is a reserved identifier // +//#pragma clang diagnostic ignored "-Wreserved-id-macro" // warning : macro name is a reserved identifier // #endif #ifdef __GNUC__ #pragma GCC diagnostic ignored "-Wunused-function" // warning: 'xxxx' defined but not used @@ -267,7 +267,7 @@ void ImDrawList::ChannelsSplit(int channels_count) { if (i >= old_channels_count) { - new(&_Channels[i]) ImDrawChannel(); + IM_PLACEMENT_NEW(&_Channels[i]) ImDrawChannel(); } else { @@ -346,13 +346,13 @@ void ImDrawList::PrimReserve(int idx_count, int vtx_count) _IdxWritePtr = IdxBuffer.Data + idx_buffer_size; } +// Fully unrolled with inline call to keep our debug builds decently fast. void ImDrawList::PrimRect(const ImVec2& a, const ImVec2& c, ImU32 col) { - const ImVec2 uv = GImGui->FontTexUvWhitePixel; - const ImVec2 b(c.x, a.y); - const ImVec2 d(a.x, c.y); - _IdxWritePtr[0] = (ImDrawIdx)(_VtxCurrentIdx); _IdxWritePtr[1] = (ImDrawIdx)(_VtxCurrentIdx+1); _IdxWritePtr[2] = (ImDrawIdx)(_VtxCurrentIdx+2); - _IdxWritePtr[3] = (ImDrawIdx)(_VtxCurrentIdx); _IdxWritePtr[4] = (ImDrawIdx)(_VtxCurrentIdx+2); _IdxWritePtr[5] = (ImDrawIdx)(_VtxCurrentIdx+3); + ImVec2 b(c.x, a.y), d(a.x, c.y), uv(GImGui->FontTexUvWhitePixel); + ImDrawIdx idx = (ImDrawIdx)_VtxCurrentIdx; + _IdxWritePtr[0] = idx; _IdxWritePtr[1] = (ImDrawIdx)(idx+1); _IdxWritePtr[2] = (ImDrawIdx)(idx+2); + _IdxWritePtr[3] = idx; _IdxWritePtr[4] = (ImDrawIdx)(idx+2); _IdxWritePtr[5] = (ImDrawIdx)(idx+3); _VtxWritePtr[0].pos = a; _VtxWritePtr[0].uv = uv; _VtxWritePtr[0].col = col; _VtxWritePtr[1].pos = b; _VtxWritePtr[1].uv = uv; _VtxWritePtr[1].col = col; _VtxWritePtr[2].pos = c; _VtxWritePtr[2].uv = uv; _VtxWritePtr[2].col = col; @@ -364,12 +364,24 @@ void ImDrawList::PrimRect(const ImVec2& a, const ImVec2& c, ImU32 col) void ImDrawList::PrimRectUV(const ImVec2& a, const ImVec2& c, const ImVec2& uv_a, const ImVec2& uv_c, ImU32 col) { - const ImVec2 b(c.x, a.y); - const ImVec2 d(a.x, c.y); - const ImVec2 uv_b(uv_c.x, uv_a.y); - const ImVec2 uv_d(uv_a.x, uv_c.y); - _IdxWritePtr[0] = (ImDrawIdx)(_VtxCurrentIdx); _IdxWritePtr[1] = (ImDrawIdx)(_VtxCurrentIdx+1); _IdxWritePtr[2] = (ImDrawIdx)(_VtxCurrentIdx+2); - _IdxWritePtr[3] = (ImDrawIdx)(_VtxCurrentIdx); _IdxWritePtr[4] = (ImDrawIdx)(_VtxCurrentIdx+2); _IdxWritePtr[5] = (ImDrawIdx)(_VtxCurrentIdx+3); + ImVec2 b(c.x, a.y), d(a.x, c.y), uv_b(uv_c.x, uv_a.y), uv_d(uv_a.x, uv_c.y); + ImDrawIdx idx = (ImDrawIdx)_VtxCurrentIdx; + _IdxWritePtr[0] = idx; _IdxWritePtr[1] = (ImDrawIdx)(idx+1); _IdxWritePtr[2] = (ImDrawIdx)(idx+2); + _IdxWritePtr[3] = idx; _IdxWritePtr[4] = (ImDrawIdx)(idx+2); _IdxWritePtr[5] = (ImDrawIdx)(idx+3); + _VtxWritePtr[0].pos = a; _VtxWritePtr[0].uv = uv_a; _VtxWritePtr[0].col = col; + _VtxWritePtr[1].pos = b; _VtxWritePtr[1].uv = uv_b; _VtxWritePtr[1].col = col; + _VtxWritePtr[2].pos = c; _VtxWritePtr[2].uv = uv_c; _VtxWritePtr[2].col = col; + _VtxWritePtr[3].pos = d; _VtxWritePtr[3].uv = uv_d; _VtxWritePtr[3].col = col; + _VtxWritePtr += 4; + _VtxCurrentIdx += 4; + _IdxWritePtr += 6; +} + +void ImDrawList::PrimQuadUV(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a, const ImVec2& uv_b, const ImVec2& uv_c, const ImVec2& uv_d, ImU32 col) +{ + ImDrawIdx idx = (ImDrawIdx)_VtxCurrentIdx; + _IdxWritePtr[0] = idx; _IdxWritePtr[1] = (ImDrawIdx)(idx+1); _IdxWritePtr[2] = (ImDrawIdx)(idx+2); + _IdxWritePtr[3] = idx; _IdxWritePtr[4] = (ImDrawIdx)(idx+2); _IdxWritePtr[5] = (ImDrawIdx)(idx+3); _VtxWritePtr[0].pos = a; _VtxWritePtr[0].uv = uv_a; _VtxWritePtr[0].col = col; _VtxWritePtr[1].pos = b; _VtxWritePtr[1].uv = uv_b; _VtxWritePtr[1].col = col; _VtxWritePtr[2].pos = c; _VtxWritePtr[2].uv = uv_c; _VtxWritePtr[2].col = col; @@ -893,7 +905,7 @@ void ImDrawList::AddText(const ImFont* font, float font_size, const ImVec2& pos, CmdBuffer.back().ElemCount -= idx_unused; _VtxWritePtr -= vtx_unused; _IdxWritePtr -= idx_unused; - _VtxCurrentIdx = (ImDrawIdx)VtxBuffer.Size; + _VtxCurrentIdx = (unsigned int)VtxBuffer.Size; } // This is one of the few function breaking the encapsulation of ImDrawLst, but it is just so useful. @@ -1087,7 +1099,7 @@ ImFont* ImFontAtlas::AddFont(const ImFontConfig* font_cfg) if (!font_cfg->MergeMode) { ImFont* font = (ImFont*)ImGui::MemAlloc(sizeof(ImFont)); - new (font) ImFont(); + IM_PLACEMENT_NEW(font) ImFont(); Fonts.push_back(font); } @@ -1235,8 +1247,9 @@ bool ImFontAtlas::Build() } } - // Start packing - TexWidth = (TexDesiredWidth > 0) ? TexDesiredWidth : (total_glyph_count > 2000) ? 2048 : (total_glyph_count > 1000) ? 1024 : 512; // Width doesn't actually matters much but some API/GPU have texture size limitations, and increasing width can decrease height. + // Start packing. We need a known width for the skyline algorithm. Using a cheap heuristic here to decide of width. User can override TexDesiredWidth if they wish. + // After packing is done, width shouldn't matter much, but some API/GPU have texture size limitations and increasing width can decrease height. + TexWidth = (TexDesiredWidth > 0) ? TexDesiredWidth : (total_glyph_count > 4000) ? 4096 : (total_glyph_count > 2000) ? 2048 : (total_glyph_count > 1000) ? 1024 : 512; TexHeight = 0; const int max_tex_height = 1024*32; stbtt_pack_context spc; diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h index 3c028c38cb8..54c777e0dfa 100644 --- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h +++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h @@ -137,6 +137,15 @@ static inline float ImLengthSqr(const ImVec4& lhs) static inline float ImInvLength(const ImVec2& lhs, float fail_value) { float d = lhs.x*lhs.x + lhs.y*lhs.y; if (d > 0.0f) return 1.0f / sqrtf(d); return fail_value; } static inline ImVec2 ImRound(ImVec2 v) { return ImVec2((float)(int)v.x, (float)(int)v.y); } +// We call C++ constructor on own allocated memory via the placement "new(ptr) Type()" syntax. +// Defining a custom placement new() with a dummy parameter allows us to bypass including which on some platforms complains when user has disabled exceptions. +#ifdef IMGUI_DEFINE_PLACEMENT_NEW +struct ImPlacementNewDummy {}; +inline void* operator new(size_t, ImPlacementNewDummy, void* ptr) { return ptr; } +inline void operator delete(void*, ImPlacementNewDummy, void*) {} +#define IM_PLACEMENT_NEW(_PTR) new(ImPlacementNewDummy() ,_PTR) +#endif + //----------------------------------------------------------------------------- // Types //----------------------------------------------------------------------------- @@ -371,7 +380,6 @@ struct ImGuiState ImGuiWindow* MovedWindow; // Track the child window we clicked on to move a window. Pointer is only valid if ActiveID is the "#MOVE" identifier of a window. ImVector Settings; // .ini Settings float SettingsDirtyTimer; // Save .ini settinngs on disk when time reaches zero - int DisableHideTextAfterDoubleHash; ImVector ColorModifiers; // Stack for PushStyleColor()/PopStyleColor() ImVector StyleModifiers; // Stack for PushStyleVar()/PopStyleVar() ImVector FontStack; // Stack for PushFont()/PopFont() @@ -455,7 +463,6 @@ struct ImGuiState ActiveIdWindow = NULL; MovedWindow = NULL; SettingsDirtyTimer = 0.0f; - DisableHideTextAfterDoubleHash = 0; SetNextWindowPosVal = ImVec2(0.0f, 0.0f); SetNextWindowSizeVal = ImVec2(0.0f, 0.0f); @@ -600,7 +607,8 @@ struct IMGUI_API ImGuiWindow ImVec2 ScrollTarget; // target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0f. (FLT_MAX for no change) ImVec2 ScrollTargetCenterRatio; // 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered bool ScrollbarX, ScrollbarY; - ImVec2 ScrollbarSizes; // + ImVec2 ScrollbarSizes; + float BorderSize; bool Active; // Set to true on Begin() bool WasActive; bool Accessed; // Set to true when any widget access the current window @@ -684,7 +692,6 @@ namespace ImGui IMGUI_API void FocusableItemUnregister(ImGuiWindow* window); IMGUI_API ImVec2 CalcItemSize(ImVec2 size, float default_x, float default_y); IMGUI_API float CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x); - IMGUI_API void SetItemAllowOverlap(); // Allow last item to be overlapped by a subsequent item IMGUI_API void OpenPopupEx(const char* str_id, bool reopen_existing); diff --git a/3rdparty/bgfx/3rdparty/pvrtc/BitScale.h b/3rdparty/bgfx/3rdparty/pvrtc/BitScale.h index a9e5cec32e6..b600fe9350e 100644 --- a/3rdparty/bgfx/3rdparty/pvrtc/BitScale.h +++ b/3rdparty/bgfx/3rdparty/pvrtc/BitScale.h @@ -2,7 +2,7 @@ #pragma once -#include +#include //============================================================================ diff --git a/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c b/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c index d8af75bb010..6b3a35695f2 100644 --- a/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c +++ b/3rdparty/bgfx/3rdparty/remotery/lib/Remotery.c @@ -5506,7 +5506,8 @@ static void* rmtglGetProcAddress(OpenGL* opengl, const char* symbol) #elif defined(__APPLE__) && !defined(GLEW_APPLE_GLX) - return NSGLGetProcAddress((const GLubyte*)symbol); + extern void* nsglGetProcAddress(const GLubyte* _name); + return nsglGetProcAddress((const GLubyte*)symbol); #elif defined(RMT_PLATFORM_LINUX) diff --git a/3rdparty/bgfx/3rdparty/stb/stb_image.c b/3rdparty/bgfx/3rdparty/stb/stb_image.c index bc305501477..130d6c01d61 100644 --- a/3rdparty/bgfx/3rdparty/stb/stb_image.c +++ b/3rdparty/bgfx/3rdparty/stb/stb_image.c @@ -1,5 +1,6 @@ #ifdef __GNUC__ # pragma GCC diagnostic ignored "-Wshadow" +# pragma GCC diagnostic ignored "-Warray-bounds" #elif defined(_MSC_VER) # pragma warning(disable:4312) // warning C4312: 'type cast': conversion from '' to '' of greater size # pragma warning(disable:4456) // warning C4456: declaration of 'k' hides previous local declaration diff --git a/3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h b/3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h index d6ed38b7254..90cd29584cc 100644 --- a/3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h +++ b/3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h @@ -1306,8 +1306,17 @@ typedef struct { m_tree[TINFL_MAX_HUFF_SYMBOLS_0 * 2]; } tinfl_huff_table; -#if MINIZ_HAS_64BIT_REGISTERS -#define TINFL_USE_64BIT_BITBUF 1 + +#ifndef MINIZ_HAS_64BIT_REGISTERS +# define MINIZ_HAS_64BIT_REGISTERS 0 +#endif + +#ifndef TINFL_USE_64BIT_BITBUF +# if MINIZ_HAS_64BIT_REGISTERS +# define TINFL_USE_64BIT_BITBUF 1 +# else +# define TINFL_USE_64BIT_BITBUF 0 +# endif #endif #if TINFL_USE_64BIT_BITBUF @@ -4318,7 +4327,7 @@ void *tdefl_write_image_to_png_file_in_memory(const void *pImage, int w, int h, #include #include -#if defined(_MSC_VER) || defined(__MINGW64__) +#if defined(_MSC_VER) //|| defined(__MINGW64__) static FILE *mz_fopen(const char *pFilename, const char *pMode) { FILE *pFile = NULL; fopen_s(&pFile, pFilename, pMode); diff --git a/3rdparty/bgfx/README.md b/3rdparty/bgfx/README.md index 0548f2d68ca..19c0a07167a 100644 --- a/3rdparty/bgfx/README.md +++ b/3rdparty/bgfx/README.md @@ -1,6 +1,9 @@ [bgfx](https://github.com/bkaradzic/bgfx) - Cross-platform rendering library ============================================================================ +[![Build Status](https://travis-ci.org/bkaradzic/bgfx.svg?branch=master)](https://travis-ci.org/bkaradzic/bgfx) +[![Build status](https://ci.appveyor.com/api/projects/status/ipa3ojgeaet1oko5?svg=true)](https://ci.appveyor.com/project/bkaradzic/bgfx) + [What is it?](https://bkaradzic.github.io/bgfx/overview.html) ------------------------------------------------------------- @@ -29,12 +32,12 @@ Supported platforms: * asm.js/Emscripten (1.25.0) * FreeBSD * iOS (iPhone, iPad, AppleTV) - * Linux ![](https://tc27.draster.com/app/rest/builds/buildType:(id:Bgfx_Linux)/statusIcon) + * Linux * MIPS Creator CI20 * Native Client (PPAPI 37+, ARM, x86, x64, PNaCl) * OSX (10.9+) * RaspberryPi - * Windows (XP, Vista, 7, 8, 10) ![](https://tc27.draster.com/app/rest/builds/buildType:(id:Bgfx_Windows)/statusIcon) + * Windows (XP, Vista, 7, 8, 10) * WinRT (WinPhone 8.0+) Supported compilers: @@ -51,11 +54,13 @@ Languages: * [Go language API bindings](https://github.com/james4k/go-bgfx) * [Java language API bindings](https://github.com/enleeten/twilight-bgfx) * [Haskell language API bindings](https://github.com/haskell-game/bgfx) + * [Rust language API bindings](https://github.com/rhoot/bgfx-rs) -Build status ------------- +Build +----- -https://tc27.draster.com/guestAuth/overview.html + - AppVeyor https://ci.appveyor.com/project/bkaradzic/bgfx + - TravisCI https://travis-ci.org/bkaradzic/bgfx Who is using it? ---------------- @@ -107,6 +112,9 @@ https://github.com/jpcy/ioq3-renderer-bgfx - A renderer for ioquake3 written in C++ and using bgfx to support multiple rendering APIs. ![ioq3-renderer-bgfx screenshot](https://camo.githubusercontent.com/052aa40c05120e56306294d3a1bb5f99f97de8c8/687474703a2f2f692e696d6775722e636f6d2f64364f6856594b2e6a7067) +http://makingartstudios.itch.io/dls - DLS the digital logic simulator game. +![dls-screenshot](https://img.itch.io/aW1hZ2UvMzk3MTgvMTc5MjQ4LnBuZw==/original/kA%2FQPb.png) + [Building](https://bkaradzic.github.io/bgfx/build.html) ------------------------------------------------------- diff --git a/3rdparty/bgfx/examples/02-metaballs/fs_metaballs.bin.h b/3rdparty/bgfx/examples/02-metaballs/fs_metaballs.bin.h index f26ec2830b7..694e76a6b0d 100644 --- a/3rdparty/bgfx/examples/02-metaballs/fs_metaballs.bin.h +++ b/3rdparty/bgfx/examples/02-metaballs/fs_metaballs.bin.h @@ -26,35 +26,36 @@ static const uint8_t fs_metaballs_glsl[398] = 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, // gl_FragColor = 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tmpvar_2;.}... }; -static const uint8_t fs_metaballs_dx9[429] = +static const uint8_t fs_metaballs_dx9[433] = { - 0x46, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x03, 0xff, 0xff, // FSH..,.?........ - 0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... + 0x46, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x00, 0x00, 0xa4, 0x01, 0x00, 0x03, 0xff, 0xff, // FSH..,.?........ + 0xfe, 0xff, 0x17, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh - 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9. - 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, 0x05, // 29.952.3111.Q... - 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0xf0, 0x41, 0xcd, 0xcc, 0x0c, 0x40, 0x2f, 0xba, 0xe8, 0x3e, // .......A...@/..> - 0x00, 0x00, 0x80, 0x3f, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, 0x90, // ...?............ - 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x07, 0x90, 0x08, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x01, 0x00, 0xe4, 0x90, 0x07, 0x00, 0x00, 0x02, // ................ - 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, // ................ - 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xaa, 0x90, 0x20, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, // ........ ....... - 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0xa0, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x80, // ................ - 0x00, 0x00, 0x00, 0x90, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x90, // ..............U. - 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x90, 0x05, 0x00, 0x00, 0x03, // ................ - 0x00, 0x00, 0x0e, 0x80, 0x02, 0x00, 0x90, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x0e, 0x00, 0x00, 0x02, // ..........U..... - 0x02, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, // ......U......... - 0x00, 0x00, 0xaa, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x00, 0x00, 0xff, 0x80, // ................ - 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x00, 0x00, 0x00, 0x81, // ................ - 0x01, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, // ................ - 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0f, 0x00, 0x00, 0x02, // ..........U..... - 0x01, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, // ................ - 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x01, 0x80, // ................ - 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, // ..............U. - 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x01, 0x00, 0x00, 0x02, // ................ - 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0xff, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. + 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, // ader Compiler 10 + 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // .0.10011.16384.. + 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0xf0, 0x41, 0xcd, 0xcc, 0x0c, 0x40, // Q..........A...@ + 0x2f, 0xba, 0xe8, 0x3e, 0x00, 0x00, 0x80, 0x3f, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, // /..>...?........ + 0x00, 0x00, 0x07, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x07, 0x90, // ................ + 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x01, 0x00, 0xe4, 0x90, // ................ + 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xaa, 0x90, 0x20, 0x00, 0x00, 0x03, // ............ ... + 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0xa0, 0x0f, 0x00, 0x00, 0x02, // ................ + 0x02, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x90, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x02, 0x80, // ................ + 0x00, 0x00, 0x55, 0x90, 0x0f, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x90, // ..U............. + 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0e, 0x80, 0x02, 0x00, 0x90, 0x80, 0x00, 0x00, 0x55, 0xa0, // ..............U. + 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, // ..........U..... + 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x02, 0x00, 0x04, 0x80, // ................ + 0x00, 0x00, 0xff, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xe4, 0x80, // ................ + 0x00, 0x00, 0x00, 0x81, 0x01, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, // ................ + 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, // ..............U. + 0x0f, 0x00, 0x00, 0x02, 0x01, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x05, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x0e, 0x00, 0x00, 0x02, // ................ + 0x00, 0x08, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x02, 0x80, // ................ + 0x00, 0x00, 0x55, 0x80, 0x0e, 0x00, 0x00, 0x02, 0x00, 0x08, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, // ..U............. + 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0xff, 0xa0, 0xff, 0xff, 0x00, 0x00, // ................ + 0x00, // . }; static const uint8_t fs_metaballs_dx11[660] = { diff --git a/3rdparty/bgfx/examples/02-metaballs/vs_metaballs.bin.h b/3rdparty/bgfx/examples/02-metaballs/vs_metaballs.bin.h index 70f3e56b654..1e35cc2394e 100644 --- a/3rdparty/bgfx/examples/02-metaballs/vs_metaballs.bin.h +++ b/3rdparty/bgfx/examples/02-metaballs/vs_metaballs.bin.h @@ -35,12 +35,12 @@ static const uint8_t vs_metaballs_glsl[537] = 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, // v_color0 = a_col 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // or0;.}... }; -static const uint8_t vs_metaballs_dx9[457] = +static const uint8_t vs_metaballs_dx9[461] = { 0x56, 0x53, 0x48, 0x04, 0x03, 0x2c, 0xf5, 0x3f, 0x02, 0x00, 0x07, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..,.?...u_mod 0x65, 0x6c, 0x04, 0x20, 0x04, 0x00, 0x03, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, // el. .....u_model - 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x98, 0x01, // ViewProj........ - 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2e, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, // ........CTAB.... + 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x9c, 0x01, // ViewProj........ + 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2f, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, // ....../.CTAB.... 0x83, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, // ................ 0x00, 0x91, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, // ....|...D....... 0x03, 0x00, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, // ....L........... @@ -51,21 +51,21 @@ static const uint8_t vs_metaballs_dx9[457] = 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, // ........vs_3_0.M 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, // icrosoft (R) HLS 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, // L Shader Compile - 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, // r 9.29.952.3111. - 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ - 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ - 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, // ................ - 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, // ................ - 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ................ - 0x01, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, // ......U......... - 0x00, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, // ................ - 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, // ................ - 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, // ................ - 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x05, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, // ..............U. - 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x04, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, // ................ - 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, 0xe0, 0x06, 0x00, 0xe4, 0xa0, // ................ - 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, // ................ - 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... + 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, // r 10.0.10011.163 + 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, // 84.............. + 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ + 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................ + 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x02, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, // ................ + 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, // ..........U..... + 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, // ................ + 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0xaa, 0x90, // ................ + 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, // ................ + 0x03, 0x00, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x05, 0x00, 0xe4, 0xa0, // ................ + 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x07, 0x80, 0x04, 0x00, 0xe4, 0xa0, // ..U............. + 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, 0xe0, // ................ + 0x06, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, // ................ + 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. }; static const uint8_t vs_metaballs_dx11[726] = { diff --git a/3rdparty/bgfx/examples/08-update/update.cpp b/3rdparty/bgfx/examples/08-update/update.cpp index 65045d383fd..8a5d851ba7c 100644 --- a/3rdparty/bgfx/examples/08-update/update.cpp +++ b/3rdparty/bgfx/examples/08-update/update.cpp @@ -240,7 +240,7 @@ public: , BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT ); - m_m_texture2dData = (uint8_t*)malloc(m_texture2dSize*m_texture2dSize*4); + m_texture2dData = (uint8_t*)malloc(m_texture2dSize*m_texture2dSize*4); m_rr = rand()%255; m_gg = rand()%255; @@ -255,13 +255,13 @@ public: virtual int shutdown() BX_OVERRIDE { - // m_m_texture2dData is managed from main thread, and it's passed to renderer + // m_texture2dData is managed from main thread, and it's passed to renderer // just as MemoryRef. At this point render might be using it. We must wait // previous frame to finish before we can free it. bgfx::frame(); // Cleanup. - free(m_m_texture2dData); + free(m_texture2dData); for (uint32_t ii = 0; ii < BX_COUNTOF(m_textures); ++ii) { @@ -380,7 +380,7 @@ public: const uint16_t tx = rand()%(m_texture2dSize-tw); const uint16_t ty = rand()%(m_texture2dSize-th); - uint8_t* dst = &m_m_texture2dData[(ty*m_texture2dSize+tx)*4]; + uint8_t* dst = &m_texture2dData[(ty*m_texture2dSize+tx)*4]; uint8_t* next = dst + pitch; // Using makeRef to pass texture memory without copying. @@ -537,7 +537,7 @@ public: return false; } - uint8_t* m_m_texture2dData; + uint8_t* m_texture2dData; uint32_t m_width; uint32_t m_height; diff --git a/3rdparty/bgfx/examples/09-hdr/hdr.cpp b/3rdparty/bgfx/examples/09-hdr/hdr.cpp index 14f6edca81b..047fb0aa565 100644 --- a/3rdparty/bgfx/examples/09-hdr/hdr.cpp +++ b/3rdparty/bgfx/examples/09-hdr/hdr.cpp @@ -205,7 +205,7 @@ class HDR : public entry::AppI m_mesh = meshLoad("meshes/bunny.bin"); m_fbtextures[0] = bgfx::createTexture2D(m_width, m_height, 1, bgfx::TextureFormat::BGRA8, BGFX_TEXTURE_RT|BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP); - m_fbtextures[1] = bgfx::createTexture2D(m_width, m_height, 1, bgfx::TextureFormat::D16, BGFX_TEXTURE_RT_BUFFER_ONLY); + m_fbtextures[1] = bgfx::createTexture2D(m_width, m_height, 1, bgfx::TextureFormat::D16, BGFX_TEXTURE_RT_WRITE_ONLY); m_fbh = bgfx::createFrameBuffer(BX_COUNTOF(m_fbtextures), m_fbtextures, true); m_lum[0] = bgfx::createFrameBuffer(128, 128, bgfx::TextureFormat::BGRA8); @@ -308,7 +308,7 @@ class HDR : public entry::AppI bgfx::destroyFrameBuffer(m_fbh); m_fbtextures[0] = bgfx::createTexture2D(m_width, m_height, 1, bgfx::TextureFormat::BGRA8, ( (msaa+1)<m_progDraw , s_renderStates[RenderState::Default] + , true ); // Bunny. @@ -2988,6 +2992,7 @@ int _main_(int _argc, char** _argv) , mtxBunny , *currentSmSettings->m_progDraw , s_renderStates[RenderState::Default] + , true ); // Hollow cube. @@ -2999,6 +3004,7 @@ int _main_(int _argc, char** _argv) , mtxHollowcube , *currentSmSettings->m_progDraw , s_renderStates[RenderState::Default] + , true ); // Cube. @@ -3010,6 +3016,7 @@ int _main_(int _argc, char** _argv) , mtxCube , *currentSmSettings->m_progDraw , s_renderStates[RenderState::Default] + , true ); // Trees. @@ -3023,6 +3030,7 @@ int _main_(int _argc, char** _argv) , mtxTrees[ii] , *currentSmSettings->m_progDraw , s_renderStates[RenderState::Default] + , true ); } diff --git a/3rdparty/bgfx/examples/17-drawstress/fs_drawstress.bin.h b/3rdparty/bgfx/examples/17-drawstress/fs_drawstress.bin.h index cf32868ff42..684132a061e 100644 --- a/3rdparty/bgfx/examples/17-drawstress/fs_drawstress.bin.h +++ b/3rdparty/bgfx/examples/17-drawstress/fs_drawstress.bin.h @@ -7,17 +7,17 @@ static const uint8_t fs_drawstress_glsl[89] = 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, // ragColor = v_col 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // or0;.}... }; -static const uint8_t fs_drawstress_dx9[137] = +static const uint8_t fs_drawstress_dx9[141] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I..|..... - 0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... + 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I........ + 0xfe, 0xff, 0x17, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh - 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9. - 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, // 29.952.3111..... - 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, // ................ - 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... + 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, // ader Compiler 10 + 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // .0.10011.16384.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, // ................ + 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. }; static const uint8_t fs_drawstress_dx11[260] = { diff --git a/3rdparty/bgfx/examples/17-drawstress/vs_drawstress.bin.h b/3rdparty/bgfx/examples/17-drawstress/vs_drawstress.bin.h index 27cb89d15c3..2a2fcef2ada 100644 --- a/3rdparty/bgfx/examples/17-drawstress/vs_drawstress.bin.h +++ b/3rdparty/bgfx/examples/17-drawstress/vs_drawstress.bin.h @@ -22,11 +22,11 @@ static const uint8_t vs_drawstress_glsl[325] = 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, // lor0 = a_color0; 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}... }; -static const uint8_t vs_drawstress_dx9[319] = +static const uint8_t vs_drawstress_dx9[323] = { 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....I...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB.. + 0x20, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // .......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -34,16 +34,17 @@ static const uint8_t vs_drawstress_dx9[319] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ....U........... - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ - 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... + 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ + 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_drawstress_dx11[510] = { diff --git a/3rdparty/bgfx/examples/27-terrain/terrain.cpp b/3rdparty/bgfx/examples/27-terrain/terrain.cpp index 32686a7746e..71ab88aa128 100644 --- a/3rdparty/bgfx/examples/27-terrain/terrain.cpp +++ b/3rdparty/bgfx/examples/27-terrain/terrain.cpp @@ -69,7 +69,7 @@ class Terrain : public entry::AppI m_debug = BGFX_DEBUG_TEXT; m_reset = BGFX_RESET_VSYNC; - bgfx::init(bgfx::RendererType::Direct3D11, args.m_pciId); + bgfx::init(args.m_type, args.m_pciId); bgfx::reset(m_width, m_height, m_reset); // Enable m_debug text. @@ -313,11 +313,11 @@ class Terrain : public entry::AppI // Raise/Lower and scale by brush power. height += (bx::fclamp(brushAttn * m_brush.m_power, 0.0, m_brush.m_power) * m_brush.m_raise) - ? 1.0 - : -1.0 + ? 1.0f + : -1.0f ; - m_terrain.m_heightMap[heightMapPos] = (uint8_t)bx::fclamp(height, 0.0, 255.0); + m_terrain.m_heightMap[heightMapPos] = (uint8_t)bx::fclamp(height, 0.0f, 255.0f); m_terrain.m_dirty = true; } } @@ -328,8 +328,8 @@ class Terrain : public entry::AppI float ray_clip[4]; ray_clip[0] = ( (2.0f * m_mouseState.m_mx) / m_width - 1.0f) * -1.0f; ray_clip[1] = ( (1.0f - (2.0f * m_mouseState.m_my) / m_height) ) * -1.0f; - ray_clip[2] = -1.0; - ray_clip[3] = 1.0; + ray_clip[2] = -1.0f; + ray_clip[3] = 1.0f; float invProjMtx[16]; bx::mtxInverse(invProjMtx, m_projMtx); @@ -436,13 +436,15 @@ class Terrain : public entry::AppI imguiEndScrollArea(); imguiEndFrame(); - // Update camera. - cameraUpdate(deltaTime, m_mouseState); - - bool leftMouseButtonDown = !!m_mouseState.m_buttons[entry::MouseButton::Left]; - if (leftMouseButtonDown) + if (!imguiMouseOverArea() ) { - mousePickTerrain(); + // Update camera. + cameraUpdate(deltaTime, m_mouseState); + + if (!!m_mouseState.m_buttons[entry::MouseButton::Left]) + { + mousePickTerrain(); + } } // Update terrain. diff --git a/3rdparty/bgfx/examples/common/aviwriter.h b/3rdparty/bgfx/examples/common/aviwriter.h index 79acd7e4df9..dad992ab595 100644 --- a/3rdparty/bgfx/examples/common/aviwriter.h +++ b/3rdparty/bgfx/examples/common/aviwriter.h @@ -26,7 +26,7 @@ struct AviWriter bool open(const char* _filePath, uint32_t _width, uint32_t _height, uint32_t _fps, bool _yflip) { - if (0 != m_writer->open(_filePath) ) + if (!bx::open(m_writer, _filePath) ) { return false; } @@ -36,7 +36,7 @@ struct AviWriter m_numFrames = 0; m_width = _width; m_height = _height; - + // Bgfx returns _yflip true for OpenGL since bottom left corner is 0, 0. In D3D top left corner // is 0, 0. DIB expect OpenGL style coordinates, so this is inverted logic for AVI writer. m_yflip = !_yflip; @@ -163,7 +163,7 @@ struct AviWriter m_writer->seek(m_lengthOffset, bx::Whence::Begin); bx::write(m_writer, m_numFrames); - m_writer->close(); + bx::close(m_writer); delete [] m_frame; m_frame = NULL; diff --git a/3rdparty/bgfx/examples/common/bgfx_utils.cpp b/3rdparty/bgfx/examples/common/bgfx_utils.cpp index cdec2abbdfc..9b03d3d70b9 100644 --- a/3rdparty/bgfx/examples/common/bgfx_utils.cpp +++ b/3rdparty/bgfx/examples/common/bgfx_utils.cpp @@ -24,7 +24,7 @@ namespace stl = tinystl; void* load(bx::FileReaderI* _reader, bx::AllocatorI* _allocator, const char* _filePath, uint32_t* _size) { - if (0 == bx::open(_reader, _filePath) ) + if (bx::open(_reader, _filePath) ) { uint32_t size = (uint32_t)bx::getSize(_reader); void* data = BX_ALLOC(_allocator, size); @@ -45,6 +45,7 @@ void* load(bx::FileReaderI* _reader, bx::AllocatorI* _allocator, const char* _fi { *_size = 0; } + return NULL; } @@ -60,7 +61,7 @@ void unload(void* _ptr) static const bgfx::Memory* loadMem(bx::FileReaderI* _reader, const char* _filePath) { - if (0 == bx::open(_reader, _filePath) ) + if (bx::open(_reader, _filePath) ) { uint32_t size = (uint32_t)bx::getSize(_reader); const bgfx::Memory* mem = bgfx::alloc(size+1); @@ -76,7 +77,7 @@ static const bgfx::Memory* loadMem(bx::FileReaderI* _reader, const char* _filePa static void* loadMem(bx::FileReaderI* _reader, bx::AllocatorI* _allocator, const char* _filePath, uint32_t* _size) { - if (0 == bx::open(_reader, _filePath) ) + if (bx::open(_reader, _filePath) ) { uint32_t size = (uint32_t)bx::getSize(_reader); void* data = BX_ALLOC(_allocator, size); @@ -408,7 +409,9 @@ struct Mesh bx::AllocatorI* allocator = entry::getAllocator(); uint32_t chunk; - while (4 == bx::read(_reader, chunk) ) + bx::Error err; + while (4 == bx::read(_reader, chunk, &err) + && err.isOk() ) { switch (chunk) { @@ -596,10 +599,14 @@ Mesh* meshLoad(bx::ReaderSeekerI* _reader) Mesh* meshLoad(const char* _filePath) { bx::FileReaderI* reader = entry::getFileReader(); - bx::open(reader, _filePath); - Mesh* mesh = meshLoad(reader); - bx::close(reader); - return mesh; + if (bx::open(reader, _filePath) ) + { + Mesh* mesh = meshLoad(reader); + bx::close(reader); + return mesh; + } + + return NULL; } void meshUnload(Mesh* _mesh) diff --git a/3rdparty/bgfx/examples/common/entry/entry_ios.mm b/3rdparty/bgfx/examples/common/entry/entry_ios.mm index e12c224e623..052c161abd4 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_ios.mm +++ b/3rdparty/bgfx/examples/common/entry/entry_ios.mm @@ -185,7 +185,7 @@ static void* m_device = NULL; } } #endif - + return [CAEAGLLayer class]; } @@ -197,15 +197,15 @@ static void* m_device = NULL; { return nil; } - + bgfx::PlatformData pd; pd.ndt = NULL; pd.nwh = self.layer; - pd.context = m_device; + pd.context = m_device; pd.backBuffer = NULL; pd.backBufferDS = NULL; bgfx::setPlatformData(pd); - + return self; } @@ -309,7 +309,7 @@ static void* m_device = NULL; [m_window setRootViewController:viewController]; [m_window makeKeyAndVisible]; - + [m_window makeKeyAndVisible]; //float scaleFactor = [[UIScreen mainScreen] scale]; // should use this, but ui is too small on ipad retina diff --git a/3rdparty/bgfx/examples/common/entry/entry_p.h b/3rdparty/bgfx/examples/common/entry/entry_p.h index 880f44123e4..502eed673ad 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_p.h +++ b/3rdparty/bgfx/examples/common/entry/entry_p.h @@ -14,7 +14,7 @@ #include // memcpy #ifndef ENTRY_CONFIG_USE_SDL -# define ENTRY_CONFIG_USE_SDL 0 +# define ENTRY_CONFIG_USE_SDL BX_PLATFORM_STEAMLINK #endif // ENTRY_CONFIG_USE_SDL #ifndef ENTRY_CONFIG_USE_GLFW diff --git a/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp b/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp index c5ab2c7d57a..2bff902302c 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_sdl.cpp @@ -11,13 +11,24 @@ # define SDL_MAIN_HANDLED #endif // BX_PLATFORM_WINDOWS +#include + #include + +BX_PRAGMA_DIAGNOSTIC_PUSH_CLANG() +BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG("-Wextern-c-compat") #include +BX_PRAGMA_DIAGNOSTIC_POP_CLANG() + #include +#if defined(None) // X11 defines this... +# undef None +#endif // defined(None) #include #include #include +#include #include #include @@ -74,6 +85,22 @@ namespace entry return GamepadAxis::Enum(s_translateGamepadAxis[_sdl]); } + struct AxisDpadRemap + { + Key::Enum first; + Key::Enum second; + }; + + static AxisDpadRemap s_axisDpad[] = + { + { Key::GamepadLeft, Key::GamepadRight }, + { Key::GamepadUp, Key::GamepadDown }, + { Key::None, Key::None }, + { Key::GamepadLeft, Key::GamepadRight }, + { Key::GamepadUp, Key::GamepadDown }, + { Key::None, Key::None }, + }; + struct GamepadSDL { GamepadSDL() @@ -91,17 +118,59 @@ namespace entry m_deadzone[GamepadAxis::RightZ] = 30; } - void create(int32_t _jid) + void create(const SDL_JoyDeviceEvent& _jev) { - m_controller = SDL_GameControllerOpen(_jid); + m_joystick = SDL_JoystickOpen(_jev.which); + SDL_Joystick* joystick = m_joystick; + m_jid = SDL_JoystickInstanceID(joystick); + } + + void create(const SDL_ControllerDeviceEvent& _cev) + { + m_controller = SDL_GameControllerOpen(_cev.which); SDL_Joystick* joystick = SDL_GameControllerGetJoystick(m_controller); m_jid = SDL_JoystickInstanceID(joystick); } + void update(EventQueue& _eventQueue, WindowHandle _handle, GamepadHandle _gamepad, GamepadAxis::Enum _axis, int32_t _value) + { + if (filter(_axis, &_value) ) + { + _eventQueue.postAxisEvent(_handle, _gamepad, _axis, _value); + + if (Key::None != s_axisDpad[_axis].first) + { + if (_value == 0) + { + _eventQueue.postKeyEvent(_handle, s_axisDpad[_axis].first, 0, false); + _eventQueue.postKeyEvent(_handle, s_axisDpad[_axis].second, 0, false); + } + else + { + _eventQueue.postKeyEvent(_handle + , 0 > _value ? s_axisDpad[_axis].first : s_axisDpad[_axis].second + , 0 + , true + ); + } + } + } + } + void destroy() { - SDL_GameControllerClose(m_controller); - m_controller = NULL; + if (NULL != m_controller) + { + SDL_GameControllerClose(m_controller); + m_controller = NULL; + } + + if (NULL != m_joystick) + { + SDL_JoystickClose(m_joystick); + m_joystick = NULL; + } + m_jid = INT32_MAX; } @@ -119,6 +188,7 @@ namespace entry int32_t m_value[GamepadAxis::Count]; int32_t m_deadzone[GamepadAxis::Count]; + SDL_Joystick* m_joystick; SDL_GameController* m_controller; // SDL_Haptic* m_haptic; SDL_JoystickID m_jid; @@ -326,7 +396,6 @@ namespace entry m_mte.m_argv = _argv; SDL_Init(0 - | SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER ); @@ -356,10 +425,18 @@ namespace entry WindowHandle defaultWindow = { 0 }; setWindowSize(defaultWindow, m_width, m_height, true); - SDL_RWops* rw = SDL_RWFromFile("gamecontrollerdb.txt", "rb"); - if (NULL != rw) + bx::CrtFileReader reader; + if (bx::open(&reader, "gamecontrollerdb.txt") ) { - SDL_GameControllerAddMappingsFromRW(rw, 1); + bx::AllocatorI* allocator = getAllocator(); + uint32_t size = (uint32_t)bx::getSize(&reader); + void* data = BX_ALLOC(allocator, size); + bx::read(&reader, data, size); + bx::close(&reader); + + SDL_GameControllerAddMapping( (char*)data); + + BX_FREE(allocator, data); } bool exit = false; @@ -477,6 +554,7 @@ namespace entry } } break; + case SDL_KEYUP: { const SDL_KeyboardEvent& kev = event.key; @@ -530,6 +608,18 @@ namespace entry } break; + case SDL_JOYAXISMOTION: + { + const SDL_JoyAxisEvent& jev = event.jaxis; + GamepadHandle handle = findGamepad(jev.which); + if (isValid(handle) ) + { + GamepadAxis::Enum axis = translateGamepadAxis(jev.axis); + m_gamepad[handle.idx].update(m_eventQueue, defaultWindow, handle, axis, jev.value); + } + } + break; + case SDL_CONTROLLERAXISMOTION: { const SDL_ControllerAxisEvent& aev = event.caxis; @@ -537,10 +627,23 @@ namespace entry if (isValid(handle) ) { GamepadAxis::Enum axis = translateGamepadAxis(aev.axis); - int32_t value = aev.value; - if (m_gamepad[handle.idx].filter(axis, &value) ) + m_gamepad[handle.idx].update(m_eventQueue, defaultWindow, handle, axis, aev.value); + } + } + break; + + case SDL_JOYBUTTONDOWN: + case SDL_JOYBUTTONUP: + { + const SDL_JoyButtonEvent& bev = event.jbutton; + GamepadHandle handle = findGamepad(bev.which); + + if (isValid(handle) ) + { + Key::Enum key = translateGamepad(bev.button); + if (Key::Count != key) { - m_eventQueue.postAxisEvent(defaultWindow, handle, axis, value); + m_eventQueue.postKeyEvent(defaultWindow, key, 0, event.type == SDL_JOYBUTTONDOWN); } } } @@ -562,14 +665,38 @@ namespace entry } break; - case SDL_CONTROLLERDEVICEADDED: + case SDL_JOYDEVICEADDED: { - const SDL_ControllerDeviceEvent& cev = event.cdevice; - GamepadHandle handle = { m_gamepadAlloc.alloc() }; if (isValid(handle) ) { - m_gamepad[handle.idx].create(cev.which); + const SDL_JoyDeviceEvent& jev = event.jdevice; + m_gamepad[handle.idx].create(jev); + m_eventQueue.postGamepadEvent(defaultWindow, handle, true); + } + } + break; + + case SDL_JOYDEVICEREMOVED: + { + const SDL_JoyDeviceEvent& jev = event.jdevice; + GamepadHandle handle = findGamepad(jev.which); + if (isValid(handle) ) + { + m_gamepad[handle.idx].destroy(); + m_gamepadAlloc.free(handle.idx); + m_eventQueue.postGamepadEvent(defaultWindow, handle, false); + } + } + break; + + case SDL_CONTROLLERDEVICEADDED: + { + GamepadHandle handle = { m_gamepadAlloc.alloc() }; + if (isValid(handle) ) + { + const SDL_ControllerDeviceEvent& cev = event.cdevice; + m_gamepad[handle.idx].create(cev); m_eventQueue.postGamepadEvent(defaultWindow, handle, true); } } diff --git a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp index 247bed44385..37f403ee480 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_windows.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_windows.cpp @@ -358,7 +358,7 @@ namespace entry s_translateKey[VK_HOME] = Key::Home; s_translateKey[VK_END] = Key::End; s_translateKey[VK_PRIOR] = Key::PageUp; - s_translateKey[VK_NEXT] = Key::PageUp; + s_translateKey[VK_NEXT] = Key::PageDown; s_translateKey[VK_SNAPSHOT] = Key::Print; s_translateKey[VK_OEM_PLUS] = Key::Plus; s_translateKey[VK_OEM_MINUS] = Key::Minus; diff --git a/3rdparty/bgfx/examples/common/entry/entry_x11.cpp b/3rdparty/bgfx/examples/common/entry/entry_x11.cpp index a058479fabb..8ced748dcbe 100644 --- a/3rdparty/bgfx/examples/common/entry/entry_x11.cpp +++ b/3rdparty/bgfx/examples/common/entry/entry_x11.cpp @@ -61,6 +61,23 @@ namespace entry GamepadAxis::RightZ, }; + struct AxisDpadRemap + { + Key::Enum first; + Key::Enum second; + }; + + static AxisDpadRemap s_axisDpad[] = + { + { Key::GamepadLeft, Key::GamepadRight }, + { Key::GamepadUp, Key::GamepadDown }, + { Key::None, Key::None }, + { Key::GamepadLeft, Key::GamepadRight }, + { Key::GamepadUp, Key::GamepadDown }, + { Key::None, Key::None }, + }; + BX_STATIC_ASSERT(BX_COUNTOF(s_translateAxis) == BX_COUNTOF(s_axisDpad) ); + struct Joystick { Joystick() @@ -135,6 +152,24 @@ namespace entry if (filter(axis, &value) ) { _eventQueue.postAxisEvent(defaultWindow, handle, axis, value); + + if (Key::None != s_axisDpad[axis].first) + { + if (m_value[axis] == 0) + { + _eventQueue.postKeyEvent(defaultWindow, s_axisDpad[axis].first, 0, false); + _eventQueue.postKeyEvent(defaultWindow, s_axisDpad[axis].second, 0, false); + } + else + { + _eventQueue.postKeyEvent(defaultWindow + , 0 > m_value[axis] ? s_axisDpad[axis].first : s_axisDpad[axis].second + , 0 + , true + ); + } + } + } } } diff --git a/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h b/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h index 69a3484dc65..4bf319a2ecf 100644 --- a/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h +++ b/3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h @@ -36,37 +36,38 @@ static const uint8_t fs_font_basic_glsl[553] = 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ragColor = tmpva 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r_4;.}... }; -static const uint8_t fs_font_basic_dx9[462] = +static const uint8_t fs_font_basic_dx9[466] = { 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xb0, 0x01, 0x00, 0x03, 0xff, // Color0.......... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xb4, 0x01, 0x00, 0x03, 0xff, // Color0.......... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // ........@...?... - 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, // ....?Q.......... - 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x1f, 0x00, 0x00, // ...........@.... - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, // ................ - 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, // ................ - 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, // ...U............ - 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, // .X.........U.... - 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ...U.X.......... - 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // .......U........ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // .........X...... - 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x42, 0x00, 0x00, // .............B.. - 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .............. + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, // .Q..........@... + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, // ?.......?Q...... + 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, // ...............@ + 0xc0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, // ................ + 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // .......U........ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, // .....X.........U + 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, // ................ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // .......U.X...... + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, // ...........U.... + 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, // .............X.. + 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, // ................ + 0xa0, 0x42, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, // .B.............. + 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, // ................ + 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, // ................ + 0x00, 0x00, // .. }; static const uint8_t fs_font_basic_dx11[617] = { diff --git a/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h b/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h index 030ec333753..9bd34a78a05 100644 --- a/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h +++ b/3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h @@ -65,56 +65,56 @@ static const uint8_t fs_font_distance_field_glsl[1019] = 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp 0x76, 0x61, 0x72, 0x5f, 0x39, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_9;.}... }; -static const uint8_t fs_font_distance_field_dx9[754] = +static const uint8_t fs_font_distance_field_dx9[758] = { 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd4, 0x02, 0x00, 0x03, 0xff, // Color0.......... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd8, 0x02, 0x00, 0x03, 0xff, // Color0.......... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // ........@...?... - 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, // ....?Q.......... - 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x51, 0x00, 0x00, // ...........@.Q.. - 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // ........A...?... - 0xc0, 0x00, 0x00, 0x40, 0x40, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ...@@........... - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // ................ - 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, // ...........U.... - 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, // .........X...... - 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, // ...U............ - 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, // ...........U.X.. - 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, // ...............U - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, // ................ - 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, // .X.............. - 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, // .....B.......... - 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xc6, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x80, 0x01, 0x00, 0x90, // ................ - 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x07, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // .......U........ - 0x80, 0x00, 0x00, 0x55, 0x80, 0x5b, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, // ...U.[.......... - 0x90, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, // ................ - 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x06, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, // ................ - 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, // ...U............ - 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0xa1, 0x02, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, // ...U.......U.... - 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, // .......U.......U - 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xaa, 0x81, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x05, 0x00, 0x00, // ...........U.... - 0x03, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, // .......U........ - 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0xff, // ................ - 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, // ...............U - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, // ................ - 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, // ................ - 0x00, 0x00, // .. + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, // .Q..........@... + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, // ?.......?Q...... + 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, // ...............@ + 0xc0, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, // .Q..........A... + 0x3f, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x40, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, // ?......@@....... + 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, // ................ + 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, // ................ + 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, // ...............U + 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, // .............X.. + 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, // .......U........ + 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, // ...............U + 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, // .X.............. + 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, // ...U............ + 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, // .....X.......... + 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, // .........B...... + 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ + 0x80, 0x01, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, // ................ + 0x80, 0x01, 0x00, 0x90, 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0e, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x00, 0x00, 0xf9, // ................ + 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x06, 0x00, 0x00, // ...........U.... + 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x5b, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, // .......U.[...... + 0x80, 0x01, 0x00, 0xe4, 0x90, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x04, 0x80, 0x01, 0x00, 0xe4, // ................ + 0x80, 0x01, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, // ................ + 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x04, 0x00, 0x00, // .......U........ + 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0xa1, 0x02, 0x00, 0x55, // .......U.......U + 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, // ...........U.... + 0xa0, 0x02, 0x00, 0x55, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xaa, // ...U............ + 0x81, 0x00, 0x00, 0xe4, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, // ...............U + 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x11, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, // ...........U.... + 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0xaa, // ................ + 0xa0, 0x02, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x55, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, // ...U............ + 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... }; static const uint8_t fs_font_distance_field_dx11[1053] = { diff --git a/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h b/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h index 46bdf5ab710..154481dc393 100644 --- a/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h +++ b/3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h @@ -81,65 +81,65 @@ static const uint8_t fs_font_distance_field_subpixel_glsl[1268] = 0x20, 0x2a, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2e, 0x77, 0x29, 0x3b, 0x0a, // * v_color0.w);. 0x7d, 0x0a, 0x0a, 0x00, // }... }; -static const uint8_t fs_font_distance_field_subpixel_dx9[902] = +static const uint8_t fs_font_distance_field_subpixel_dx9[906] = { 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x68, 0x03, 0x00, 0x03, 0xff, // Color0.....h.... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x6c, 0x03, 0x00, 0x03, 0xff, // Color0.....l.... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // ........@...?... - 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, // ....?Q.......... - 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0xc0, 0x51, 0x00, 0x00, // ...........@.Q.. - 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, // ...........@@... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x05, 0x03, 0x00, 0x0f, 0xa0, 0xc1, 0xaa, 0x2a, // .....Q.........* - 0x3e, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, // >...A...?....... - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x08, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, // ................ - 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, 0x90, 0x00, 0x00, 0x00, // ................ - 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, // ...U............ - 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0xaa, // .X.........U.... - 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ...U.X.......... - 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // .......U........ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // .........X...... - 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x5b, 0x00, 0x00, // .............[.. - 0x02, 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x04, 0x00, 0x00, 0x04, 0x02, 0x00, 0x07, // ................ - 0x80, 0x01, 0x00, 0xe4, 0x80, 0x03, 0x00, 0x00, 0xa1, 0x01, 0x00, 0xe4, 0x90, 0x42, 0x00, 0x00, // .............B.. - 0x03, 0x02, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, // ................ - 0x03, 0x02, 0x00, 0x01, 0x80, 0x02, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, // ................ - 0x04, 0x03, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x03, 0x00, 0x00, 0xa0, 0x01, 0x00, 0xe4, // ................ - 0x90, 0x08, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, // ................ - 0x80, 0x07, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, // ................ - 0x02, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x42, 0x00, 0x00, 0x03, 0x03, 0x00, 0x0f, // .........B...... - 0x80, 0x03, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x02, 0x00, 0x04, // ................ - 0x80, 0x03, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x02, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x02, 0x00, 0x02, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, // .......U........ - 0x80, 0x01, 0x00, 0xe4, 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x06, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, // ................ - 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x55, 0xa1, 0x03, 0x00, 0xaa, 0xa0, 0x04, 0x00, 0x00, // .......U........ - 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x55, 0xa0, 0x03, 0x00, 0xaa, // ...........U.... - 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x81, 0x00, 0x00, 0x00, // ...........U.... - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0e, 0x80, 0x00, 0x00, 0x55, 0x81, 0x02, 0x00, 0x90, // ...........U.... - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x02, 0x00, 0x55, 0x80, 0x00, 0x00, 0xff, // ...........U.... - 0x90, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x17, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xf9, 0x80, 0x04, 0x00, 0x00, // ................ - 0x04, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, // ...............U - 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, // ................ - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xff, // ................ - 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00, // .Q..........@... + 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, // ?.......?Q...... + 0xa0, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, // ...............@ + 0xc0, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x40, // .Q.............@ + 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x05, 0x03, 0x00, 0x0f, // @........Q...... + 0xa0, 0xc1, 0xaa, 0x2a, 0x3e, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, // ...*>...A...?... + 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x08, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0xff, // ................ + 0x90, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x55, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // .......U........ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x55, // .....X.........U + 0x81, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, // ................ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x81, 0x58, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, // .......U.X...... + 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xaa, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, // ...........U.... + 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x58, 0x00, 0x00, // .............X.. + 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x8c, 0x00, 0x00, 0xff, 0xa0, 0x00, 0x00, 0xaa, // ................ + 0xa0, 0x5b, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x04, 0x00, 0x00, // .[.............. + 0x04, 0x02, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x03, 0x00, 0x00, 0xa1, 0x01, 0x00, 0xe4, // ................ + 0x90, 0x42, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, // .B.............. + 0xa0, 0x09, 0x00, 0x00, 0x03, 0x02, 0x00, 0x01, 0x80, 0x02, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x04, 0x00, 0x00, 0x04, 0x03, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x03, 0x00, 0x00, // ................ + 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x08, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0xe4, // ................ + 0x80, 0x01, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, // ................ + 0x80, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x42, 0x00, 0x00, // .............B.. + 0x03, 0x03, 0x00, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, // ................ + 0x03, 0x02, 0x00, 0x04, 0x80, 0x03, 0x00, 0xc6, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x01, 0x80, 0x02, 0x00, 0xaa, 0x80, 0x02, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, // ................ + 0x03, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, // ...........U.... + 0x02, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xe4, 0x91, 0x5c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, // ................ + 0x80, 0x00, 0x00, 0xe4, 0x80, 0x08, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x00, 0x00, 0xe4, 0x80, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, // ................ + 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x55, 0xa1, 0x03, 0x00, 0xaa, // ...........U.... + 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x55, // ...............U + 0xa0, 0x03, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, // ...............U + 0x81, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0e, 0x80, 0x00, 0x00, 0x55, // ...............U + 0x81, 0x02, 0x00, 0x90, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x02, 0x00, 0x55, // ...............U + 0x80, 0x00, 0x00, 0xff, 0x90, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x17, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xf9, // ................ + 0x80, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, // ................ + 0xa0, 0x02, 0x00, 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, // ...U............ + 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x00, 0x00, 0xff, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... }; static const uint8_t fs_font_distance_field_subpixel_dx11[1305] = { diff --git a/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h b/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h index 5df95fa7cce..884743b9973 100644 --- a/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h +++ b/3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h @@ -28,11 +28,11 @@ static const uint8_t vs_font_basic_glsl[431] = 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // d0;. v_color0 = 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // a_color0;.}... }; -static const uint8_t vs_font_basic_dx9[335] = +static const uint8_t vs_font_basic_dx9[339] = { 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB.. + 0x30, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // 0.......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -40,17 +40,18 @@ static const uint8_t vs_font_basic_dx9[335] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, // ............U... - 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, // ................ - 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ + 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ + 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, // U............... + 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_font_basic_dx11[580] = { diff --git a/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h b/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h index 6fea18b931a..ebc7589c408 100644 --- a/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h +++ b/3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h @@ -28,11 +28,11 @@ static const uint8_t vs_font_distance_field_glsl[431] = 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // d0;. v_color0 = 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // a_color0;.}... }; -static const uint8_t vs_font_distance_field_dx9[335] = +static const uint8_t vs_font_distance_field_dx9[339] = { 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB.. + 0x30, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // 0.......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -40,17 +40,18 @@ static const uint8_t vs_font_distance_field_dx9[335] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, // ............U... - 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, // ................ - 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ + 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ + 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, // U............... + 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_font_distance_field_dx11[580] = { diff --git a/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h b/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h index bd885e453e3..6b0d75236d6 100644 --- a/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h +++ b/3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h @@ -28,11 +28,11 @@ static const uint8_t vs_font_distance_field_subpixel_glsl[431] = 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // d0;. v_color0 = 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // a_color0;.}... }; -static const uint8_t vs_font_distance_field_subpixel_dx9[335] = +static const uint8_t vs_font_distance_field_subpixel_dx9[339] = { 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH........u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x2c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ,.......#.CTAB.. + 0x30, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // 0.......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -40,17 +40,18 @@ static const uint8_t vs_font_distance_field_subpixel_dx9[335] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0xe0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, // ............U... - 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, // ................ - 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ + 0x0f, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ + 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, // U............... + 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0f, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_font_distance_field_subpixel_dx11[580] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h index 611a46bc560..d64b2bdf7ca 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h @@ -7,17 +7,17 @@ static const uint8_t fs_imgui_color_glsl[89] = 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, // ragColor = v_col 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // or0;.}... }; -static const uint8_t fs_imgui_color_dx9[137] = +static const uint8_t fs_imgui_color_dx9[141] = { - 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I..|..... - 0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... + 0x46, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I........ + 0xfe, 0xff, 0x17, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#... 0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................ 0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh - 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9. - 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, // 29.952.3111..... - 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, // ................ - 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ......... + 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, // ader Compiler 10 + 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, // .0.10011.16384.. + 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, // ................ + 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. }; static const uint8_t fs_imgui_color_dx11[260] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h index 265aef506c1..f274ada3d9c 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h @@ -24,12 +24,12 @@ static const uint8_t fs_imgui_cubemap_glsl[363] = 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_1;.}... }; -static const uint8_t fs_imgui_cubemap_dx9[390] = +static const uint8_t fs_imgui_cubemap_dx9[394] = { 0x46, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH....e...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... - 0x00, 0x01, 0x00, 0x50, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, // ...P.......0.CTA + 0x00, 0x01, 0x00, 0x54, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x31, 0x00, 0x43, 0x54, 0x41, // ...T.......1.CTA 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, // B............... 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .............D.. 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... @@ -40,17 +40,17 @@ static const uint8_t fs_imgui_cubemap_dx9[390] = 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // ed.............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x01, 0x00, 0x0f, 0xa0, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x00, 0x00, 0x00, // .......L?..L>... - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x00, 0x00, 0x07, // ................ - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, // ................ - 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, // ....._.......... - 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, // ...........U.... - 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x55, // .......U.......U - 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, // .Q.........L?..L + 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, // >............... + 0x80, 0x00, 0x00, 0x07, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, // ................ + 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ........._...... + 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, // ................ + 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, // ...............U + 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, // ...........U.... + 0xa0, 0x01, 0x00, 0x55, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ...U...... }; static const uint8_t fs_imgui_cubemap_dx11[441] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h index 8496e53c794..618848fa5a1 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h @@ -24,12 +24,12 @@ static const uint8_t fs_imgui_image_glsl[360] = 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // agColor = tmpvar 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _1;.}... }; -static const uint8_t fs_imgui_image_dx9[394] = +static const uint8_t fs_imgui_image_dx9[398] = { 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... - 0x00, 0x01, 0x00, 0x54, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, // ...T.......0.CTA + 0x00, 0x01, 0x00, 0x58, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x31, 0x00, 0x43, 0x54, 0x41, // ...X.......1.CTA 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, // B............... 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .............D.. 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... @@ -40,17 +40,17 @@ static const uint8_t fs_imgui_image_dx9[394] = 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // ed.............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, // ........?......L - 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, // ?..L>........... - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xc4, 0x90, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ........._...... - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0x80, 0x01, 0x00, 0xe4, // ................ - 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, // ...........U.... - 0x80, 0x00, 0x00, 0xff, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, // .Q..........?... + 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ...L?..L>....... + 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, // ................ + 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x01, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xc4, // ................ + 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, // ............._.. + 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, // ................ + 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, // ...............U + 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0xff, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // .............. }; static const uint8_t fs_imgui_image_dx11[445] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h index 237bdb1e10c..593de84d168 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h @@ -28,13 +28,13 @@ static const uint8_t fs_imgui_image_swizz_glsl[425] = 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ragColor = tmpva 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // r_1;.}... }; -static const uint8_t fs_imgui_image_swizz_dx9[458] = +static const uint8_t fs_imgui_image_swizz_dx9[462] = { 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x03, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... 0x00, 0x01, 0x00, 0x09, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, 0x6c, 0x65, 0x12, 0x01, 0x01, // ....u_swizzle... - 0x00, 0x01, 0x00, 0x84, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x38, 0x00, 0x43, 0x54, 0x41, // ...........8.CTA + 0x00, 0x01, 0x00, 0x88, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x39, 0x00, 0x43, 0x54, 0x41, // ...........9.CTA 0x42, 0x1c, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x03, 0x00, 0x00, // B............... 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0xa2, 0x00, 0x00, 0x00, 0x58, 0x00, 0x00, // .............X.. 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........d...... @@ -47,18 +47,18 @@ static const uint8_t fs_imgui_image_swizz_dx9[458] = 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x73, 0x77, 0x69, 0x7a, 0x7a, // .........u_swizz 0x6c, 0x65, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // le.ps_3_0.Micros 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha - 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, // der Compiler 9.2 - 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0x51, 0x00, 0x00, // 9.952.3111...Q.. - 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xcd, 0xcc, 0x4c, // ........?......L - 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, // ?..L>........... - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xc4, 0x90, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ........._...... - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, // ................ - 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, // ...............U - 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, // ................ - 0x80, 0x00, 0x00, 0x40, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ...@...... + 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, // der Compiler 10. + 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0xab, // 0.10011.16384... + 0xab, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, // .Q..........?... + 0x00, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ...L?..L>....... + 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, // ................ + 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x07, 0x80, 0x02, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0xc4, // ................ + 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, // ............._.. + 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x09, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x0c, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, // ................ + 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0xff, 0x80, 0x01, 0x00, 0x00, // ...U............ + 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0x40, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // .......@...... }; static const uint8_t fs_imgui_image_swizz_dx11[493] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h index 5a54b079fe2..14d7aef3e0b 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h @@ -42,12 +42,12 @@ static const uint8_t fs_imgui_latlong_glsl[651] = 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, // _FragColor = tmp 0x76, 0x61, 0x72, 0x5f, 0x34, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // var_4;.}... }; -static const uint8_t fs_imgui_latlong_dx9[554] = +static const uint8_t fs_imgui_latlong_dx9[558] = { 0x46, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x02, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH.o.><...s_tex 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, 0x69, 0x6d, // Color0......u_im 0x61, 0x67, 0x65, 0x4c, 0x6f, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x01, 0x00, // ageLodEnabled... - 0x00, 0x01, 0x00, 0xf4, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x30, 0x00, 0x43, 0x54, 0x41, // ...........0.CTA + 0x00, 0x01, 0x00, 0xf8, 0x01, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x31, 0x00, 0x43, 0x54, 0x41, // ...........1.CTA 0x42, 0x1c, 0x00, 0x00, 0x00, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x02, 0x00, 0x00, // B............... 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, // .............D.. 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .........P...... @@ -58,27 +58,27 @@ static const uint8_t fs_imgui_latlong_dx9[554] = 0x65, 0x64, 0x00, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // ed.............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q.. - 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x3f, 0xdb, 0x0f, 0xc9, 0x40, 0xdb, 0x0f, 0x49, // ........?...@..I - 0xc0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0xcd, 0xcc, 0x4c, // .....Q.........L - 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, // ?..L>........... - 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, // ................ - 0xa0, 0x00, 0x00, 0x00, 0x90, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x55, // ...............U - 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, // .....%.......... - 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0x90, 0x01, 0x00, 0x00, // ...........U.... - 0xa0, 0x01, 0x00, 0x00, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ - 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x55, // ...............U - 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, // .....%.......... - 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x05, 0x80, 0x01, 0x00, 0xc5, 0x80, 0x02, 0x00, 0x55, // ...............U - 0x81, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x02, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, // ................ - 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ........._...... - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, // ................ - 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, // ...............U - 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, 0x00, // ...........U.... - 0xa0, 0x02, 0x00, 0x55, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ...U...... + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x3f, 0xdb, 0x0f, 0xc9, // .Q..........?... + 0x40, 0xdb, 0x0f, 0x49, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, // @..I.....Q...... + 0xa0, 0xcd, 0xcc, 0x4c, 0x3f, 0xcd, 0xcc, 0x4c, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ...L?..L>....... + 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x00, 0x98, 0x00, 0x08, 0x0f, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, // ................ + 0x80, 0x01, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, // ................ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x01, 0x00, 0x55, 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, // ...U.....%...... + 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, // ...............U + 0x90, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, 0x00, 0xa0, 0x13, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, // ................ + 0x80, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x01, 0x00, 0x55, 0xa0, 0x01, 0x00, 0xaa, 0xa0, 0x25, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, // ...U.....%...... + 0x80, 0x00, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x05, 0x80, 0x01, 0x00, 0xc5, // ................ + 0x80, 0x02, 0x00, 0x55, 0x81, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, 0x80, 0x02, 0x00, 0x00, // ...U............ + 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x5f, 0x00, 0x00, // ............._.. + 0x03, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x02, // ................ + 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x55, // ...U...........U + 0x80, 0x02, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x55, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // .......U...... }; static const uint8_t fs_imgui_latlong_dx11[617] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h index 08d722db698..5fc0768dd13 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h @@ -20,25 +20,25 @@ static const uint8_t fs_imgui_texture_glsl[290] = 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, // r = tmpvar_1;.}. 0x0a, 0x00, // .. }; -static const uint8_t fs_imgui_texture_dx9[258] = +static const uint8_t fs_imgui_texture_dx9[262] = { 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xe4, 0x00, 0x00, 0x03, 0xff, // Color0.......... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xe8, 0x00, 0x00, 0x03, 0xff, // Color0.......... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo 0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, // .29.952.3111.... - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, // ................ - 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, // .B.............. - 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xff, // ................ - 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, // ................ - 0x00, 0x00, // .. + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, // .....B.......... + 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x08, 0x80, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0xff, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x07, 0x80, 0x00, 0x00, 0xe4, // ................ + 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... }; static const uint8_t fs_imgui_texture_dx11[421] = { diff --git a/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h b/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h index ed79a9399c5..bbfafdf88d5 100644 --- a/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h @@ -16,10 +16,10 @@ static const uint8_t fs_ocornut_imgui_glsl[238] = 0x20, 0x3d, 0x20, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x2a, 0x20, 0x76, // = (tmpvar_1 * v 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _color0);.}... }; -static const uint8_t fs_ocornut_imgui_dx9[237] = +static const uint8_t fs_ocornut_imgui_dx9[241] = { 0x46, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex - 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd4, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x21, 0x00, // 0.............!. + 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0xd8, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x22, 0x00, // 0.............". 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, // CTAB....O....... 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, // ............H... 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x38, 0x00, 0x00, 0x00, // 0...........8... @@ -27,12 +27,13 @@ static const uint8_t fs_ocornut_imgui_dx9[237] = 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, // ............ps_3 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, // _0.Microsoft (R) 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, // HLSL Shader Com - 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, // piler 9.29.952.3 - 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, // 111............. - 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................ - 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ........B....... - 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x08, 0x0f, 0x80, // ................ - 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............. + 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, // piler 10.0.10011 + 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, // .16384.......... + 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0x90, // ................ + 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, // ............B... + 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, // ................ + 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, // ................ + 0x00, // . }; static const uint8_t fs_ocornut_imgui_dx11[396] = { diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h index 4867ea1a86c..1b8aa95fb28 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h @@ -22,27 +22,27 @@ static const uint8_t vs_imgui_color_glsl[324] = 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, // or0 = a_color0;. 0x7d, 0x0a, 0x0a, 0x00, // }... }; -static const uint8_t vs_imgui_color_dx9[290] = +static const uint8_t vs_imgui_color_dx9[294] = { 0x56, 0x53, 0x48, 0x04, 0xa4, 0x8b, 0xef, 0x49, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH....I...u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0x00, 0x03, 0xfe, // wProj........... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x08, 0x01, 0x00, 0x03, 0xfe, // wProj........... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .<.......u_viewP 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // roj............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....vs_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, // .29.952.3111.... - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ................ - 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, // ...........U.... - 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, // ................ - 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, // ................ - 0x00, 0x00, // .. + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, // ................ + 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, // ...............U + 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, // ................ + 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... }; static const uint8_t vs_imgui_color_dx11[465] = { diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h index 6467376b5a7..154c4e416e3 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h @@ -22,11 +22,11 @@ static const uint8_t vs_imgui_cubemap_glsl[329] = 0x72, 0x6d, 0x61, 0x6c, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x2e, // rmal = a_normal. 0x78, 0x79, 0x7a, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // xyz;.}... }; -static const uint8_t vs_imgui_cubemap_dx9[319] = +static const uint8_t vs_imgui_cubemap_dx9[323] = { 0x56, 0x53, 0x48, 0x04, 0xe3, 0xc2, 0x5c, 0x65, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH....e...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB.. + 0x20, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // .......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -34,16 +34,17 @@ static const uint8_t vs_imgui_cubemap_dx9[319] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, // ................ - 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ....U........... - 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ - 0x00, 0x02, 0x01, 0x00, 0x07, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x03, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x03, 0x00, 0x00, 0x80, 0x01, 0x00, 0x07, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... + 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xaa, 0x90, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ + 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x07, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_imgui_cubemap_dx11[510] = { diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h index b34b38c4122..f3711052b08 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h @@ -22,27 +22,27 @@ static const uint8_t vs_imgui_image_glsl[336] = 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x61, // v_texcoord0 = a 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _texcoord0;.}... }; -static const uint8_t vs_imgui_image_dx9[290] = +static const uint8_t vs_imgui_image_dx9[294] = { 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH.o.><...u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x04, 0x01, 0x00, 0x03, 0xfe, // wProj........... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x08, 0x01, 0x00, 0x03, 0xfe, // wProj........... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .<.......u_viewP 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // roj............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....vs_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, // .29.952.3111.... - 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ................ - 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, // ................ - 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, // ...........U.... - 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, // ................ - 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, // ................ - 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, // ................ - 0x00, 0x00, // .. + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ + 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, // ................ + 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, // ...............U + 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, // ................ + 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, // ................ + 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, // ................ + 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... }; static const uint8_t vs_imgui_image_dx11[473] = { diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h index 8b84198ba33..4cf8bb28af7 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h @@ -23,11 +23,11 @@ static const uint8_t vs_imgui_latlong_glsl[337] = 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, // a_texcoord0;.}.. 0x00, // . }; -static const uint8_t vs_imgui_latlong_dx9[319] = +static const uint8_t vs_imgui_latlong_dx9[323] = { 0x56, 0x53, 0x48, 0x04, 0x6f, 0x1e, 0x3e, 0x3c, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH.o.><...u_mod 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, // elViewProj...... - 0x1c, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // ........#.CTAB.. + 0x20, 0x01, 0x00, 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, // .......$.CTAB.. 0x00, 0x00, 0x57, 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, // ..W............. 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, // ......P...0..... 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, // ......@.......u_ @@ -35,16 +35,17 @@ static const uint8_t vs_imgui_latlong_dx9[319] = 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, // ..............vs 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, // _3_0.Microsoft ( 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, // R) HLSL Shader C - 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, // ompiler 9.29.952 - 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, // .3111........... - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, // ................ - 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, // ....U........... - 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................ - 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ - 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, // ompiler 10.0.100 + 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, 0xab, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // 11.16384........ + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... + 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, // ................ + 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xaa, 0x90, 0x00, 0x00, // ................ + 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, // ................ + 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_imgui_latlong_dx11[518] = { diff --git a/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h index a5c839c5c08..34ab3e2da96 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h @@ -28,29 +28,29 @@ static const uint8_t vs_imgui_texture_glsl[419] = 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, // r0 = a_color0;.} 0x0a, 0x0a, 0x00, // ... }; -static const uint8_t vs_imgui_texture_dx9[326] = +static const uint8_t vs_imgui_texture_dx9[330] = { 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x28, 0x01, 0x00, 0x03, 0xfe, // wProj......(.... - 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S.. + 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x01, 0x00, 0x00, 0x04, 0x00, 0x2c, 0x01, 0x00, 0x03, 0xfe, // wProj......,.... + 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...#.CTAB....S.. 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................ 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, // .L...0.......... 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, 0x50, // .<.......u_viewP 0x72, 0x6f, 0x6a, 0x00, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, // roj............. 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....vs_3_0.Micr 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S - 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9 - 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, // .29.952.3111.... - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................ - 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, // ................ - 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, // ................ - 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ - 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, // ................ - 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0xe4, // ...U............ - 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ................ - 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, // ................ - 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, // ................ - 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ...... + 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, // hader Compiler 1 + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, 0x00, // 0.0.10011.16384. + 0xab, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, // ................ + 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ................ + 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, // ................ + 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, // ................ + 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, // .......U........ + 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, // ................ + 0x03, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, // ................ + 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, // ................ + 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .......... }; static const uint8_t vs_imgui_texture_dx11[575] = { diff --git a/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h b/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h index ba968aaa2a6..81ed318597a 100644 --- a/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h +++ b/3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h @@ -34,11 +34,11 @@ static const uint8_t vs_ocornut_imgui_glsl[523] = 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, 0x61, 0x5f, 0x63, // v_color0 = a_c 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // olor0;.}... }; -static const uint8_t vs_ocornut_imgui_dx9[367] = +static const uint8_t vs_ocornut_imgui_dx9[371] = { 0x56, 0x53, 0x48, 0x04, 0x01, 0x83, 0xf2, 0xe1, 0x01, 0x00, 0x0b, 0x75, 0x5f, 0x76, 0x69, 0x65, // VSH........u_vie - 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x50, 0x01, 0x00, 0x03, // wTexel......P... - 0xfe, 0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, // ....".CTAB....S. + 0x77, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x54, 0x01, 0x00, 0x03, // wTexel......T... + 0xfe, 0xff, 0xfe, 0xff, 0x23, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, // ....#.CTAB....S. 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, // ................ 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, // ..L...0......... 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x76, 0x69, 0x65, 0x77, // ..<.......u_view @@ -46,19 +46,20 @@ static const uint8_t vs_ocornut_imgui_dx9[367] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // ......vs_3_0.Mic 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler - 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, // 9.29.952.3111.Q. - 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, // .........@...... - 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, // .?.............. - 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ - 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ - 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x05, 0x00, // ................ - 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x04, 0x00, // ................ - 0x00, 0x04, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0xa0, 0x01, 0x00, // ................ - 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, // U...........U... - 0x00, 0xa1, 0x01, 0x00, 0xaa, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0xe0, 0x01, 0x00, // ................ - 0xb4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, // ................ - 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ............... + 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, // 10.0.10011.16384 + 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, // ..Q..........@.. + 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // .....?.......... + 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, // ................ + 0x00, 0x80, 0x01, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, // ................ + 0x03, 0xe0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, // ................ + 0xe4, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, // ................ + 0x00, 0xa0, 0x01, 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00, // ....U........... + 0x55, 0x80, 0x01, 0x00, 0x00, 0xa1, 0x01, 0x00, 0xaa, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, // U............... + 0x0c, 0xe0, 0x01, 0x00, 0xb4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x00, 0x00, // ................ + 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................ + 0x00, 0x00, 0x00, // ... }; static const uint8_t vs_ocornut_imgui_dx11[612] = { diff --git a/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h b/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h index f2de36d49ad..c7ed6294e86 100644 --- a/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h +++ b/3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h @@ -195,7 +195,7 @@ static const uint8_t fs_nanovg_fill_glsl[3095] = 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, // gColor = result_ 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // 1;.}... }; -static const uint8_t fs_nanovg_fill_dx9[1543] = +static const uint8_t fs_nanovg_fill_dx9[1547] = { 0x46, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x08, 0x00, 0x05, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH........s_tex 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x0e, 0x75, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x74, 0x52, // 0......u_extentR @@ -206,8 +206,8 @@ static const uint8_t fs_nanovg_fill_dx9[1543] = 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x01, 0x0a, 0x00, 0x01, 0x00, 0x11, 0x75, 0x5f, // _params.......u_ 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x45, 0x78, 0x74, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x12, // scissorExtScale. 0x01, 0x08, 0x00, 0x01, 0x00, 0x0c, 0x75, 0x5f, 0x73, 0x63, 0x69, 0x73, 0x73, 0x6f, 0x72, 0x4d, // ......u_scissorM - 0x61, 0x74, 0x13, 0x01, 0x00, 0x00, 0x03, 0x00, 0x6c, 0x05, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, // at......l....... - 0x63, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x57, 0x01, 0x00, 0x00, 0x00, 0x03, // c.CTAB....W..... + 0x61, 0x74, 0x13, 0x01, 0x00, 0x00, 0x03, 0x00, 0x70, 0x05, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, // at......p....... + 0x64, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x57, 0x01, 0x00, 0x00, 0x00, 0x03, // d.CTAB....W..... 0xff, 0xff, 0x08, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, 0x50, 0x01, // ..............P. 0x00, 0x00, 0xbc, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0xc4, 0x00, // ................ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x01, 0x00, // ................ @@ -231,69 +231,69 @@ static const uint8_t fs_nanovg_fill_dx9[1543] = 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // orMat.ps_3_0.Mic 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler - 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, // 9.29.952.3111.Q. - 0x00, 0x05, 0x0b, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, // .........?...@.. - 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x0c, 0x00, 0x0f, 0xa0, 0x00, 0x00, // .....?Q......... - 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, // .....?..@@...... - 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................ - 0x01, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, 0x00, 0x08, // ................ - 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, 0x00, 0x90, 0x0b, 0x00, // ................ - 0x55, 0xa0, 0x0b, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, // U............... - 0x00, 0x8c, 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, // ................ - 0x00, 0x80, 0x0a, 0x00, 0x55, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, // ....U........... - 0x00, 0x80, 0x0b, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, // ................ - 0x55, 0x90, 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, // U............... - 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x04, 0x00, // ................ - 0xd0, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x80, 0x03, 0x00, // ....U........... - 0xd0, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ - 0x06, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0xd0, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ - 0x01, 0x80, 0x09, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x80, 0x09, 0x00, // ................ - 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x80, 0x00, 0x00, 0xe9, 0x80, 0x01, 0x00, // U............... - 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0c, 0x80, 0x01, 0x00, 0x44, 0xa0, 0x00, 0x00, // ............D... - 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0c, 0x80, 0x00, 0x00, 0x44, 0xa0, 0x00, 0x00, // U...........D... - 0x00, 0x90, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0c, 0x80, 0x01, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x44, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0c, 0x80, 0x01, 0x00, // ....D........... - 0xe4, 0x8b, 0x08, 0x00, 0x44, 0xa1, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x07, 0x80, 0x0b, 0x00, // ....D........... - 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x1c, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x08, 0x00, // ................ - 0xe4, 0xa1, 0x02, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x08, 0x80, 0x01, 0x00, // ................ - 0xff, 0x80, 0x01, 0x00, 0xaa, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, // ................ - 0xff, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x04, 0x80, 0x02, 0x00, // ................ - 0xaa, 0x80, 0x0a, 0x00, 0xff, 0xa0, 0x23, 0x00, 0x00, 0x02, 0x02, 0x00, 0x0c, 0x80, 0x0a, 0x00, // ......#......... - 0xb4, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x03, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x00, 0x08, // ..B............. - 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x0f, 0x80, 0x03, 0x00, 0x00, 0x80, 0x0c, 0x00, // ................ - 0x40, 0xa0, 0x0c, 0x00, 0x15, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x03, 0x00, 0x0f, 0x80, 0x02, 0x00, // @.....X......... - 0xff, 0x81, 0x03, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xff, 0x80, 0x29, 0x00, 0x02, 0x02, 0x0a, 0x00, // ..........)..... - 0xff, 0xa0, 0x02, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0x02, 0x04, 0x00, 0x0f, 0x80, 0x0b, 0x00, // ....U........... - 0xff, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, 0x04, 0x80, 0x0c, 0x00, // ..*............. - 0xaa, 0xa0, 0x29, 0x00, 0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, 0x05, 0x00, 0xaa, 0x80, 0x42, 0x00, // ..)...........B. - 0x00, 0x03, 0x05, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, 0xe4, 0xa0, 0x04, 0x00, // ................ - 0x00, 0x04, 0x06, 0x00, 0x0f, 0x80, 0x05, 0x00, 0x00, 0x80, 0x0c, 0x00, 0x40, 0xa0, 0x0c, 0x00, // ............@... - 0x15, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x05, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xff, 0x81, 0x05, 0x00, // ..X............. - 0xe4, 0x80, 0x06, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x05, 0x00, 0x08, 0x80, 0x00, 0x00, // ................ - 0xff, 0x80, 0x05, 0x00, 0xff, 0x80, 0x05, 0x00, 0x00, 0x03, 0x04, 0x00, 0x0f, 0x80, 0x05, 0x00, // ................ - 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x04, 0x00, // ......*......... - 0x0f, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x2b, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x58, 0x00, // ......+...+...X. - 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xaa, 0x8c, 0x03, 0x00, 0xe4, 0x80, 0x04, 0x00, // ................ - 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0a, 0x80, 0x09, 0x00, 0xaa, 0xa1, 0x09, 0x00, // ................ - 0x60, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, 0xe4, 0x8b, 0x02, 0x00, // `............... - 0xf4, 0x81, 0x0b, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0a, 0x80, 0x00, 0x00, 0xa4, 0x80, 0x0c, 0x00, // ................ - 0x00, 0xa0, 0x5a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x80, 0x02, 0x00, 0xed, 0x80, 0x02, 0x00, // ..Z............. - 0xed, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, // ................ - 0xff, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x0b, 0x00, // ................ - 0x00, 0x03, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x0a, 0x00, // ........U....... - 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x02, 0x00, 0x55, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x02, 0x00, // ........U....... - 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x55, 0x80, 0x02, 0x00, // ............U... - 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x09, 0x00, 0xaa, 0xa1, 0x04, 0x00, // ........U....... - 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x0a, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x80, 0x00, 0x00, // ................ - 0x55, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x0a, 0x00, 0x00, 0xa0, 0x05, 0x00, // U............... - 0x00, 0x03, 0x00, 0x00, 0x12, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0x55, 0x80, 0x01, 0x00, // ............U... - 0x00, 0x02, 0x03, 0x00, 0x0f, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x03, 0x00, // ................ - 0x0f, 0x80, 0x03, 0x00, 0xe4, 0x81, 0x07, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x03, 0x00, // ................ - 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x05, 0x00, // ....U........... - 0x00, 0x03, 0x03, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xff, 0x80, 0x58, 0x00, // ..............X. - 0x00, 0x04, 0x00, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xaa, 0x81, 0x03, 0x00, 0xe4, 0x80, 0x01, 0x00, // ................ - 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ....... + 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, // 10.0.10011.16384 + 0x00, 0xab, 0x51, 0x00, 0x00, 0x05, 0x0b, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, // ..Q..........?.. + 0x00, 0x40, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x51, 0x00, 0x00, 0x05, 0x0c, 0x00, // .@.......?Q..... + 0x0f, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, // .........?..@@.. + 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x03, 0x90, 0x1f, 0x00, // ................ + 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0x80, 0x01, 0x00, // ................ + 0x00, 0x90, 0x0b, 0x00, 0x55, 0xa0, 0x0b, 0x00, 0xaa, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ....U........... + 0x01, 0x80, 0x00, 0x00, 0x00, 0x8c, 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x55, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x01, 0x00, // ........U....... + 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x0b, 0x00, 0xff, 0xa0, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x01, 0x80, 0x01, 0x00, 0x55, 0x90, 0x0b, 0x00, 0xff, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ....U........... + 0x01, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x06, 0x80, 0x04, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ........U....... + 0x06, 0x80, 0x03, 0x00, 0xd0, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, // ................ + 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x05, 0x00, 0xd0, 0xa0, 0x06, 0x00, // ................ + 0x00, 0x02, 0x01, 0x00, 0x01, 0x80, 0x09, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x01, 0x00, // ................ + 0x02, 0x80, 0x09, 0x00, 0x55, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x03, 0x80, 0x00, 0x00, // ....U........... + 0xe9, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0c, 0x80, 0x01, 0x00, // ................ + 0x44, 0xa0, 0x00, 0x00, 0x55, 0x90, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0c, 0x80, 0x00, 0x00, // D...U........... + 0x44, 0xa0, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, // D............... + 0x0c, 0x80, 0x01, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x44, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, // ........D....... + 0x0c, 0x80, 0x01, 0x00, 0xe4, 0x8b, 0x08, 0x00, 0x44, 0xa1, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, // ........D....... + 0x07, 0x80, 0x0b, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x01, 0x00, 0x1c, 0x80, 0x01, 0x00, // ................ + 0xe4, 0x80, 0x08, 0x00, 0xe4, 0xa1, 0x02, 0x00, 0x00, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x08, 0x80, 0x01, 0x00, 0xff, 0x80, 0x01, 0x00, 0xaa, 0x80, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, // ................ + 0x01, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, // ................ + 0x04, 0x80, 0x02, 0x00, 0xaa, 0x80, 0x0a, 0x00, 0xff, 0xa0, 0x23, 0x00, 0x00, 0x02, 0x02, 0x00, // ..........#..... + 0x0c, 0x80, 0x0a, 0x00, 0xb4, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x03, 0x00, 0x0f, 0x80, 0x01, 0x00, // ......B......... + 0xe4, 0x80, 0x00, 0x08, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x04, 0x00, 0x0f, 0x80, 0x03, 0x00, // ................ + 0x00, 0x80, 0x0c, 0x00, 0x40, 0xa0, 0x0c, 0x00, 0x15, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x03, 0x00, // ....@.....X..... + 0x0f, 0x80, 0x02, 0x00, 0xff, 0x81, 0x03, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x05, 0x00, // ................ + 0x00, 0x03, 0x03, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xff, 0x80, 0x29, 0x00, // ..............). + 0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, 0x02, 0x00, 0x55, 0x80, 0x01, 0x00, 0x00, 0x02, 0x04, 0x00, // ........U....... + 0x0f, 0x80, 0x0b, 0x00, 0xff, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x02, 0x05, 0x00, // ......*......... + 0x04, 0x80, 0x0c, 0x00, 0xaa, 0xa0, 0x29, 0x00, 0x02, 0x02, 0x0a, 0x00, 0xff, 0xa0, 0x05, 0x00, // ......)......... + 0xaa, 0x80, 0x42, 0x00, 0x00, 0x03, 0x05, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, 0x00, 0x08, // ..B............. + 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x06, 0x00, 0x0f, 0x80, 0x05, 0x00, 0x00, 0x80, 0x0c, 0x00, // ................ + 0x40, 0xa0, 0x0c, 0x00, 0x15, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x05, 0x00, 0x0f, 0x80, 0x02, 0x00, // @.....X......... + 0xff, 0x81, 0x05, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0x80, 0x05, 0x00, 0x00, 0x03, 0x05, 0x00, // ................ + 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x05, 0x00, 0xff, 0x80, 0x05, 0x00, 0x00, 0x03, 0x04, 0x00, // ................ + 0x0f, 0x80, 0x05, 0x00, 0xe4, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x01, 0x00, // ..........*..... + 0x00, 0x02, 0x04, 0x00, 0x0f, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x2b, 0x00, 0x00, 0x00, 0x2b, 0x00, // ..........+...+. + 0x00, 0x00, 0x58, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xaa, 0x8c, 0x03, 0x00, // ..X............. + 0xe4, 0x80, 0x04, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0a, 0x80, 0x09, 0x00, // ................ + 0xaa, 0xa1, 0x09, 0x00, 0x60, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, // ....`........... + 0xe4, 0x8b, 0x02, 0x00, 0xf4, 0x81, 0x0b, 0x00, 0x00, 0x03, 0x02, 0x00, 0x0a, 0x80, 0x00, 0x00, // ................ + 0xa4, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x5a, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x80, 0x02, 0x00, // ......Z......... + 0xed, 0x80, 0x02, 0x00, 0xed, 0x80, 0x0c, 0x00, 0x00, 0xa0, 0x07, 0x00, 0x00, 0x02, 0x00, 0x00, // ................ + 0x08, 0x80, 0x00, 0x00, 0xff, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x08, 0x80, 0x00, 0x00, // ................ + 0xff, 0x80, 0x0b, 0x00, 0x00, 0x03, 0x02, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, // ............U... + 0xaa, 0x80, 0x0a, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x02, 0x00, 0x55, 0x80, 0x0c, 0x00, // ............U... + 0x00, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, // ................ + 0x55, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x02, 0x80, 0x00, 0x00, 0x55, 0x80, 0x09, 0x00, // U...........U... + 0xaa, 0xa1, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0x80, 0x0a, 0x00, 0x00, 0xa0, 0x02, 0x00, // ................ + 0x00, 0x80, 0x00, 0x00, 0x55, 0x80, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x80, 0x0a, 0x00, // ....U........... + 0x00, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x12, 0x80, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, // ................ + 0x55, 0x80, 0x01, 0x00, 0x00, 0x02, 0x03, 0x00, 0x0f, 0x80, 0x06, 0x00, 0xe4, 0xa0, 0x02, 0x00, // U............... + 0x00, 0x03, 0x03, 0x00, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0x81, 0x07, 0x00, 0xe4, 0xa0, 0x04, 0x00, // ................ + 0x00, 0x04, 0x03, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x55, 0x80, 0x03, 0x00, 0xe4, 0x80, 0x06, 0x00, // ........U....... + 0xe4, 0xa0, 0x05, 0x00, 0x00, 0x03, 0x03, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, // ................ + 0xff, 0x80, 0x58, 0x00, 0x00, 0x04, 0x00, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xaa, 0x81, 0x03, 0x00, // ..X............. + 0xe4, 0x80, 0x01, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00, // ........... }; static const uint8_t fs_nanovg_fill_dx11[2298] = { diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp index 3fd944178d0..fc276ff32fd 100644 --- a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp @@ -128,6 +128,7 @@ namespace uint64_t state; bgfx::TextureHandle th; + bgfx::TextureHandle texMissing; bgfx::TransientVertexBuffer tvb; uint8_t viewid; @@ -263,6 +264,11 @@ namespace , true ); + const bgfx::Memory* mem = bgfx::alloc(4*4*4); + uint32_t* bgra8 = (uint32_t*)mem->data; + memset(bgra8, 0, 4*4*4); + gl->texMissing = bgfx::createTexture2D(4, 4, 0, bgfx::TextureFormat::BGRA8, 0, mem); + gl->u_scissorMat = bgfx::createUniform("u_scissorMat", bgfx::UniformType::Mat3); gl->u_paintMat = bgfx::createUniform("u_paintMat", bgfx::UniformType::Mat3); gl->u_innerCol = bgfx::createUniform("u_innerCol", bgfx::UniformType::Vec4); @@ -323,9 +329,20 @@ namespace , 1 , NVG_TEXTURE_RGBA == _type ? bgfx::TextureFormat::RGBA8 : bgfx::TextureFormat::R8 , BGFX_TEXTURE_NONE - , mem ); + if (NULL != mem) + { + bgfx::updateTexture2D(tex->id + , 0 + , 0 + , 0 + , tex->width + , tex->height + , mem + ); + } + return bgfx::isValid(tex->id) ? tex->id.idx : 0; } @@ -347,7 +364,12 @@ namespace uint32_t bytesPerPixel = NVG_TEXTURE_RGBA == tex->type ? 4 : 1; uint32_t pitch = tex->width * bytesPerPixel; - bgfx::updateTexture2D(tex->id, 0, x, y, w, h + bgfx::updateTexture2D(tex->id + , 0 + , x + , y + , w + , h , bgfx::copy(data + y*pitch + x*bytesPerPixel, h*pitch) , pitch ); @@ -444,8 +466,7 @@ namespace memcpy(frag->extent, paint->extent, sizeof(frag->extent) ); frag->strokeMult = (width*0.5f + fringe*0.5f) / fringe; - bgfx::TextureHandle invalid = BGFX_INVALID_HANDLE; - gl->th = invalid; + gl->th = gl->texMissing; if (paint->image != 0) { tex = glnvg__findTexture(gl, paint->image); @@ -460,7 +481,7 @@ namespace else { frag->type = NSVG_SHADER_FILLGRAD; - frag->radius = paint->radius; + frag->radius = paint->radius; frag->feather = paint->feather; } @@ -502,7 +523,7 @@ namespace bgfx::setUniform(gl->u_extentRadius, &frag->extent[0]); bgfx::setUniform(gl->u_params, &frag->feather); - bgfx::TextureHandle handle = BGFX_INVALID_HANDLE; + bgfx::TextureHandle handle = gl->texMissing; if (image != 0) { @@ -976,6 +997,7 @@ namespace } bgfx::destroyProgram(gl->prog); + bgfx::destroyTexture(gl->texMissing); bgfx::destroyUniform(gl->u_scissorMat); bgfx::destroyUniform(gl->u_paintMat); diff --git a/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h b/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h index aeac0d14115..e744417898c 100644 --- a/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h +++ b/3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h @@ -35,12 +35,12 @@ static const uint8_t vs_nanovg_fill_glsl[541] = 0x20, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, // gl_Position = t 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // mpvar_1;.}... }; -static const uint8_t vs_nanovg_fill_dx9[432] = +static const uint8_t vs_nanovg_fill_dx9[436] = { 0x56, 0x53, 0x48, 0x04, 0xcf, 0xda, 0x1b, 0x94, 0x02, 0x00, 0x0b, 0x75, 0x5f, 0x68, 0x61, 0x6c, // VSH........u_hal 0x66, 0x54, 0x65, 0x78, 0x65, 0x6c, 0x02, 0x01, 0x01, 0x00, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x76, // fTexel.......u_v - 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x80, 0x01, 0x00, // iewSize......... - 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2a, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x72, // .....*.CTAB....r + 0x69, 0x65, 0x77, 0x53, 0x69, 0x7a, 0x65, 0x02, 0x01, 0x00, 0x00, 0x01, 0x00, 0x84, 0x01, 0x00, // iewSize......... + 0x03, 0xfe, 0xff, 0xfe, 0xff, 0x2b, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x72, // .....+.CTAB....r 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0xff, 0x02, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ................ 0x91, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, // ...k...D........ 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x02, // ...P.......`.... @@ -50,20 +50,21 @@ static const uint8_t vs_nanovg_fill_dx9[432] = 0x77, 0x53, 0x69, 0x7a, 0x65, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, // wSize.vs_3_0.Mic 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, // rosoft (R) HLSL 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, // Shader Compiler - 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0x51, // 9.29.952.3111..Q - 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x80, 0x3f, 0x00, // ..............?. - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, // ................ - 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, // ................ - 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, // ................ - 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x02, // ................ - 0x00, 0x03, 0xe0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x03, 0xe0, 0x01, 0x00, 0xe4, 0xa0, 0x01, // ................ - 0x00, 0xe4, 0x90, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x02, // ................ - 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, 0xd0, 0x90, 0x00, 0x00, 0xd0, 0x90, 0x04, // ................ - 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x55, 0x80, 0x00, 0x00, 0x00, 0x80, 0x02, // .........U...... - 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x04, // .............U.. - 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00, 0xaa, 0x80, 0x00, 0x00, 0x00, 0x81, 0x02, // ................ - 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0xe0, 0x02, 0x00, 0x64, 0xa0, 0x01, // .U...........d.. - 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // ................ + 0x31, 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x30, 0x30, 0x31, 0x31, 0x2e, 0x31, 0x36, 0x33, 0x38, 0x34, // 10.0.10011.16384 + 0x00, 0xab, 0xab, 0x51, 0x00, 0x00, 0x05, 0x02, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0xbf, 0x00, // ...Q............ + 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, // ..?............. + 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, // ................ + 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, // ................ + 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x01, 0x00, 0x03, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x05, // ................ + 0x00, 0x01, 0x80, 0x02, 0x00, 0x03, 0xe0, 0x02, 0x00, 0x00, 0x03, 0x02, 0x00, 0x03, 0xe0, 0x01, // ................ + 0x00, 0xe4, 0xa0, 0x01, 0x00, 0xe4, 0x90, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, // ................ + 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x06, 0x80, 0x00, 0x00, 0xd0, 0x90, 0x00, // ................ + 0x00, 0xd0, 0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x55, 0x80, 0x00, // .............U.. + 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x06, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x80, 0x00, // ................ + 0x00, 0x55, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00, 0xaa, 0x80, 0x00, // .U.............. + 0x00, 0x00, 0x81, 0x02, 0x00, 0x55, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0c, 0xe0, 0x02, // .....U.......... + 0x00, 0x64, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x03, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0xff, // .d.............. + 0xff, 0x00, 0x00, 0x00, // .... }; static const uint8_t vs_nanovg_fill_dx11[577] = { diff --git a/3rdparty/bgfx/examples/common/shaderlib.sh b/3rdparty/bgfx/examples/common/shaderlib.sh index da7bad784cb..a6a51199a1f 100644 --- a/3rdparty/bgfx/examples/common/shaderlib.sh +++ b/3rdparty/bgfx/examples/common/shaderlib.sh @@ -60,11 +60,11 @@ vec3 decodeNormalSphereMap(vec2 _encodedNormal) return vec3(normalize(_encodedNormal.xy) * sqrt(1.0 - zz*zz), zz); } -// Reference: -// Octahedron normal vector encoding -// http://kriscg.blogspot.com/2014/04/octahedron-normal-vector-encoding.html vec2 octahedronWrap(vec2 _val) { + // Reference: + // Octahedron normal vector encoding + // http://kriscg.blogspot.com/2014/04/octahedron-normal-vector-encoding.html return (1.0 - abs(_val.yx) ) * mix(vec2_splat(-1.0), vec2_splat(1.0), vec2(greaterThanEqual(_val.xy, vec2_splat(0.0) ) ) ); } @@ -87,11 +87,11 @@ vec3 decodeNormalOctahedron(vec2 _encodedNormal) return normalize(normal); } -// Reference: -// RGB/XYZ Matrices -// http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html vec3 convertRGB2XYZ(vec3 _rgb) { + // Reference: + // RGB/XYZ Matrices + // http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html vec3 xyz; xyz.x = dot(vec3(0.4124564, 0.3575761, 0.1804375), _rgb); xyz.y = dot(vec3(0.2126729, 0.7151522, 0.0721750), _rgb); @@ -246,6 +246,24 @@ vec4 toFilmic(vec4 _rgba) return vec4(toFilmic(_rgba.xyz), _rgba.w); } +vec3 toAcesFilmic(vec3 _rgb) +{ + // Reference: + // ACES Filmic Tone Mapping Curve + // https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/ + float aa = 2.51f; + float bb = 0.03f; + float cc = 2.43f; + float dd = 0.59f; + float ee = 0.14f; + return saturate( (_rgb*(aa*_rgb + bb) )/(_rgb*(cc*_rgb + dd) + ee) ); +} + +vec4 toAcesFilmic(vec4 _rgba) +{ + return vec4(toAcesFilmic(_rgba.xyz), _rgba.w); +} + vec3 luma(vec3 _rgb) { float yy = dot(vec3(0.2126729, 0.7151522, 0.0721750), _rgb); diff --git a/3rdparty/bgfx/examples/runtime/gamecontrollerdb.txt b/3rdparty/bgfx/examples/runtime/gamecontrollerdb.txt index 9ad8778a00b..7c23f500c73 100644 --- a/3rdparty/bgfx/examples/runtime/gamecontrollerdb.txt +++ b/3rdparty/bgfx/examples/runtime/gamecontrollerdb.txt @@ -8,7 +8,6 @@ ffff0000000000000000504944564944,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4, 4c056802000000000000504944564944,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Windows, 25090500000000000000504944564944,PS3 DualShock,a:b2,b:b1,back:b9,dpdown:h0.8,dpleft:h0.4,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a2,righty:a3,start:b8,x:b0,y:b3,platform:Windows, 4c05c405000000000000504944564944,PS4 Controller,a:b1,b:b2,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b4,leftstick:b10,lefttrigger:a3,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:a4,rightx:a2,righty:a5,start:b9,x:b0,y:b3,platform:Windows, -xinput,X360 Controller,a:b10,b:b11,back:b5,dpdown:b1,dpleft:b2,dpright:b3,dpup:b0,guide:b14,leftshoulder:b8,leftstick:b6,lefttrigger:a4,leftx:a0,lefty:a1,rightshoulder:b9,rightstick:b7,righttrigger:a5,rightx:a2,righty:a3,start:b4,x:b12,y:b13,platform:Windows, 6d0418c2000000000000504944564944,Logitech RumblePad 2 USB,platform:Windows,x:b0,a:b1,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, 36280100000000000000504944564944,OUYA Controller,platform:Windows,a:b0,b:b3,y:b2,x:b1,start:b14,guide:b15,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b8,dpleft:b10,dpdown:b9,dpright:b11,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b12,righttrigger:b13, 4f0400b3000000000000504944564944,Thrustmaster Firestorm Dual Power,a:b0,b:b2,y:b3,x:b1,start:b10,guide:b8,back:b9,leftstick:b11,rightstick:b12,leftshoulder:b4,rightshoulder:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b5,righttrigger:b7,platform:Windows, @@ -16,6 +15,18 @@ xinput,X360 Controller,a:b10,b:b11,back:b5,dpdown:b1,dpleft:b2,dpright:b3,dpup:b 00f0f100000000000000504944564944,RetroUSB.com Super RetroPort,a:b1,b:b5,x:b0,y:b4,back:b2,start:b3,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1,platform:Windows, 28040140000000000000504944564944,GamePad Pro USB,platform:Windows,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1,lefttrigger:b6,righttrigger:b7, ff113133000000000000504944564944,SVEN X-PAD,platform:Windows,a:b2,b:b3,y:b1,x:b0,start:b5,back:b4,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a4,lefttrigger:b8,righttrigger:b9, +8f0e0300000000000000504944564944,Piranha xtreme,platform:Windows,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2, +8f0e0d31000000000000504944564944,Multilaser JS071 USB,platform:Windows,a:b1,b:b2,y:b3,x:b0,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7, +10080300000000000000504944564944,PS2 USB,platform:Windows,a:b2,b:b1,y:b0,x:b3,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a4,righty:a2,lefttrigger:b4,righttrigger:b5, +79000600000000000000504944564944,G-Shark GS-GP702,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a4,lefttrigger:b6,righttrigger:b7,platform:Windows, +4b12014d000000000000504944564944,NYKO AIRFLO,a:b0,b:b1,x:b2,y:b3,back:b8,guide:b10,start:b9,leftstick:a0,rightstick:a2,leftshoulder:a3,rightshoulder:b5,dpup:h0.1,dpdown:h0.0,dpleft:h0.8,dpright:h0.2,leftx:h0.6,lefty:h0.12,rightx:h0.9,righty:h0.4,lefttrigger:b6,righttrigger:b7,platform:Windows, +d6206dca000000000000504944564944,PowerA Pro Ex,a:b1,b:b2,x:b0,y:b3,back:b8,guide:b12,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.0,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Windows, +a3060cff000000000000504944564944,Saitek P2500,a:b2,b:b3,y:b1,x:b0,start:b4,guide:b10,back:b5,leftstick:b8,rightstick:b9,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,platform:Windows, +8f0e0300000000000000504944564944,Trust GTX 28,a:b2,b:b1,y:b0,x:b3,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Windows, +4f0415b3000000000000504944564944,Thrustmaster Dual Analog 3.2,platform:Windows,x:b1,a:b0,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b6,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, +6f0e1e01000000000000504944564944,Rock Candy Gamepad for PS3,platform:Windows,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,guide:b12,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2, +83056020000000000000504944564944,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,y:b2,x:b3,start:b7,back:b6,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1,platform:Windows, +10080100000000000000504944564944,PS1 USB,platform:Windows,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftshoulder:b6,rightshoulder:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b4,righttrigger:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2, # OS X 0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Mac OS X, @@ -28,6 +39,13 @@ ff113133000000000000504944564944,SVEN X-PAD,platform:Windows,a:b2,b:b3,y:b1,x:b0 5e040000000000008e02000000000000,X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, 891600000000000000fd000000000000,Razer Onza Tournament,a:b0,b:b1,y:b3,x:b2,start:b8,guide:b10,back:b9,leftstick:b6,rightstick:b7,leftshoulder:b4,rightshoulder:b5,dpup:b11,dpleft:b13,dpdown:b12,dpright:b14,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,platform:Mac OS X, 4f0400000000000000b3000000000000,Thrustmaster Firestorm Dual Power,a:b0,b:b2,y:b3,x:b1,start:b10,guide:b8,back:b9,leftstick:b11,rightstick:,leftshoulder:b4,rightshoulder:b6,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b5,righttrigger:b7,platform:Mac OS X, +8f0e0000000000000300000000000000,Piranha xtreme,platform:Mac OS X,x:b3,a:b2,b:b1,y:b0,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b6,lefttrigger:b4,rightshoulder:b7,righttrigger:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a2, +0d0f0000000000004d00000000000000,HORI Gem Pad 3,platform:Mac OS X,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7, +79000000000000000600000000000000,G-Shark GP-702,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:b6,righttrigger:b7,platform:Mac OS X, +4f0400000000000015b3000000000000,Thrustmaster Dual Analog 3.2,platform:Mac OS X,x:b1,a:b0,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b5,rightshoulder:b6,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, +AD1B00000000000001F9000000000000,Gamestop BB-070 X360 Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X, +050000005769696d6f74652028303000,Wii Remote,a:b4,b:b5,y:b9,x:b10,start:b6,guide:b8,back:b7,dpup:b2,dpleft:b0,dpdown:b3,dpright:b1,leftx:a0,lefty:a1,lefttrigger:b12,righttrigger:,leftshoulder:b11,platform:Mac OS X, +83050000000000006020000000000000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,x:b3,y:b2,back:b6,start:b7,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1,platform:Mac OS X, # Linux 0500000047532047616d657061640000,GameStop Gamepad,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:,leftshoulder:b4,leftstick:b10,lefttrigger:b6,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b11,righttrigger:b7,rightx:a2,righty:a3,start:b9,x:b2,y:b3,platform:Linux, @@ -39,6 +57,7 @@ ff113133000000000000504944564944,SVEN X-PAD,platform:Windows,a:b2,b:b3,y:b1,x:b0 030000006d0400001fc2000005030000,Logitech F710 Gamepad (XInput),a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000004c0500006802000011010000,PS3 Controller,a:b14,b:b13,back:b0,dpdown:b6,dpleft:b7,dpright:b5,dpup:b4,guide:b16,leftshoulder:b10,leftstick:b1,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b11,rightstick:b2,righttrigger:b9,rightx:a2,righty:a3,start:b3,x:b15,y:b12,platform:Linux, 030000004c050000c405000011010000,Sony DualShock 4,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a5,lefttrigger:b6,righttrigger:b7,platform:Linux, +030000006f0e00003001000001010000,EA Sports PS3 Controller,platform:Linux,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7, 03000000de280000ff11000001000000,Valve Streaming Gamepad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400008e02000014010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, 030000005e0400008e02000010010000,X360 Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:b9,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b10,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,platform:Linux, @@ -73,3 +92,17 @@ ff113133000000000000504944564944,SVEN X-PAD,platform:Windows,a:b2,b:b3,y:b1,x:b0 03000000666600000488000000010000,Super Joy Box 5 Pro,platform:Linux,a:b2,b:b1,x:b3,y:b0,back:b9,start:b8,leftshoulder:b6,rightshoulder:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b4,righttrigger:b5,dpup:b12,dpleft:b15,dpdown:b14,dpright:b13, 05000000362800000100000002010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,platform:Linux,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2, 05000000362800000100000003010000,OUYA Game Controller,a:b0,b:b3,dpdown:b9,dpleft:b10,dpright:b11,dpup:b8,guide:b14,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,platform:Linux,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,x:b1,y:b2, +030000008916000001fd000024010000,Razer Onza Classic Edition,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:b11,dpdown:b14,dpright:b12,dpup:b13,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +030000005e040000d102000001010000,Microsoft X-Box One pad,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +03000000790000001100000010010000,RetroLink Saturn Classic Controller,platform:Linux,x:b3,a:b0,b:b1,y:b4,back:b5,guide:b2,start:b8,leftshoulder:b6,rightshoulder:b7,leftx:a0,lefty:a1, +050000007e0500003003000001000000,Nintendo Wii U Pro Controller,platform:Linux,a:b0,b:b1,x:b3,y:b2,back:b8,start:b9,guide:b10,leftshoulder:b4,rightshoulder:b5,leftstick:b11,rightstick:b12,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,dpup:b13,dpleft:b15,dpdown:b14,dpright:b16, +030000005e0400008e02000004010000,Microsoft X-Box 360 pad,platform:Linux,a:b0,b:b1,x:b2,y:b3,back:b6,start:b7,guide:b8,leftshoulder:b4,rightshoulder:b5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4,lefttrigger:a2,righttrigger:a5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2, +030000000d0f00002200000011010000,HORI CO.,LTD. REAL ARCADE Pro.V3,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,guide:b12,start:b9,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1, +030000000d0f00001000000011010000,HORI CO.,LTD. FIGHTING STICK 3,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,guide:b12,start:b9,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7 +03000000f0250000c183000010010000,Goodbetterbest Ltd USB Controller,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,guide:b12,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3, +0000000058626f782047616d65706100,Xbox Gamepad (userspace driver),platform:Linux,a:b0,b:b1,x:b2,y:b3,start:b7,back:b6,guide:b8,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,lefttrigger:a5,righttrigger:a4,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a2,righty:a3, +03000000ff1100003133000010010000,PC Game Controller,a:b2,b:b1,y:b0,x:b3,start:b9,back:b8,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,platform:Linux, +030000005e0400008e02000020200000,SpeedLink XEOX Pro Analog Gamepad pad,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,dpup:h0.1,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +030000006f0e00001304000000010000,Generic X-Box pad,platform:Linux,x:b2,a:b0,b:b1,y:b3,back:b6,guide:b8,start:b7,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b5,righttrigger:a5,leftstick:a0,rightstick:a3,leftstick:b9,rightstick:b10,leftx:a0,lefty:a1,rightx:a3,righty:a4, +03000000a306000018f5000010010000,Saitek PLC Saitek P3200 Rumble Pad,platform:Linux,x:b0,a:b1,b:b2,y:b3,back:b8,start:b9,dpleft:h0.8,dpdown:h0.0,dpdown:h0.4,dpright:h0.0,dpright:h0.2,dpup:h0.0,dpup:h0.1,leftshoulder:h0.0,leftshoulder:b4,lefttrigger:a2,rightshoulder:b6,rightshoulder:b5,righttrigger:b7,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a3,righty:a4, +03000000830500006020000010010000,iBuffalo USB 2-axis 8-button Gamepad,a:b1,b:b0,x:b3,y:b2,back:b6,start:b7,leftshoulder:b4,rightshoulder:b5,leftx:a0,lefty:a1,platform:Linux, diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_particle.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_particle.bin index 0b6b5ca926cb6e0acbcfb1dc547d6ea8175f442a..e9ac1a71c495d9236a12252391315c4e803e1509 100644 GIT binary patch delta 33 pcmcc3a+_s>ynukzq_U|S4oc-|eb`l*rFd?m{uM^XbCX$^!U5*G4OjpG delta 33 pcmcc3a+_s>yucyT1nm<^C5OJoU9K~qcdTur{uM^Xvy)kv!U6xe4wwJ{ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_esm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_esm.bin index 91bf18c2ea8c92e38abccb42488f3b9feb966e43..e599c4ec016d93d374d7fd1174cca5f44d91ac28 100644 GIT binary patch delta 143 zcmew={Z)E{A)`Q^htpvxS>2b*-t&jaDE{N$?8vx-Nl>1Ffmw?|fB^(77#KL6ChM^% zGd4{QVo?@tf{I(gXaNBRrpe!!)ma4@7`TKcPhwH$7lO$#2sAh{Fid{JqR6PV`4x*f Xqo7rT0@zqKAj#+eBsLqd9cBjry2cv1 delta 171 zcmew={Z)E{A)`Rk-qYJvw<+$|i?!B_uvSRk?8vx-X>uluil96L1G5%`00RhEFfecm zP3B@zW>lK2$D%B&1QnNp(pCZj3`{_Ef(#5?PLn6GsB0ssXmA9Z!N7oI8oLm}gvlpZ b6gRW7$}kEtIzUufH7I}?Y@3bP4zmLQf4msR diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_esm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_esm_csm.bin index c928ae4e8f1d27405eeaa7cf7a9a5373004b8938..c2ac4161f46339d56808a6be5f096a0a42654157 100644 GIT binary patch literal 6534 zcmeI0O>9*~6vyY?mX;O*<%yYM1Rq? zTUeNwUaUbKot;@2UX({=_nkP_&yUYvtX-J7e5^Lx(^G0Lpmz3@))Y{^J*AccYFAIG zRj93b3+(IeM3fBV(#Gfh8T|EpY5l(%*|*ChCgW~UHGH4l#-JpPB?*M@ml zkO4oujE$PV`BnA+552Y3x%71AgX45x~R40N1Q(c-|SnHJXNphXKAt z)9~;xz+(gUjGh`lF+6&B?C|h$cYJu{SpQKsHgx*H@bJi>8sx%+}seL45NHasJft5+*}b8fxnTWo)}!~0=t?6NiX+8P^AcZzj3 z<3D+_@s3RVj$HhXEbr$!T+>`fhxdW?vewvcYhq<gD&B z_c8VAM>X)FV=1h=0)Km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+iCa)(I z|BXcV1=*Q@>{FWEds#EJKJ2D83@&++^R4&v#4a?VjznQJ&i22cF zeaLl}#^#gB_>F{&TCzF0pWhC=ycTu$!Jd08y2^_8+4FQ}Fb_3=OfA2=;S)MW$!)WU z-L}u`TKIWg8?I;`zjB(_tYK&VD~?EJ@n*8tFm*DD_iFutn%z^;S!Xh8r>Jjh$Q^~> zrA0aUF7nI|nfQIr{4q}OA&qU#Ci2DCS(j{$7wq;auJW}IPfvH2^CXpGp@DCDoL#IJ zzf)yz^lVmj55e&MwYP>G*Tn*4xvy8mfMs4Fg=m;5%s;j12>wd~E{;HDDOT zX&Bsr4TG^^paX`d0fTjs+<&7yhT^1|9QRl`>QjqShbHkt( zZEss#dHn<*&F@aJ!^5|mwvI;ovUQ?%a+!GKzURG~p1Oyq_k?xSKJLl&wp3ady@tnb z+Xvkwb?&Jvzx&_jP&zq??7ekyZvUI)otl?#0t_Hv!N9=jG+B>D zS-J@-q9q`}zyy@xYEWo!1gl|~{DoPQRS+m7G`WmLonHv5(uzRlK2$0E-v$iTqmG`WmLU0VsNLW)74!4a&MfdNSuyAVQt@){P!%`aJG7zG&} RAS$gI6u=C&&0=ha*#YWB7~lW^ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_esm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_esm_linear_csm.bin index 720d6b8dc550a41aae27ba0268583605bee85eef..3430e96d811a5ef7446dac62a406090dee285c07 100644 GIT binary patch literal 6422 zcmeI0O>7la6vywImVSY4d4BL=3@^BANGL@`fzW9w4;ns7+Cr)e%PSOVQrhOVFRV0= z8ci?}T^Lp_To@OEi3=Bo1u?9Q!NeFp7H(bOwhIzn`TyOyXWlR^1``*Ac#=E!&iVM? zbM853X5K509ceCK{^H|q*It`ks8lN#7k3q%bA`rzU(t2zzO^=ac7ArgT687dZKzFN ztSn7eXDYKtD@E6vW1TCyILBHnx|3pc)h1_W-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time/shaders/dx11/fs_shadowmaps_color_lighting_esm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_esm_linear_omni.bin index 9f95aece5c24a4cd7caf090c335f1bf628f47ad1..6c4859be087fe031ff5eab1174826d291a6e7a69 100644 GIT binary patch delta 210 zcmcbtaam)-WJZB)LXR3R?0jX$RwX&zbwA7F&5IfLFmYNj2rz&E*X9fse?~Z0YV!eB zdB(}=ECQR~v$Ze_$}=!9YeAJ-FfedBO{9cXkCLN*g~K(gn8^Rd6<~iW)E(2MnS6v1+Zc^Aj#+eBsNdrIm`|K D6DK4c delta 214 zcmcbtaam)-WJZC-O-oCj?$BSq=;jkgn-??gVdCUs5MTfStIZiK{*0VbaP9$C zc}7kxIQIoxH#4Uz0|VzLpb+!q3tZBI@(c{jFa;Js8KKE7T*{0}lUH!b3kotYa5+IW zyYYc^{Na+;R)UHEZE0`>Tg$+JWCFVoLVmIux8mkxZW%^FMhA#Ws|E!ygKhH!p2O?_ D&L$;8 diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_esm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_esm_omni.bin index f925d7d809baf0569b1775cab866dbe3471ee1b5..95467349adc8fd91e2e125f20e1ed7a8a05b0009 100644 GIT binary patch delta 228 zcmaE_@m^!YWJUqyQ!O>_>-5xHq}P^SP%r+wc`@T2CQd5`0R|A@+ML1S&j{yAZ9c#% z&p26~MPT!LwiaeVc?Je%EvQlp1_n;2$t$>&8Ji}b;Zjy?f{Me80?|xBBVB>&K7rVi zYq+GX1%Y-5K~=i(K~yj~0F^N`7z4365L*MWJy3uHrVeOQgChgO%;*3lHm~71%nkrA$tOJk delta 236 zcmaE_@m^!YWJZBWT&nw)yvxXF30KyxXWG`ec`@T2CQdE}0R|AT+ML1S&&VkS=N@2{ zXPoRVD6siGTMIL%D+2@PC!iejg7ORu%vw;D7C;%H$t_&Uj7pPNa482XLB-)F z0r^Zo3j`S$xSXJJZhSzKfMQGzK!Tyc7>Lb**cyoKfdU*zW;8f5Fiei)mV~>EYjX;> ZIinyWSS!%o4GKUV3=C|W*YF%>2LQzKCK&(# diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_hard.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_hard.bin index d4834651b1466311ddc65d94bf71610e72781657..d1612f8ca11966a726175d0d304b7739fcd4141e 100644 GIT binary patch delta 120 zcmZpaZj|0&$S5H3clwMpxzElOlib}{m3QTDc4XYaBq-0oz^ug}zyJlDPLuUmltrDO zA}|>%0RaZ4$={gOSp^vwxP&I>vFI~$O}1kepS+djhoDu10$4j6kYscK5}Wt29%css DB2O10 delta 127 zcmZpaZj|0&$S9z8O0{uTfmiLd3h}PYCz~}lJ2LKIn(WG=A}G(mz^ug}zyJlDLX){z zlx2mWB3w|~NT)2=T6v2fXyC~9C7ZpSVk#1e+Hj5yx{QvH|=gspa)e3%e;e|WrzH|QP z+;h%7=gym{j2~;RT>b2$qHABCT&UKnmlyYyoO6Z7b6?37_1wBVd0~EbzE*N&J#AT@ zyj)$HuFX_uPgF~;H^+Llu;re)!<_!rC);qo41;`{k$i_dHopmPfWb*Ce_}bB7osn#aeFp88SG zZDHOOWq=3E=+gYouaXb=$Xi>TyAMs+9v^899zGZbcxIOb@WC+PHESB5X9jeWrt!fr z;J0WR9}ELNKH$&z*~!zRyLof`*wEN7+nnmlxx?D9 z(1iql=1k)mo$NDu*=KZlo+`SgTCwP3V7;m}zT28y*&3U+#vW^Qu{ABfSIb4MoV%nW zLEfnp_Nn_Am0)*mS7Lvka~*ertfe`@L@~%@e6sL*KU2AF9SpdGf%XK74eXQuDAvRG zPak6H(T_^NVPhq%y92%>&_A-j%QZJ;_gW1)QJmOMKI{F?)%zecX3 zjFrR&D@NX5@c0YO+Rx_$*>2%DKl8f~JNNaydxsCG%*TT4Mn@y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8>m?id$3;>-ILxbnyS$%k<*o_A<7`Ugmc+N%eY)y=>=Fn3uVs zZg22guX<&@_Nd;#K1ua@#M$;Fy-|(ppY@CIIoJ4|J{xuUbC22S4eO6Y_K`Z`Jol{e z)94NA^0>W$ZLv4FdnKt}PoX#Xt+q#}PPX>-YPjnepV04oe!mmlF4?!^9=jIr)n+d& z|NDbo{YniM?vlB29@EYVVXg*~p2;wCKDuuVn7*D={9Op!*W_pMh4Wo^vQAB!Ft6AU zetjA!M(@WS%*RIlS7ZYTJJ?1}tmrsT=po4R2lMW5(3v0ko4w7!|C{`{hzYjk-=D{f z`QtC#)fsNg-{+(_@!1h`usGqRR4)fvoS%#mS8;gGR$eGjfvAtP#VST_yZ!zcPhQF>B)-0c|?0jr*#=EJH zQ!;4GxiyBjsZ;YZYG6Lvx0y_~WnzPf4I0Vm%}00e%q~f>vfs+U%~$vAESF;ao%?p5 za`1N*;x+8BcHnetFFfDBvX5)q8CR@XznQPqi21Q)eaNRzV~fdj+~d))muyb%kSkG^ z?M2-Q@aH~;t*YW<_A;Fr%)=f)C(78?JbkKmT29jSM@) zuRL-(%QxscHTk% z$55V-*`eDKYqcrY16R_|cCwyD9sAs5Nea@v``j?ti`LtgSGIp*j23sV+>sI6&$f=n zhr&9scQT!1)PCUOn%=rM=oyIXs6HOZ?ABE}?|Tc6-Sv;QN$T9z8-Mx#k8mDpkn{K6 p#ku`m{ll8q`8c{gG}x|%dVkaxxZT_QSrc_7%}X6MvE09N{{l;(_*nn| diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_hard_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_hard_linear.bin index 0d561a3cc8c545124e312e8bda6f7d3ec3734377..52ac4285db61eb7ddd1d26fdc6bfd94d1804e985 100644 GIT binary patch delta 98 zcmaDV^;BwuA)`Q~LHSxmM~O2J%DLuml##u+*^zMvlb}2U1G5%`00R_oI!)GNk)QmN sS%p=Qfq_eCauAC?BiCd*X7R~0S$+swH7I};vH?j(2OzO|5$j=g00Zw9XaE2J delta 103 zcmaDV^;BwuA)|ov{muX0ac(dB;(z$0{<5DxHajxzV4AGSq9Q2Iz`(4fCI_+Tb4o$wxHfmOurmrWIzSX!H7I}?Y?~Lc9%cssOH3Dz diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_hard_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_hard_linear_csm.bin index 28db96648ca0e9d5dd164dfda7dabeb4ac5a804c..221a4278dd828b5509b43c3fc78034c992f28b72 100644 GIT binary patch literal 5958 zcmeI0O>9*~6vyY?mVQCn#}g8$F}ze)jR~cwC=z;G%7ccFHfPK{g#u!#ETo^XQ#6(xb5W~s^CdQb!kex1EcR`{n|G&9&?z`R=#KaF4PBQn*JzsOq zng7h4_bL-dn=4m8{ix{LSEd%Lwd&=iJtgN{q4C~daz(wju1uX@m|LioTv=~hR;Dgj zmuG6T)wyHUlIzQ{E|grHV=a~3m{?saQ**PgURoYoSejj)U6?PqbK*V`xPzCcXJ_Um zyfUMS7BiCJ*^3ufmS%#aF3GlFGqE^xer2v&3!?WW+L?+LmWO9+Gv}FUWPTo}A4~qE zO}D%}Grv+rIUWeaOFgGv9GVtoMY|jD{RWK`uhqkIo963 zLaSK!whx~fIyBh%!LN6Jx^TAnnX#`we{=QAf~tIPyK_yV&#Lbb%A@X zuSIF-qf6^j|K5+12YlqMts6+gKkncJ~}k` zE$YTchX$V*h-c#T)Y$06$mGcANq2H|{KVjKH+lHXq0!OtVK=H=$(^{!x2$f><|cOe zm>e8Ga(L3+yg6}nc>JAhPWW=JM-!e^$dzkly*al<{S~G^SM+(|3wEczT6uW3x|Hl|iK#;1+(#~53D%_#1*a#17aE@?@S zcdCT_+I_T2@Oyt(;(w2G9e0APr8&`wVlM7Rbk(+XDCq4Ev^P+E;GghU;!C; zpAP<7wkENGclJ;gtJgO*>T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xf?)q-f)fMWf zKJH5Gww0P!y@kha%@4Lw?A+d4fBSzuI2Sp{%=feNYx{5RPb*&M{b==2ccYTz`?HRO U+qaoNYl5zzb;+X^*7Tp;za}d5LjV8( diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_hard_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_hard_linear_omni.bin index 871b1ffeeeb215b0ad144bc5484ecca48d39049a..03b377621256c334f895227bc2761888f137ff1e 100644 GIT binary patch delta 164 zcmcbweqVjVWJZCHpP#Vm&a~fabN4B~zDQ}+=EaPAm^iH%1QwgwfO+6 zJmX|_7J<$0*;<$difCKC$Hg>c9dseVAg`F1nT7!g0ewkOh5sy289Mkkf~50 p2ozF+s&V53nR0_m8EzNXW)^OCMnOggh-#|_1u%ncvkcE+b^r!GAb diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_hard_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_hard_omni.bin index 245584b625571057b6eacd698a0d2bf79f7756d8..11f1c23b014bbbc7a5a92030ad361b594b144bb2 100644 GIT binary patch delta 188 zcmeyZ{#$*+WJUqUbJc4$O_X=PRMhq1?X>N8H!o(~!^CODAiw|uT$?jk{2Ad~sm%vi zy rT?neujSnRHg-e-}3#NCo0yjIOpjCqcP$L5a8xS)(0Ex{OJcroxAD delta 216 zcmeyZ{#$*+WJUp#8%#G$B^G@SseP~`_t3g8n-??gVdCUs5MTfStIZiK{*0VbaP9$C zc}7kxIQIoxH?yfL0|VzLpb#@qgBw)JtxkY}1!O`3gqCMuV1{V}igF4~ZsAha6oRUT zTLJiP#R&Z zKR3cykV=@b%A6q6zaGJVp@_vc3&6zy1gW7#-1qQSGDmQ--ks7Sww|T$B;7xn$*~>Op z$`0PRUC*Apd6l98Z8P9{_UOrvl>f-W3LsFC0R)_&QUU}(r3Axdei8A>LD~|gu!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Q^U?-PRn1IuK7R%uQ_1_rJsAdhi!J)ipKE>;D`$xK2BMa+})xugX_ ziiCiQn1Lp_@d4@0{Or>iCp!rs6oO4-1)DZ`KbQVyJx&XvOq%>(bkXEo?yuA{Op~8# zhAo}^Lg*7!T(Dqv^HleDl-aNH7J0&Y(SFH g0Z43~uVl?EV#dJ03bFu{xWK{;4fdOFsWz|x0EzO4*8l(j delta 721 zcmaD9aw}wm3!}7vrb~pA^WpeNk*v1Mznfm#2Yh+?QJIl}fk9w$JmYmv84U&o2Oy7q zvpv&sCQerd2F_0m0t~E^?OCNKv#}Zo3NkQoH33CHTHN?RGW_iFo4Z&Q7~zUpCeP=R zo~*=YzzR|yGz9&h&0Lz)oCTGsXacJ^+UP-0~`^kQC2jIa6 zk9kg5GGUs$pGSZ5EO`^g$^R5o1mzhRn603x2N>U+LX+<+$b*xK(qwf-eNHK$90+i2 fj#pG>6l8P&^BAle6u=C&&6Aa^nKwUDZD0Wa<=K?t diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_pcf_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_pcf_linear_csm.bin index 74dbfb1da69ac1299665c1507c8e406fd60fa722..9957e3b858872c007f1b775f11c9d287819ecea2 100644 GIT binary patch literal 35715 zcmeI5O>A99702gYr*`a?#Cd$E4MKhjh($nZngWGV>WQ1Ujr!pzPOH+5>$GlbDTytA zs4LK`5eT{{ED$RsSfDOikXW#4B@#s}SQM#3NG#Y@5V6jp3s}JU&7J>!*OT{doUg`i zXQX@Q-Z^K^oH=LCnYnZBeQ$d9v0c-z{qC3h-01q;^8CvD+12~n&be0a{&3rk+x^J; z+zU%*mR8!XV|RD0&z+rLTUc3~KlAu}+Z{@ZUTiy`6s@-12`k#WK6hsE8176g$U^yu2UyBIsuZ zx~BpytsPxlS$Kh#j-NXR(O(<<^J;EwZQrvbN-Z0whbE{`(=g%&m zSv>dhi6ED@yI_F3R_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n|t ze9nV3c%K^v_oA(BnBPY}Y97aAnjGsOF6|61jKN4}Fkon)x2qrZm6 emL^NRf3~4K+OzfWUK7VgJXfylQ)1EhP4Rz7M>;eB diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_pcf_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_pcf_linear_omni.bin index a46422934f321d61590ef3c13ddc2efdb7da5fae..3c72697a9d39b8eec4209a59502ec6b64bd52768 100644 GIT binary patch delta 638 zcmbP|I3;nz8b$%}=$rq0suFo=LMoG|s0vKB;a8bl!_UEJwfUi#KC*%k5s(6%$rr>p zAPOcglqj1#U+^o~K8g&97NyLP%?l+c_el4+L83nBx6hP)MumLfn1CZE!RO38503F7$9smFU delta 628 zcmbP|I3;nz8b$%9*wvQic6WoVOYJk9vPk@1WvLmnj_LvO9;ecU|?|L1Jauxa;Gy2$}=!9b3uiHGMrA6Yk8Fwoq!^YK&}>)wt~_KBLjI6 zMuJp=jhy_DTYB;VZI;OuEIgbry^NC!S%fzW@KrEQ{vs;C*fg0@M0s+Fpa>)DWI-u) zR*<`tCNm1@PktlFvzbLU1g7kuAXphM$iWDEC-Ot=Rf4(*VsD_BGD!R6BT~hi*9*zQ zjG(bipT+24)8->m6X@cfvdwk!QgpGYX!Aa0Il9=Cu=#_!0n8?H5)_MU!ej%jFW_t< z1x<30Y!a!hJlVuhfEAQA7$z%fLsGKP6j0v$huepd)0KgN^Ak{rb@E(ZX+e1g24*gh0tPVP6q+2#t30`cMS#@` zD9Skbpp5?H1KKQ;cd$!wmN~d z1KDnT0t{@E1I3gld$3Au7LfH|oP32}1*++xC|DCG$ab)%$&MoWAcd1JNTqLHFCxC&@=|oND{b>WWjQ+86|(t*x&d*CNI*7ZvVqo@$pzXflU1|@ zctJS<1hhc(WJ4+O$s#%eyr6^*0-yw_G(wYF5K!Y7#KJ{kG5I7b e&*Yt~0+XMzz7e#7DrW;~Vsro!n;)?qW(NR4RxKd_ delta 419 zcmZpbT`Idln^C%i*CoQq`Svx_XSRB7Q*M2)Ih(aTY!@Q~14GGVH^%Fn4Ll4C4nUs5 zW;LeEjFVkiR0QQ27?`yf1b~8Iz$rADi$%F!2r9w_rL6=67?^+xEEpI#l+fiG6d-zm zBtHWK7f3J2N-&Ff`Z$u{DSV0w8rDb3p30@nfi~hbshGcnE4C8w*6?w|)hX z8DJpGz`zc3kQ7uM%sWOvOPUa34USMfFnKGeoC(klm^z5qWPMgCQMlic{HHZJj#Zr( qrjZY5xzOZ$EaH<_vhqxx$tp1UDC-+RMhA#JR#1Ixn-8%aW(NQ@H!$b` diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_vsm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_vsm_csm.bin index 5b77da87cc3690912d61213b8e062bc4acb69043..87536cda4d43c09e995bd4cb8cc24e7038278035 100644 GIT binary patch literal 7206 zcmeI0Pi$RB6~^aXJJ0cJl$Zxdtr5yoy0a?PaVZ58H8-yF+Nez&*=ZEIai3F{SW0Z; zKdM-OUR;61rXYd3V!;BzqC!H5RaI4}D;7mU2*jeBE&#FiB8zs@?>Be8>*-C5N+qC+ zjCAkJJ?A@T&YUyn+_|^E^vr1g_OE|75yp3yHwRmTTid6*A%xb!^Gr8P=y_~+`TEAq zjje9z>FL<+@~y$n>ekxe=Cgxtm~N0>>V~pG+U|zSBAwV>zPa|T8#|Xbw%2ynHrBi0 zMNvPWsON62tgWt#`O2y$+RQlfYcIdNyS zPEWUvG)Obkt#*U-*mP@5q_-yLugyL6?Z5u&)t@{bZa?ymGyCs9{NZ<6^731gA&jVh zMAw5NJg4iz($kmzuIHoa`h$8Jc(Ak+y8aSJ)eSoQv9S=|qp!#jUuX;-Iv5&wt`lNF z2SbB4s>^hqY4k^QnGS{qy{*f1Ff{1cfIUlBmoG0YUAS^#;ZnG?uz2y@bK%PQYfmjK zEY61ot(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hhfc{#zh7$FAm%IN97} zXL;*6ce{@Eb&cp>vE%$;)2Fs`vW{CD?+HN*u_xvM1Q~dgS%W=K#>5G3HJLwuo z^Qd(^P}`jy>Ao2)V(gxOvMtIGo_gnB@m~#`iyCD9(Yx7q{O0>nC+cDzy)`tr*{SOH XZp$8{)g}%ng%gZ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_vsm_linear.bin index faad3b63666d5d44433b9c450ed8c5ba03917188..5129fdb6b0b2e074fe8e1ad8a1f2b886f186005d 100644 GIT binary patch delta 355 zcmeB_eJQg+n^D?=*CoQqdHcf$g_6O7aj%%2Ov*y zvl`Q7MnQQ724*b=0iXaFa5_!aW09ZylUb#npMil(2rAqbsm@=KA^>uH?m4hUdzhEXf=5k>u*7r RVm6=_Mh76V`54<_b^xvREHD57 delta 387 zcmaDU(SH`j2t@WvO zK^4NBZ3MKW2_e?t2-O3Vw}Q%<04;&3vzpAuDldx7Yg&_?Sk-x8dia3$PM*jrF}atO Zhf!+sEY{zGj1CaLP_u3Rz@Z+OE3r!j!J^{pQYhHNCbH0!fpF z2kt#{&-u=oGv~~iJNNb$PY?HA`OVwoVQhP8y}!}Fxp}M;LTK$iPj|w&o=3NruCCo! z+vtR@o(^m;-Ry5IZ>;ohJk#%lsRrxCPAD6!%}%%=)}igC8!JD(zI9=3b7gB~ZM73# z5cfNYJ9G2O%JQm&FD+}J^-MCia_!po=5mq@BzZ9DEUqtK-M-P^NTN3+dZ-qyZOyH0 zEMH}$Gpnl@{k7x|d$_Hw<<;#z(#7?)t@&-us1trG#DUGF&FlRa*Iqi;U!R(44L4ZF zrds%tV&?R>uKn(h&-efN@~dIy-z`P?>_iAdqCe1e zSd6o}&MZEC{_lF;pRPZP(!hhI9n$r;*sE^vk&ljs@CmeHM|`0^c=%vw;JFS-03Qqu z-mot7d8R@4=`tS-4gQEO^T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`>?MX8%8--E=j*UVHJ%VUD!ycZ>w6?qT3qq+eXjM-%CSd8^3d}=x$>p&Qfs%ejP zD)SS4azl&1V4z1$(-x&}18Um-GCq1>H1QpSeUv=z>D2TaN2+yGlvPbr*J4Lv{=i4C zwk@l=uI4H9nzf4mj7N*i{+&sFA;Z7iuIV3j?D3>J<~&iy)YhOn_Bgg1RL6`<9kbUL zrEZ7RF?!VTVS3c@Oo{_M^qX~Te;nI*(o;>d9fPaNJXie z3L#zeAE-^%0x>Z*ZL_BF5gF|#t!e7))7CU+tD@BHF*SXd-sd&_;2y6$KGD0`@2M*H z66w7`bDYRW8QU7QzPwE2d;DWET3PmCt3a;WOQo8by7$_QBN(`18e>N zQ6uE#)7A*zB}J**V`}6uz0Ygp>1u>CtS`M~>l)~`t8YQKb2|U#`#&?JT#s(2J@<~z zB9Qg<6whUmx8I?uzBRLcj_LOX^9LriQ)6Z}I){%~-Yu%L3A*2wo&BSBAfK;Tm!dK3 zhSZUd@l3-$+s&|ve_uL~uq)lv;wv)VFVqs`_`$q?qLSH;_^t0T`2Ugjo0wob{^1-m z`G~!6{`XzI8mn*3LGsP^Pwu{u z$=RoJJ$xe{rxM?CV_#S*yWPa@+sFD$_;p zypD}JnN4<6skPnn*Z53 z$2}#Vhoo;_vU^!^)&CLv|E4IV*dXvfNO7}wk!$`jK$6A1lKlFcG2biclMm((9p)vr z`yD;;v$~G~t}%FLd;geBx;(rxdE^?6BN9*R;@!RdE johXZb^w-encBjhi&xWej=hwK`BpLZ8j~ZC!e+~ZwLdh&w diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lighting_vsm_linear_omni.bin index 99228d720c5f1c4868214e2fa0c3f9ff38098d6c..39d3bff0226457cc1e5889a8d73b85f8b193ab1e 100644 GIT binary patch delta 400 zcmZqHdaSvjmr*)E*d@Zr`QFl5JvK@i+H8zRI1AqXO=M(XU3S@l(iZV^E;gYWBXJFtGf~s)?i2@ZeIRFWU25TU;2eCi^q)rK{?im+ubruW^ z9GhU~aX{SltzQ9b28fVlU|?^8$^+d!S&E0()CkFJE(U=HN2qEb8_be|(k4K&VQ!F` zynp>B_*s`3We*Jb4Y5biF(S z12aqk&;(8)sA7;96HtJwL7~ABWHuC7Ffec^LDj&mZBT$oGw=hofXo2t6=Mb30;HK7 zfCNK>JrG-iSRepW2Q;T1tZ*AYZiOHV4?!(tV}Tg_tzQ9b2#AnnU|@$i2V943Lg3+9jQ$mP=!2!r^ z+x&v5oRQOtK>)~MVBp%E!QzkLN^L&CD$h7sokd{td$ty4L3suSW-X{vplVL1$t$>& z6`i0WFd2|xOh9Q@po&i*_T(Ba>3V*k=|WJIZcr6W4nSoL4c0(x4`P7;NSzW?-7_wT zNlXqP8B}!^3=ABbVCHc^od2y~0i+NNWEmLPo1pSQ7uACWxu60@NR|M_8XTdTVDeH> zbtXVdV2*)_X*DQ7RWmRE&EbZ53hsR*d4$=M8F}OkVMg!)-3HSJ6N6c84h%JzoYmw2 Wp5KC2Py^Y3)-pN(iOn&*huHx%1T&og delta 531 zcmeybIbUl-FQasiuuFuKGw+NKMw9H4RUdWDt=-;LeU_1dfuU#f3Py8AP75Ih1_vOw zZ}SVLaz;)r1_2<4fx&8X28%xI4{AKzb7(v^)a?vldhiD9R}`xrIx)UI;1zw+P5*0!mvjFmNcL%QYwfWgvi`fq@I8 z7o=8<6=E}!14ypH9*C_$ED!*x1DOL-w~Ze|T|HbO$ihQV3)xs88ou=_fXn~`Sq27n zn1f)!0P~I!(2^#oUZ7ZmBUBGe-U=#b0<;6B4k9*rE;SkWIKlt` diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh.bin index 44fd0cfd999c17c41ad87ae5c16fa5de8f1b1776..bd64ce32debe524e008e6e52d6634a100db50499 100644 GIT binary patch delta 161 zcmX@F+OIf4S0+ZlCBn(M^-Z+=lf#dqvf6?!^_+g+&B(yO5F;?r^BPwMKLdjUkavrD zvnFF7^W@tsCnm4w^O(%fHfQpAwkMP0xjZJzbA*8D`#^fVp!Z}hR*A{GI2(atPbQ~x z&jG5Bm|V}}GFe|BWb$hc52zaP$((#mK)E@S^ZDlh<>pL&FA%}VGWi3C^XBz}3XA~v C!aFtq delta 757 zcmeBIJg+)IS7wfoON5j2x9pZm)wFvL3x4z|#dCx$WMp7qm?JdN^BUI*K?Vi~ATNt$ zvnFF7v!)RP1E&*%08oU1K?_PVI)J$j5V~Q%I|Bo^(_{r6`N_9gmZ*SqG(lBb;m|R; zp7jZF3X|E0ROrq=hd2}6*#jn@=k_5^aXkmo)_Y7|%}J~ixQJBvpC@9nHMa|qZsjJ@ z)OwDj$+bL9#F_e^he%UFZvD(lv|B?ack_7==Y)C=kID6XJdA9U*u^LNa~Ke%YjZxo G0wVwqmu>X` diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh_pd.bin index 071e3a6f3a426c0aaabdb0fb4705137846c26cd5..5f675f24a27b465454405aacbb524f7ee28b2db3 100644 GIT binary patch literal 5631 zcmeI0&ud&&6vywpv@_!f%^0d^KpVOe5votBrO=R6TnI9R zuHCy9+(h@%Y@{1Eajk!Wxaca2y7l|H_nw#c=4WWyLPHPSckY~X?z!iD?|J9Fd5zZm zvFiHQ^NFi{vwGvJFV}8exw$#!oGZC!H&-{;u3f+R?d5ChZQjXJFs@c=bxNwXnRG2hdi_)X59UugZ_L|7wilCos_RT<+dYK&=Nj?X%G+;p{Q^RDbS;=J6k zPF|kbGTGJyE_e`9B?FHNT}4jo&}hjYpfHYfrzO!`AS#b>K)&km+naI`*?X zunFsapOVko*|@F|ZITp=BAt+ryV0(EGWfcGD)2X>53oy8U0i!Q4Cc=LQwwpuA7jLh z*xOCXs>uv1_MMD%9q>qZ&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S&@#Q<%S85gW{k`gOvNHesW|MjQ4cYJ(kP z3fQ(sAEjUV&VA4i*V6j4PqSislsF$G+Dqi9ZzkrJxMFVO_{uFYa6}tN+J|xE-aE*V z^>61$oDUN1C355|9ntv26*8 z$C$zz$rX9WoC>>`TlQA82^$SI+OQu>*fFLA8@}wVPQ0T{*l4iPbLsrkvm^43F$HYf zTY7SJS~u;ltk~Wn&IgJ166Zf6`-sLTE}vVz+c>_~jTkthjU#Px+lixG5j&m*%5CvX zAh*$``J=%`8}<_kJH`~|Z`fyu5q78j7W;`eF<_$&JNC2jOR!@ugxx78alM6&4{Wqy z$9Q3P+Y|6*PZW8RlW0>;&|sqt`>fjJJH`}vpVwQ`?reqa-|^V&UatN2^^U%S+O}*I za>qUEgM@26ulkZI-~JSDtg?54g7@EdydjGC!^s9dccc#z9q^5Zy)o=PBD_Q1GW+kN z2jWN$xLf+f!*Y=4$Q|kBdq|E4azJnJ$(_Ul@nXK+cyTZKAn|ay``^6C7w2_ZzPM9; zkT?Qf+;wHVxQ~61=rJ$Wu^TV$U>_uofLFJ5&Tt$gTxW=;@mFd z#eMIC#1Zfs(5Pj+cq{lI(PLih`)<5=ANU~AV_xhp?*FoU@wV_mqQ|_*S2td~OMH+x z0$$zrJ#QKxBznw?b>yv6wvN1qe30k?uS>Z*9bOc8Y3$27ulmN*e;`|Owl8oTw#GF+Bw6x;X5+Mc#21bT0j4lyQ&S5z| zFL%!PlPY(}^KF2=!d*t7+?I)|izUAR84f^f3&fEO3@mPa3P2W6^Ff3Z5__@vXVvEE!cylW$~Rq3=A?%49x%k|NAdCQP`W$QqRaz&(hRL&)Cq=kYQuNUPb_O CJ`VT* diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_cubes.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_cubes.bin index bdffeb9c0762036264e7b70bc3bccdfbbec05437..5bfd5497f0b32a68d4c79cdd0f125d2758d048dc 100644 GIT binary patch delta 49 zcmeBV>}3>o3-(}H(*53(fuVtcf%*UcfB(fN3VRC~8t57585$TE8tNIE8C#ezte%)7 F3jl`=4(9*> delta 45 zcmeBW>|_*n3-(}H(*53(fuV+hf%*UcfB(fM3VZWe>KR$;S(+N@85Z2Il|&|NU2v`<4ZHvV delta 37 tcmcb|c#Cm@H0K@$2Il|&|NU2*s8Y>msb^%VXK8ArXKZL_$S`rEE&vGL42%E( diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug_line.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug_line.bin index bdffeb9c0762036264e7b70bc3bccdfbbec05437..5bfd5497f0b32a68d4c79cdd0f125d2758d048dc 100644 GIT binary patch delta 49 zcmeBV>}3>o3-(}H(*53(fuVtcf%*UcfB(fN3VRC~8t57585$TE8tNIE8C#ezte%)7 F3jl`=4(9*> delta 45 zcmeBW>|_*n3-(}H(*53(fuV+hf%*UcfB(fM3VZWe>KR$;S(+N@85i_@% delta 40 wcmX@Yae!k&BIg}u2Il|&|NRfynB~mKXQ^josb^_wq-ShsXvna6KVvHs06m5cy8r+H diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_blur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_blur.bin index f426518b03645c35f34ff67383fac2b1ac22c99f..4d331a3cab1670c81f6168379f72596e5f950fa1 100644 GIT binary patch delta 42 ycmaFG@{VPKG-m)41M~m?|NbjaRH+s+G|)59Gc+(TG}JRRGqx~cSiN!WUPb^xXAUI* delta 38 ucmaFI@``1GG^Y;}1M~m?|NbjYRH^2()HAZwvotl*Gd46dWZ1ZIFCzdCFAVhn diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_bright.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_bright.bin index 38c67736508b74cfd7e1d8880e61ad9865bd68d0..1670d6734f8d843d315ffb4980727ccabd152552 100644 GIT binary patch delta 273 zcmeyt)4)5ylhcHaf%*UcfB)S#25~bA85-yr=ouOq7#ivsni*S|Fsz=O&8Q&200hRy z#{0#$U$oeFWt;ux*^DvFiV+M9EDQ|n4GauV8W@3?n}K1069WS?BLhE3Yy#tC2WI7Z zR-gz20|!v#KTs6|NEJ{8Bbd*{uxbGln9mHAd%1v(fdMGQ0py1^Kx_c9LHhnL0GRK=KqtUm0g~qdx&mefCqt;}0+0eGpazf=VG3Y|fW(-9c=B!5xd0@oJ@o(p delta 269 zcmYL@I|{-;6h-f3j2aU^U9htiB#;EbRDy+ICqlr&J-7sC2|{Xd>U1J#r)v=0fwKrJ z$CrtpVVZZ}J%=ZnPj5SO232saUwV32xU7`~Q4%D>D2T%_M7CzVP8`Qq|9l%=?x!*6 z9rtX-yAyz0XbV7XSzXBrK))`mY|i~`YsDi-3{pg delta 38 ucmZqWYvh}t#d(E|f%*UcfB*F+8n5QF)HAZwvotl*Gd46dWZ3vYlnnq31q`_W diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_mesh.bin index 7c2c50723bd4eec3a37786f4fb30c36e4e763022..7553b3acc9466dcb92896bc8f1a38224275ceb3a 100644 GIT binary patch delta 490 zcmY*VyGq1B6g~6GMpFn{+1UtU5ffHq!D5AN1+fU&+AMyAu(N;Q5)kYLd=%Nz&rmx* zA$FG5j%Q}W24QZv=W*|x$wT(Fd3U%mGEmzI)cq_!rpmiGHF_xT7@aYmXZU>OSfLv>PJ@k#! z@GS61>eZUtCn44xw1BpPx}slkF6c7qu%TCwdtA_PK`=`id-IAD^@V!9POYR%0P$Lh zjJ+rKG#7YwDWCvB{1f9|bTk{p)l~2eY zk{1~AiXjn*6O_)9vtb5=C3vQQPf=2*m}*LDg3nbjGAmGx5@$AyVvuMQ4Z8O_NYsO- zsyEAh`!?&*rJ4)lUk7yEGbZD}3i^!Fgz9=>ucbX&Ui-K?&hsvw34Old(Rr$ddz~!5 zY(7(WgD0kV_L`z)**9Jl{jfzi^UD-?c|-{#c9LF!2JLJzyEF`EcJ{m^(;+|^o$J+4H-5UFv_w501T50k^lez diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin index 873b11cf56061ade22ac34591fb95e2d5db2b65c..3a3ecaba313faf1a2323d387c7565cff56227903 100644 GIT binary patch delta 30 lcmey%^OtACeMUh;13d#hLjwatLp?(?V+#|8%^w(hSpb>R2>k#6 delta 30 mcmey%^OtACeMUh`JtIp!OH(5~V?#qjhSjTAZ~nm8%K`wUI|_aP diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_skybox.bin index a68ed6cf51deec196d46d3a1141864d2cf2e723c..2e49131b0a3d62f3a3b6f9793b814ef5bdb4d439 100644 GIT binary patch delta 42 ycmZ3(vVmoSCMOFM1M~m?|NiSwG+HfWXrO1HXJ}wxXsBmsW^7@?uzKTbM@9fF5e;_$ delta 38 ucmdnMvW8`XCMN?E1M~m?|NiSuG+NDPsb^%VXK8ArXKZL_$guIfBO?I&iVQ~p diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_instancing.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_instancing.bin index bdffeb9c0762036264e7b70bc3bccdfbbec05437..5bfd5497f0b32a68d4c79cdd0f125d2758d048dc 100644 GIT binary patch delta 49 zcmeBV>}3>o3-(}H(*53(fuVtcf%*UcfB(fN3VRC~8t57585$TE8tNIE8C#ezte%)7 F3jl`=4(9*> delta 45 zcmeBW>|_*n3-(}H(*53(fuV+hf%*UcfB(fM3VZWe>KR$;S(+N@85-;H7ceudS}<9X tIYpkEfq|Kcfw6&+VO1j|LnxBrPe7JUUch{pnH6Y31B*K&!{iezW&pb@G8+H@ delta 361 zcmYk1Jx&8L5QU$Aveq_Gq@V>M+C>`#$~G(#1r1GvR>}cTu8@++4TyXJS4j8(6r2Id zl@`#fyKu2QpPw|rZ9? diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit.bin index 38475da682f0d3f5a380a03f6490b29169524a3d..05269c3a821ab3d80ed79126b8e6117d26a64740 100644 GIT binary patch delta 55 zcmdnaxSMf;1m^+<2Il|&|NU2*s93ISXrO1HXJ}wxXsBmsW^7@?u$qy9fr){Gzkz|_ L$%6m?85kG<={pb& delta 51 zcmdnZxSer=1m_$E2Il|&|NU2-s8}v( diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb.bin index b041df0bda7f5d576e3d151eac083a99f9461e0d..29c0b1608bd92fef19aa9e7d6fbab04aa6244cb1 100644 GIT binary patch delta 42 ycmX@je4crN1m_k;2Il|&|NU2*s8}v!XrO1HXJ}wxXsBmsW^7@?uzKS%RYm|pISrlw delta 38 ucmX@le42TJ1m^}u2Il|&|NU2-s94Ttsb^%VXK8ArXKZL_$gpvhDkA_7p$u*S diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_blit.bin index 6e7587839de0ebaf15f95003db8c18e55e462694..b209ea65d9d0ff7414241fe143f7c0ad9854d4c5 100644 GIT binary patch delta 41 xcmZ3>ypef=9%ln11M~m?|NiSwG+!-bXrO1HXJ}wxXsBmsW^7@?uzKQ$y#O#p4qN~L delta 37 tcmdnUyq0-_9%l_B1M~m?|NiSuG+)hUsb^%VXK8ArXKZL_$T0ECUI6~u4J-fv diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate.bin index 332cd07bc4a2b66d089e32ca3e0a758d9c733044..4c5d7f1b374d4735263e5dfbe782721e6c3a0f0e 100644 GIT binary patch delta 42 ycmZ3_yqS4|1m_G!2Il|&|NU2*s8}v!XrO1HXJ}wxXsBmsW^7@?uzKS%PDTJVH4QER delta 38 ucmdnYyqypef=9%ln11M~m?|NiSwG+!-bXrO1HXJ}wxXsBmsW^7@?uzKQ$y#O#p4qN~L delta 37 tcmdnUyq0-_9%l_B1M~m?|NiSuG+)hUsb^%VXK8ArXKZL_$T0ECUI6~u4J-fv diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_particle.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_particle.bin index c52033f7e3bbc833936c2e46315d3bc5add621e8..c20337adffc7fdbd0522fb0e5fce14971accdf87 100644 GIT binary patch delta 50 zcmbQjJcD_HBxemH1M~m?|NbjaRH~LXG|)59Gc+(TG}JRRGqx~cSRKf~z{6vy9pU#@pKgw#NX4!Xpp)h2f|X-nOD3CMiXs z@}`KwX-LfFsy19O(H6;)$tWlRC)=e$hYD3n!Nv3?IDGGW@Av=zAMfNwIJ*%(^?G~u zfj66X&Cp8N@oQ>O4Qi^YX+iD9b3F{s%9TEKTpx?kGXP-dxL!BL0Yn*m7JzB2rXR>8))z`X%}1%u zaSe}h3a;mW)AZ3!Qe+n2i4lBK&?$1^;5^rHz0g6zDfVqg*-!ja((sYPcp z-4qig087H|;t-QCQ4BE2T`W!uT!JQkDE7L(Qn%14!Cy-R-~b*IpkT^q>;;(YCiX^! WP8lXG4=Dh`y?9uOF&XbFul@s#_n*fA delta 424 zcmXYrJuE{}6vxkfudluDMd~|Z5!52IQ8aByTJaGB0|}E&LYF33BnI)UBBD8i1$i|3 z^`hE55w=Fst(8=S7>a?>Kty7oPQ`G~z32SS|Cf9HE?m6}+Z}TA1&F26PstJL)vaDf zx7Xoybvt^TPA7!kJh;T_8aY&I`P{gljt>Ba^0}OE5t_$-W~?1`oeCe7|Y=uMve6-U{c^t$CYp|vtaUQRJ6bYW}+^%M?CcY#IBeN z_af)CR?sjMZ^PASN>tz;Q%N@~q89ODySW07V^8GUiU%kZL{%a|!b72=j!S%)h6PN; zTy#IU5u13m`b>D!Q6)}@gVhC+>XytV)svXoGkz66&Lvk+E2>r z8&aD)WeF@QgD=%$?4PVLi34aHThl{~<9yo2xUrF*5kw9p+)Q^EwWm!&HHQyP0uTXA jDnLS&aq!H>WMlqpOsJM&S~C#=5dPuixu3}>Tul4|*j|re diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_black.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_black.bin index 1759b12105ba67fe826ad5165b9cedeabed0d74e..b48ca9a9d7595c2efbae74f4bc67c004cad3e11d 100644 GIT binary patch delta 49 zcmbQrIFnJ>E!cyF0StN=7?}V6|My>fqOiA+p@E)(o}qz(p`o6knX!cl!|I7SngB3e B46pzI delta 45 xcmbQqIF(V@E!cyF0Sr1A7?}V6|My>PqOdogrJj+co~5agp0S~!A;ZK1O#lH=3xEIs diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm.bin index d0c8760806a8389ff0cfe46cb668e5eec54f6001..99f5564ce4d8f74cdac6a9b97dc56902194451f6 100644 GIT binary patch delta 46 zcmZ1`x=M6|HX~;ZCj;~U|Ns6^+ib$<$|PiHpl6_GXkcJysAp(qY+=H%dUHFoJUakt C>%EV`>XJn~oX=%EV`>XJn~oX=dnn8mRtat CU=MBp delta 42 ycmX>gyGM3IFC(W8F9Y-c|Ns8)-aL)*J`gdqj3aFC(W3F9Y-c|Ns8)**uN$K9i84fu4b$p@D&+p`M|cv4si4>dnn8wp;+4 CXb*k> delta 42 ycmX>idq8$WFC(V`F9Y-c|Ns8)-aL)*J`Y;n~^hwlY#mF|9}6dZ8l+aWfC$p&@<38G%zqU)H5_QwlHB>y}6zFI~xFR CZVtKt delta 42 ycmZn?{U@?Pn~^hslY#mF|9}6dZZ=_bW#Y5cGqTjPG&RyQHZ(M3*xb$hoecmvA`OZF diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard_csm.bin index 975f1e5efed0c4025561f6ba499c5ed8c2210088..c53e8814a34941475b62c446b3a5ee33da8c61e8 100644 GIT binary patch delta 46 zcmbQPG+Svy3M1zheg@|M|Ns5pyE&KfA(N1yfu4b$p@D&+p`M|cv4si4>di4MyLkYY Crw_sa delta 42 ycmbQOG+k*!3M1zReg@|M|Ns5pvpJXXArqgao{^=VrKypgv7w%EV`>XJn~oX=di4M&v^i? C{}6Hj delta 42 ycmX@EbXaLa3M1zoeg@|M|Ns5pvpJXXArqgao{^=VrKypgv7wdnn8vRnX* CC=UJr delta 42 ycmZ1?yFhkBFC(V_F9Y-c|Ns8)-aL)*J`dnn8yj%c- C2oAmg delta 42 ycmbOtJ3)3sFC!-dF9Y-c|Ns8)-aL)*J`Ji1`Un? diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf.bin index 4ed6a9797331d50e22450a620b92a1e0f221fcdd..55bce42f02a6661bbba8e314387c94a581d7fc8b 100644 GIT binary patch delta 30 mcmZ2(z1(`kPG&(v13d#hLjwatLp?(?V+#|8&8L{}N&*0lI|$4G delta 30 mcmZ2(z1(`kPG&(%JtIp!OH(5~V?#qjhSjTAZ$8C*R}ui2qzX*{ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_csm.bin index 0a87a3d68dc1e0e588b1f6d73c7ae0d329631a1c..7427157c5fa8b5ebade37a3156b154e1886655e3 100644 GIT binary patch delta 32 mcmdn6pK${a^|1&V8t57585$TE8tNIE8C#ezY@W{|7!3fblL-m{ delta 32 mcmdn6pK${a^|1(A>KR$;S(+N@85i1!Ds-r{0fTz diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_linear.bin index c5c2fe28bd4cf69f7b3a7e68438678300343bba0..a8c173e3c39d0c21647c79380099746188b3c8db 100644 GIT binary patch delta 30 mcmaEC@z`R+PG&(v13d#hLjwatLp?(?V+#|8&8L`WN&odl8)!lVG0 C6c3L8 delta 42 ycmbPhH`8vzGDgkdl8)#AE@c Cz7L-O delta 42 ycmccXeA9WuGDc1V1qSB-|Ns3zx_Lb#8#AA!o{^=VrKypgv7wdi4M`}qKy CTMym< delta 42 ycmbQQHd}2&3M1zhK?dgk|Ns5pvpJXXArqgao{^=VrKypgv7w0#HY4W_P6p=x|Ns4;y4i%$m5I+%&&X2G($q-L*wE0BVRJWgJUakWIt{D< diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_linear_csm.bin index aeaa4e73b9eae43c9745d708cf17139503282671..80befb85a013f3aecaa30e51d8d6e9647f944f18 100644 GIT binary patch delta 46 zcmcbudS7)z3L|HQAOrLN|Ns8)-JHw#kV(kUK+izW(7?dZP|wiJ*usQi_2w9sdOiTB CgAd#Q delta 42 ycmcbwdRuiv3L|HUAOrLN|Ns8)*__MxkcrPy&&X2G($q-L*wE0BVRHgYJs$vTMGmY0 diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_linear_omni.bin index 8866fbbb2d62c3a588c30ad5d78810b9894963a0..f0bdfd66f7b00097b1ebb6475514f2f7c6a69c75 100644 GIT binary patch delta 46 zcmV+}0MY-T9;6|Ns5py?GkreI`CjJtIp!OH(5~V?#qjhRy9PbGZOxwhqt$ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_omni.bin index bb19f6244d22475e9725ee7f3306652de8a528df..856c659ffe625c8419e702d286a6ae01fcfc091c 100644 GIT binary patch delta 46 zcmV+}0MY-j9<&~?jR6Uy4FCiG|Nj5Hvz7th0unJWE-)@JFfcJOE-^MUI5YsOvx5Y! E3a6kDKmY&$ delta 42 ycmdlYw?S@0FC*syUIym>|Ns5py?GkreI`CjJtIp!OH(5~V?#qjhRy9PYq;~Eaw7d2Il|&|NU2uG delta 45 zcmbQp)XOC77VN=NFs0}R0|Nsi1M~m?|Ne_j6!zw`)HAZwvotl*Gd46dWSCg65CB4? B4bcDq diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.bin index 1c98ebebaa91c6abf13ceae762e3b133af4e875d..e73a81647e3fc754152385dae550939a99162773 100644 GIT binary patch delta 49 zcmcc1_>fW9E!cx)iL_@G1H%;t2Il|&|NR%ADC{j{XrO1HXJ}wxXsBmsW^7@?uzF%n FApnnR4^jXC delta 45 zcmaFJc$ZPwE!cx)iL_@G1H%Od2Il|&|NR%6DD2H=sb^%VXK8ArXKZL_$S|>>5CB&8 B4k7>m diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.bin index f146f09bfc05c50fa6cea6a2e5cca4c1baf5b791..227ada1b7b9c54bfa173310ec0ab13ac1e5b5e97 100644 GIT binary patch delta 49 zcmX@hbdgEeE!cylU`o*s1_l>K2Il|&|NR%ADC{j{XrO1HXJ}wxXsBmsW^7@?uzF(7 FLjal75CH%H delta 45 zcmcb}be2ijE!cylU`o*s1_lR42Il|&|NR%6DD2H=sb^%VXK8ArXKZL_$S|?sApl@x B4$%Mr diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm_linear.bin index 89745b960ceca00d5c8ccb07772e986e364be844..a83254c5e89b90fef6e7d4a251c403da0a5dc46c 100644 GIT binary patch delta 49 zcmZo=>SPjj3-(}HBJEkl!0?BGf%*UcfB(fN3VRC~8t57585$TE8tNIE8C#ezte%)N F699BT4)g#3 delta 45 zcmeBVYGo333-(}HBJEkl!0>~Cf%*UcfB(fM3VZWe>KR$;S(+N@85?Ch B4a5Kd diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_texture.bin index 4cac33773e762eb647a437b84688baaa5703d51d..33a85bb29559b1ee140ff704b50d89830ee51dfa 100644 GIT binary patch delta 41 xcmcb`c#m;{H0J>Z2Il|&|NU2v`<4ZHvV delta 37 tcmcb|c#Cm@H0K@$2Il|&|NU2*s8Y>msb^%VXK8ArXKZL_$S`rEE&vGL42%E( diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth.bin index b4f1521055242922abfbadd58088e690056111a7..6fa413cd90c70a05e891b0693c1c62fe7cb5ea3f 100644 GIT binary patch delta 41 xcmeyv)WAGJmotEof%*UcfBy|8nynWyG|)59Gc+(TG}JRRGqx~cSUvG`Cjc(_4jTXf delta 37 tcmZo*{=+mum(z!lf%*UcfB*F-nyu%v)HAZwvotl*Gd46dWSIE969D|s4C?>@ diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.bin index f2b3c657c044db2dca40fb122efbd002c354ba38..23cba5789f1ee982a8e9a736e40df40f1283b048 100644 GIT binary patch delta 41 xcmZo*ZegCF%NfGR!2JLJzyAgk&DIMU8t57585$TE8tNIE8C#ezte*I}7XTb>4XgkF delta 37 tcmZo+ZeX6E%NfAP!2JLJzyJCZ&DQf->KR$;S(+N@85;~Eaw7d2Il|&|NU2Gu{F)%JLE-^4LF)=PNHZwRh0IRe00)Yg$ Cj}blq delta 40 wcmeyx_lE!cyF0StN=7?}V6|My>fqOiA+p@E)(o}qz(p`o6knX!cl!|I7SngB3e B46pzI delta 45 xcmbQqIF(V@E!cyF0Sr1A7?}V6|My>PqOdogrJj+co~5agp0S~!A;ZK1O#lH=3xEIs diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.bin index 57089f27fe2b1559c1713f3592463eb14573ea01..e240cc56e5ffd5a2c31e83548f0eb7e9c2762b9e 100644 GIT binary patch delta 41 xcmaFN_?&Tq1m_tB2Il|&|NU2*s8}v!XrO1HXJ}wxXsBmsW^7@?uzKP$TL3;r4cGtx delta 37 tcmaFP_?U5m1m_6`2Il|&|NU2-s94Ttsb^%VXK8ArXKZL_$S`r0EdUGB45$DA diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex1.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex1.bin index 49110e0ed14ad2730dd1d50178dbd02ac2855005..19ca642da9a5602ac816ae153b2edbbb67206e4f 100644 GIT binary patch delta 49 zcmX@fc$QJvE!cyF0Spc>FfjlB|L?!}L}70sLjyenJwpQnLqk17Gh+)AhSd{uVgX9| B4S)au delta 45 xcmX@hc#=`rE!cyF0SxvqFfjlB|L?!pL}70}OFbh?Jxfy~J!3;dLxzb3u>cu;3{U_7 diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.bin index 7752be6658dcb32491bc0629be15aa92ee2e6e99..e4fa04e2975294a705be9e4282136a4fa0a00ee9 100644 GIT binary patch delta 49 zcmX@fc$QJvE!cyF0Spc>FfjlB|L?!}L}70sLjyenJwpQnLqk17Gh+)AhSd{uVgX9| B4S)au delta 45 xcmX@hc#=`rE!cyF0SxvqFfjlB|L?!pL}70}OFbh?Jxfy~J!3;dLxzb3u>cu;3{U_7 diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.bin index b201b42a274b3ba163c9f8d0da656ac94634909a..a3163370c84fb0e108397fe9e11fa0c8ad110f95 100644 GIT binary patch delta 49 zcmbQrIFnJ>E!cyF0StN=7?}V6|My>fqOiA+p@E)(o}qz(p`o6knX!cl!|I7SngB3e B46pzI delta 45 xcmbQqIF(V@E!cyF0Sr1A7?}V6|My>PqOdogrJj+co~5agp0S~!A;ZK1O#lH=3xEIs diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.bin index 57089f27fe2b1559c1713f3592463eb14573ea01..e240cc56e5ffd5a2c31e83548f0eb7e9c2762b9e 100644 GIT binary patch delta 41 xcmaFN_?&Tq1m_tB2Il|&|NU2*s8}v!XrO1HXJ}wxXsBmsW^7@?uzKP$TL3;r4cGtx delta 37 tcmaFP_?U5m1m_6`2Il|&|NU2-s94Ttsb^%VXK8ArXKZL_$S`r0EdUGB45$DA diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex1.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex1.bin index 49110e0ed14ad2730dd1d50178dbd02ac2855005..19ca642da9a5602ac816ae153b2edbbb67206e4f 100644 GIT binary patch delta 49 zcmX@fc$QJvE!cyF0Spc>FfjlB|L?!}L}70sLjyenJwpQnLqk17Gh+)AhSd{uVgX9| B4S)au delta 45 xcmX@hc#=`rE!cyF0SxvqFfjlB|L?!pL}70}OFbh?Jxfy~J!3;dLxzb3u>cu;3{U_7 diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.bin index 7752be6658dcb32491bc0629be15aa92ee2e6e99..e4fa04e2975294a705be9e4282136a4fa0a00ee9 100644 GIT binary patch delta 49 zcmX@fc$QJvE!cyF0Spc>FfjlB|L?!}L}70sLjyenJwpQnLqk17Gh+)AhSd{uVgX9| B4S)au delta 45 xcmX@hc#=`rE!cyF0SxvqFfjlB|L?!pL}70}OFbh?Jxfy~J!3;dLxzb3u>cu;3{U_7 diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svside.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svside.bin index 4ba5d987404dafdd0d1e4dae71d606e2c6eb1233..29eab2560977984142f14ae0bbb58c8035c529f0 100644 GIT binary patch delta 49 zcmbQrG?Pi#E!cx)@Aj|R3=BMs49x%k|NAdKQP^9^&_K^X&(OfY&`{6N%-F(&VfDnE Fl>m*J4~GB% delta 45 zcmbQqG?hu%E!cx)@Aj|R3=ABM49x%k|NAdCQP`W$QqRaz&(hRL&)Cq=kYQrMN&rE!cx)@Aj|R3=BOC49x%k|NAdKQP^9^&_K^X&(OfY&`{6N%-F(&VfDlu FO#q#n4}<^! delta 45 zcmbQqIF(V@E!cx)@Aj|R3=AC%49x%k|NAdCQP`W$QqRaz&(hRL&)Cq=kYQqhCIDkU B4paaD diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.bin index 6e3494687484fab955a08d0ea64053d09b947c2b..40f240d9f77e9532fea126cbcf9d218048e6c4b9 100644 GIT binary patch delta 41 xcmaFN_?&Tq1m_tB2Il|&|NU2*s8}v!XrO1HXJ}wxXsBmsW^7@?uzKP$TL3;r4cGtx delta 37 tcmaFP_?U5m1m_6`2Il|&|NU2-s94Ttsb^%VXK8ArXKZL_$S`r0EdUGB45$DA diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidetex.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidetex.bin index a299cf2199cdbc182a49a8260ef8d396338b75df..fe9b49ff047462170dad6aff097120274070e152 100644 GIT binary patch delta 41 xcmeyy^owbNG-nJW1M~m?|NbjaRH+s+G|)59Gc+(TG}JRRGqx~cSUqv=NdPyA4le)z delta 37 tcmeyx^o?nPG-m`O1M~m?|NbjYRH^2()HAZwvotl*Gd46dWSF?|Bmf2l4F3QC diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture.bin index 4cac33773e762eb647a437b84688baaa5703d51d..33a85bb29559b1ee140ff704b50d89830ee51dfa 100644 GIT binary patch delta 41 xcmcb`c#m;{H0J>Z2Il|&|NU2v`<4ZHvV delta 37 tcmcb|c#Cm@H0K@$2Il|&|NU2*s8Y>msb^%VXK8ArXKZL_$S`rEE&vGL42%E( diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture_lighting.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture_lighting.bin index 216041c92bed6c05d423c6d5caea6bf25c933ca0..1c09e0732be9436bf3ca2cec151a58469f174351 100644 GIT binary patch delta 151 zcmeAbm?$ve5vLA21M~m?|NeJwd@anRZ)l)rpl4`cU}&gkXl86-!mv7!fq|8mfqwx5 zLxVj77yBf(wD6nNM2-X2Z~3sD+AfJ?7<)rc5_aUp8x-W<^ce(H!Ar6 diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh.bin index 4ea4fa1d0b660812b6231b421971d00d19068a6b..5e7db6345dbc1f05b809fa0945de8a20f3b24bec 100644 GIT binary patch literal 2468 zcmcguJ#Q015Pf?e_K{ezM2&=tAVK5U3PK1JFiC`5BvQbfglJ5}SB#8o#YQv~Yf;i1 z|KOq^Avy2|oQ59|Bs%`U6;$*z9B+1g*rC6iJ-XSMH*a?K&NIH-YI;HcWz)gppgq{z zecF4oz1y!TKw;r^yW4rOH{9tB&Ktw<9NaYhldfRn!JYLB0Nzo==I|zKd;s3^wn=d* z3J!L7m+LV_aHK+)BG+6_cqq{)AA8NR<4BQB5s~@&gZ65>hV9Oi{obJWd|0`B|4OB~ z)!M4GSi`gZ%0};1ztg2suT^W+daYKkSL@eSuV2N{J-}Be$AG>qnHGK=9#fx)-Ldwy zZzm^fE0dqM#4mPt4i9{#y>Tpd&)6G`Z`>4Y#^e99>&eu9<08xFnP{LGiS9#b?qjM$ zJ5xLH5rT5;0sNMUNh25SSRsiD<_H6Fq}n$}TsAtetTQ~2Fs4ELrFb2RDFu^g1c~8f zPQ&Tr;~b|WHp3}?AmrL|TKs9w%qE-(=8>5}!Xf?N+64!c823NU zqwSXwiMP0d;F!SXYh2yvM)IYmPCx*(`-E^Zfxps4Ttqh%%X`Y z(EpthPG_Lx8500*py<1J!h*DY<4T%DJ<03=5-X_=LM$wVJ23>|-aE}6^BH{bqdcgERCw!M+OOhZJ`S5)d$dMmzH^oqXc`F_!_ zl&f3lb)It#AgIH9H#QBfIs9ko#xVmO# zCe#b7)8FGd|K!__2!L_Gfsm_)$g5kvX*zXlrtQzwt`K-tcif-Xscy?DcXm3o@@n0R z6GLmBm{*61xM!4@_qbBvqo?k zLliUxXi{{|6bBGMA`ln_T%Dy0HA%BGbQyq=3xQ=E(_9i|S@-NE(_<#LiG(nU$o&ny Ce3&Z$ delta 646 zcmZvYKTE?<6vglRlbAL^-AYjirL)1bs00fwI5~<0#l=Yw{1VU2QGKgJz^(1z;G~O- zt2zjNfeubiTBwNeykMzm3>@;_@11+@<-S%2)zhWYwMQaNztiAswYL!kjVOp#8bLD* zL)s#;7|kU_stK(@>rmTp4qkq_yd~;D>W1(cE_8=gnAG#EqIcLKPIs)yxPE7C!D*x) zc*yvY- zbM(0{5#7^|e0gdT@L_>pIEBQx^iSfbP-!|z+Ar|0vd@HGbbTzb<@&LtI57*_Bf^g> zhW!~CzMC=ccc*`S66`J0#Ah4dah9jA+&c1~-J{KH`N*<}1mfU{p{|XP?Dw~KPzF5oB#j- diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow.bin index 1759b12105ba67fe826ad5165b9cedeabed0d74e..b48ca9a9d7595c2efbae74f4bc67c004cad3e11d 100644 GIT binary patch delta 49 zcmbQrIFnJ>E!cyF0StN=7?}V6|My>fqOiA+p@E)(o}qz(p`o6knX!cl!|I7SngB3e B46pzI delta 45 xcmbQqIF(V@E!cyF0Sr1A7?}V6|My>PqOdogrJj+co~5agp0S~!A;ZK1O#lH=3xEIs diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow_pd.bin index 5c8c5a455f56ee823f16ae2fdc1df98a525f67ca..25b96b2653f340fe358c511d9b8d5e16caaaaeef 100644 GIT binary patch delta 228 zcmeBWdc;)k7VN=NFs0}RBZE+Bd`fCTNk(vTVos`mT3T^xi4Y?L10#bCBLnmQ|Ns80 zGB}4gI>|6FFhm0}NDL^=0OB)DWMBvZQU*ZG1jHb57a#@!Oj8+F0}TYKVF6-hpo)ox zx=w}$dIoxi1_p+PdWL4k7A6d<0~r`t85#H&FfcTD1F<_0I|H#jNSp~Q4l=#L8bpG? a#5q=sp%brb@-i`mEM#DK((wO3P!s@jj4*%z delta 122 zcmaFF)XQY(7VN=NFs0}R0|Nsi1M~m?|Ne_HIEOeo$p8hEffytPqQGDx1B1-OCS5g4 zJtIp!OH(5~V?#qjhCl`eRt5(C1wbYC5OodKAbR3KiHRSr7#Sw(FlzELFsxk2!0@C2 GY#IRVdmGjO diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_black.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_black.bin index 1759b12105ba67fe826ad5165b9cedeabed0d74e..b48ca9a9d7595c2efbae74f4bc67c004cad3e11d 100644 GIT binary patch delta 49 zcmbQrIFnJ>E!cyF0StN=7?}V6|My>fqOiA+p@E)(o}qz(p`o6knX!cl!|I7SngB3e B46pzI delta 45 xcmbQqIF(V@E!cyF0Sr1A7?}V6|My>PqOdogrJj+co~5agp0S~!A;ZK1O#lH=3xEIs diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_lighting.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_lighting.bin index 812a728825040c419f408e4b2680608a93ee98f1..c11e9833063b4d42fcc59fa22ac875f37d63bf04 100644 GIT binary patch delta 193 zcmdnNzlVRqTuvEw2Il|&|NYO}xNJJ3kfDK|fu5m(fuW(Ep_#FT3B&5i-b_l9TbYDJ zL>c%OFfcGQ0MULReSm?%;lSj{OaY7{lb88{kPfi{3l b18D?_F@eQGd%y-w_F;2p6xlq5O@$EvW!f$^ delta 178 zcmdnPzk`3mTuupg2Il|&|NYP0xNJHjpQWCWrJkj!k)E-kp&`R$eZ2Il|&|NU2v`<4ZHvV delta 37 tcmcb|c#Cm@H0K@$2Il|&|NU2*s8Y>msb^%VXK8ArXKZL_$S`rEE&vGL42%E( diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture_lighting.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture_lighting.bin index 00b56862be346ac322e318bb95874f3b673a87ea..c2d78611cd08f4526117bb1c54839d1b19ce2d1b 100644 GIT binary patch delta 168 zcmew<@K<2MI?glf49x%k|NCFIar<#bAwvT_13g0n14BbSLo;Iw6Nc53dzh3aA7c^{ z5oO?Cz`(%J07UzN^Z^D2hXa$ZFl8``Otxh<<`rRBwSbXV ziZC!N5SbjwY7FG}vf49>PCm;zAIQ#Sla~Z(0?9`(Ft9K&a5S(og!VwxFJ*IQ6xsZi Ht%nf+Vcaa! delta 163 zcmew>@Ka#II?fa949x%k|NCFMar<#bK1)3#OFc_dBRyk7Lqmqi6PT2Q85$TE8ul|V zFdSfDa5xaiz`!axc`cLpfx8CES|WME(dq6X2;jm+B_ffAOi@~ol^ z3=2dj$Fdp&`4d^~8AT>vWStLW7qZDqf;55TBN!N1m>4)3SQ$clAnI4LxigAx{>awD F2mo1DD`@}# diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_tree.bin index a40cefb711a001fdab586c5ad560a769f7af19ba..f2e470f057458e7e1336356b7d8b4aba031c9177 100644 GIT binary patch delta 43 zcmeyx{*QfvKj#`|2Il|&|NVEF81YZY&_K^X&(OfY&`{6N%-F(&VfE$|#%W9dei{!* delta 39 vcmeyz{)>HrKj#W&2Il|&|NVEK81awKQqRaz&(hRL&)Cq=kYRHM<1{7!M0O4s diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update.bin index 9b583ab3ef455d585c837a5764bbc7839d3cdcd0..c67c50a41d1e3b88edf5c8238b19983de571c9aa 100644 GIT binary patch delta 41 xcmcb~c$aa46z2g32Il|&|NU2v_G4YvRQ delta 37 tcmcc1c$0C06z3iW2Il|&|NU2*s9eowsb^%VXK8ArXKZL_$S`q(E&vE%42J*! diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_3d.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_3d.bin index abc86d23a09b92dbd5f521d0a118bafffd28aac2..d489147527a3a36ea5fa2ca1b11ed8709d148cb3 100644 GIT binary patch delta 41 xcmZ3@yqSCH8&H09bf%*UcfB%&ys#FUZ8t57585$TE8tNIE8C#ezte&_w5&$O{4Q>Dc delta 37 tcmeBTYGaxp&G~|Xf%*UcfB%&xs#Nn?>KR$;S(+N@85|xV3_bt= diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blit.bin index 8793fcf84de294b80889f4ece5edf4338290265a..2ca54ab67303350979ec985c09a806b177be187d 100644 GIT binary patch delta 41 xcmX@gbdqU;7N-m&1M~m?|NiSwG+r%aXrO1HXJ}wxXsBmsW^7@?uzKQ~NB}6)4YmLP delta 37 tcmX@fbd+g=7N-Ow1M~m?|NiSuG+xbTsb^%VXK8ArXKZL_$T0CkBmnqe42A#z diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blur.bin index 905e8dd5d7aa36756f4d2608ed5d4eca2896502c..f6316a80f0e13e2aad64e00f0c5e1a8d9f6d3ee3 100644 GIT binary patch delta 42 ycmZ3>wvlau7AFfc1M~m?|NiSwG+r%aXrO1HXJ}wxXsBmsW^7@?uzKSgM7N-Uy1M~m?|NiSwG+r%aXrO1HXJ}wxXsBmsW^7@?uzKQ~Q~)kF4dws< delta 37 tcmcc0bdhO-7N-g$1M~m?|NiSuG+xbTsb^%VXK8ArXKZL_$T0CkDgga747LCO diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump.bin index ae10af6fa40c2a8534191f064d2d6f0608e202c6..4c80f4cad6df42ae3ef6af4fd9ecceb37821276f 100644 GIT binary patch delta 43 zcmX@eag<|%87B`51M|QC|Nfg!v_B+dXrO1HXJ}wxXsBmsW^7@?uzE8;qY*OzMPLmB delta 39 vcmX@gagbwz87Bt|1M|QC|Nfgyv_HgWsb^%VXK8ArXKZL_$go+M(TEuU5%3Gs diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump_instanced.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump_instanced.bin index 19f743864cb790a47c0f233b8e589afd8fa24318..fc28518a841906e06d07460bf0e4637951eb1aca 100644 GIT binary patch delta 42 ycmdnZv7cjt2B!!M1M|QC|Nd)DG@K@6XrO1HXJ}wxXsBmsW^7@?uzKUwG-d!X!40DT delta 38 ucmdnbv72Lp2B!cE1M|QC|Nd)EG@Qm~sb^%VXK8ArXKZL_$guHd8Z!U@-3)U8 diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_callback.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_callback.bin index 5b24007c6dce39d3139d56f3984fc34d9451db45..91c7a717fe5e4cf4ae1115540cd07cf4934bf5ee 100644 GIT binary patch delta 41 xcmX@he35yA9_Io^2IhbN|NYmWXuev=&_K^X&(OfY&`{6N%-F(&VfDlhcL6?!4%+|# delta 37 tcmcb}e3p5F9_JiJ2IhbN|NYmSXug`yQqRaz&(hRL&)Cq=kYVDNy8sKX4XXeE diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_cubes.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_cubes.bin index 6bed4a49eb9591e570d8cdf2e72c3f12cb459f98..fcfb16e0d0dd283d23f21ac546ec28ed10159f46 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_combine.bin index a299604962cf9f86b4a6ebaa5beceb068aca2497..fe8592c138dd449fed38182df0fc8d75323178c5 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug.bin index a299604962cf9f86b4a6ebaa5beceb068aca2497..fe8592c138dd449fed38182df0fc8d75323178c5 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug_line.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug_line.bin index 6bed4a49eb9591e570d8cdf2e72c3f12cb459f98..fcfb16e0d0dd283d23f21ac546ec28ed10159f46 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_geom.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_geom.bin index ae10af6fa40c2a8534191f064d2d6f0608e202c6..4c80f4cad6df42ae3ef6af4fd9ecceb37821276f 100644 GIT binary patch delta 43 zcmX@eag<|%87B`51M|QC|Nfg!v_B+dXrO1HXJ}wxXsBmsW^7@?uzE8;qY*OzMPLmB delta 39 vcmX@gagbwz87Bt|1M|QC|Nfgyv_HgWsb^%VXK8ArXKZL_$go+M(TEuU5%3Gs diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_light.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_light.bin index a299604962cf9f86b4a6ebaa5beceb068aca2497..fe8592c138dd449fed38182df0fc8d75323178c5 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_blur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_blur.bin index aafc58d61d7ccbd891dcd7aba1cfff6bf0aafc82..db3143a625926140c4d9be4ad01d8ecb5ef94842 100644 GIT binary patch delta 42 ycmbQqI+t~V5oZPy1M|QC|Na|Hv|cY{XrO1HXJ}wxXsBmsW^7@?uzKTK delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lum.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lum.bin index a299604962cf9f86b4a6ebaa5beceb068aca2497..fe8592c138dd449fed38182df0fc8d75323178c5 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lumavg.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lumavg.bin index a299604962cf9f86b4a6ebaa5beceb068aca2497..fe8592c138dd449fed38182df0fc8d75323178c5 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_mesh.bin index f8a154140aa3762ae4fb856a8e8a542b864660d7..7bafd238112077f3f3fcf90ed14117541b254f25 100644 GIT binary patch delta 42 ycmX@ea+GC)5vKqX1M|QC|NiStw4N_yXrO1HXJ}wxXsBmsW^7@?uzKT*NJaoPG!4W6 delta 38 ucmX@ga*$<$5ho851M|QC|Nd)Fw4Tprsb^%VXK8ArXKZL_$guHEBqIO=+zgZe diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_skybox.bin index a299604962cf9f86b4a6ebaa5beceb068aca2497..fe8592c138dd449fed38182df0fc8d75323178c5 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_tonemap.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_tonemap.bin index c1734e3e3fc8c366594d8b44fb5d3c64112cbda4..56f1ecb2e447031676360602492faa99796129dd 100644 GIT binary patch delta 42 ycmeBWoya=Dh%<(Xf%)J6fBy|8TCW!}G|)59Gc+(TG}JRRGqx~cSiSMbR7Lmsb^%VXK8ArXKZL_$gpvvE+YUIehjey diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_mesh.bin index 62f5bd31daed904d5daa42659f7c7ddb400a81fd..242f27e7b1f145a6aa202ccee05266a48f4dcc36 100644 GIT binary patch delta 43 zcmcb{ev5sAJ?9K&2IhbN|NS?g=y6)e&_K^X&(OfY&`{6N%-F(&VfAK3#;r^MWF-z~ delta 39 vcmcb`evN&CJ?9i=2IhbN|NS?c=y96QQqRaz&(hRL&)Cq=kYTeb<5ngBEp-hy diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit.bin index 0bd10c7a53feb56d4ae0029536f1a6c144a15a19..9f612d358602e6f122a38da41d298a0314fe3508 100644 GIT binary patch delta 43 zcmZ3vXW(j8RrK^2IhbN|NS?aXn%;$QqRaz&(hRL&)Cq=kYTehqZA_mCK(K7 diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit_blit.bin index a299604962cf9f86b4a6ebaa5beceb068aca2497..fe8592c138dd449fed38182df0fc8d75323178c5 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_particle.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_particle.bin index fa1d3b9a4429bdaab22f6269a3a12402dafcf440..d727140eef3a1ce3bdb456d90a3512aa5de6d3a9 100644 GIT binary patch delta 43 zcmZ3*x{h^%F=qu61M|QC|Nfg!v^gYXXrO1HXJ}wxXsBmsW^7@?uzE8O<2*(HOVSOR delta 39 vcmZ3-x{7szF=q)A1M|QC|Nfgyv^m6Qsb^%VXK8ArXKZL_$go*}aULT87orSm diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_raymarching.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_raymarching.bin index 63ec02a3531e0e4acd416c9357c6b454b55cf09f..9db127f1b781e8aaf8d7af6e02c22a245c103b75 100644 GIT binary patch delta 41 xcmaFN^qgse0;dZj1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUqvuS^zKO4eS5_ delta 37 tcmaFP^q6Ua0;dBb1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF>XEdc)z47>mU diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color.bin index 4550c08d13753a732efba8ab2bbbd34699a07f5f..63a27d6a014ba809386e10c6243af6fd3e20c9d3 100644 GIT binary patch delta 41 xcmbQuG@ogL0_PtF2IhbN|NU2)s97&$XrO1HXJ}wxXsBmsW^7@?uzKRQQ~)t*4a)!k delta 37 tcmbQwG@EIH0_P6~2IhbN|NU2TyWd{z_ delta 39 vcmZ3+wuo&)Fy|R22IhbN|NXb081tUbQqRaz&(hRL&)Cq=kYRHy<4HyUEzb?4 diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_csm.bin index 6b819879e75a03856c0a47cb2742491d9d457fb5..5b190835b30713bbb18539df1715582c79e87986 100644 GIT binary patch delta 44 zcmZ3@y`Fo*3QiVQ2IhbN|NT$jxUrj2$k0H~K+n*?z|c_7(9GDvgkkk&FQ!Ch0BDR3 AK>z>% delta 40 wcmZ3_y_$Q%3Qh)A2IhbN|NT$fxUrj&&r;9GQqR)VNYB{N(2!xXA5$VT05QuA5dZ)H diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_linear.bin index 3bc8a261ee5702f03167760edc21f42ec2b1f4ff..4953a46cb261ed4482bd9aae72ec1cd955fbff41 100644 GIT binary patch delta 43 zcmdnQwvBBz>% delta 40 wcmaFQ{hE8i3Qh-B2IhbN|NT$fxUrj&&r;9GQqR)VNYB{N(2!xXAJal+08R@I5dZ)H diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_linear_omni.bin index 2c6c09c36c856d04727b998ee8fa15677125c871..fb5160146510620b5a55f9a85698336891090953 100644 GIT binary patch delta 44 zcmdnSy^DLoYEB+j2IhbN|NT$dxTT&^$k0H~K+n*?z|c_7(9GDvgkkk&N2XF{0BoTS AVE_OC delta 40 wcmdnRy^VXqYEBMT2IhbN|NT$ixTT(v&r;9GQqR)VNYB{N(2!xXD^n>m05yyaF#rGn diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_omni.bin index 7a0105a308db32205d3e8175df888d5b0a875aaa..37de03aa63e3a782e45538cffbe0c40cd95f2c62 100644 GIT binary patch delta 44 zcmeyy^^0r5YR)q(49x%j|NEb^aZ5d;kfDK|fu5m(fuW(Ep_#FT3B&5mj!dS^0G#O$ AUH||9 delta 40 wcmeyx^^I%7YR(fZ49x%j|NEc3aZ5cTpQWCWrJkj!k)E-kp&`R&S0+K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_depth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_depth.bin index 4550c08d13753a732efba8ab2bbbd34699a07f5f..63a27d6a014ba809386e10c6243af6fd3e20c9d3 100644 GIT binary patch delta 41 xcmbQuG@ogL0_PtF2IhbN|NU2)s97&$XrO1HXJ}wxXsBmsW^7@?uzKRQQ~)t*4a)!k delta 37 tcmbQwG@EIH0_P6~2IhbN|NU2G@QqRaz&(hRL&)Cq=kYTee<4#5ZJ6#RD diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth.bin index 3e5827745c042946248f539748a227d13c9a25fb..46332ef69183e0761ca1fd986710a82d6654a11a 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth_linear.bin index 329980ae388497cdd3554f34a3653fe0d0e9953e..0d28593e06a73358e266d7d4237cc357b94be6dd 100644 GIT binary patch delta 41 xcmcc5^q6Ua0;dBb1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUqvuN&qew4cq_# delta 37 tcmaFNbf0O00;dfl1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF>XB>??&46FbE diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture.bin index a299604962cf9f86b4a6ebaa5beceb068aca2497..fe8592c138dd449fed38182df0fc8d75323178c5 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture_lighting.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture_lighting.bin index a04a63201735ca6b45daea0704a2cf2cd85b8f62..96799c4e15d9e3c336d736bae4f6aa51604d8e07 100644 GIT binary patch delta 42 ycmX@ea+GC)5vKqX1M|QC|NiStw4N_yXrO1HXJ}wxXsBmsW^7@?uzKT*NJaoPG!4W6 delta 38 ucmX@ga*$<$5ho851M|QC|Nd)Fw4Tprsb^%VXK8ArXKZL_$guHEBqIO=+zgZe diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.bin index a299604962cf9f86b4a6ebaa5beceb068aca2497..fe8592c138dd449fed38182df0fc8d75323178c5 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_vblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_vblur.bin index 347b4ed021b0fa02c57c441e6e7dffc568aa8322..c2695fe4a160c97d181eaf38515ab2850cdeccf6 100644 GIT binary patch delta 43 zcmeyw`i*shH|Gi_2IhbN|NXa`7;;_6&_K^X&(OfY&`{6N%-F(&VfAK9#+{4+bF~ia delta 39 vcmeyy`iXUdH|G*22IhbN|NXa|7;>G@QqRaz&(hRL&)Cq=kYTee<4#5ZJ6#RD diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_lighting.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_lighting.bin index f948ab9105f4647cbed84a445cecedf17fa9892b..305be162e1dc15d762312289f2e6f07046ea1f84 100644 GIT binary patch delta 42 ycmbQsvXEth5$7952IhbN|NYmQXgy!Z&_K^X&(OfY&`{6N%-F(&VfDrrri=hbRt_@& delta 38 ucmZ3;GM8n75$6j=2IhbN|NYmVXg#0LQqRaz&(hRL&)Cq=kYVE+Q$_$2vJC?O diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_texture.bin index a299604962cf9f86b4a6ebaa5beceb068aca2497..fe8592c138dd449fed38182df0fc8d75323178c5 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svback.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svback.bin index ff9efe364838359225e42234cd211f6f76a3ce87..5875aa635d7c90e901d0e5d361bf4d5b56f0dc27 100644 GIT binary patch delta 42 ycmdnWypwr?8)pF{1M|QC|Nfg!^gk?QXrO1HXJ}wxXsBmsW^7@?uzIor<5U1dNe#3B delta 38 ucmdnVyp?%^8)pt91M|QC|Nfgy^gqmJsb^%VXK8ArXKZL_$S_%jaVh{1i424Q diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svfront.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svfront.bin index 4550c08d13753a732efba8ab2bbbd34699a07f5f..63a27d6a014ba809386e10c6243af6fd3e20c9d3 100644 GIT binary patch delta 41 xcmbQuG@ogL0_PtF2IhbN|NU2)s97&$XrO1HXJ}wxXsBmsW^7@?uzKRQQ~)t*4a)!k delta 37 tcmbQwG@EIH0_P6~2IhbN|NU2K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture_lighting.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture_lighting.bin index e632b911c3946d9f0869f9ae4dd3c09a8fd4ab4a..c97d58d5a67a301c3540de2502ae925c1c90aa94 100644 GIT binary patch delta 42 ycmX@ea+GC)5vKqX1M|QC|NiStw4N_yXrO1HXJ}wxXsBmsW^7@?uzKT*NJaoPG!4W6 delta 38 ucmX@ga*$<$5ho851M|QC|Nd)Fw4Tprsb^%VXK8ArXKZL_$guHEBqIO=+zgZe diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_mesh.bin index f5b0d89610409c5b71ce16a84142c8f0490a9a56..d33c32f16d0bc4bfe6ede2785f4bc9cb35840111 100644 GIT binary patch delta 43 zcmaFF`iymgGv@*(2IhbN|NS?a=(AtQ&_K^X&(OfY&`{6N%-F(&VfAK7#*>TyXY~$- delta 39 vcmaFH`iOOcGv^#82IhbN|NS?f=(C^CQqRaz&(hRL&)Cq=kYTed<4HyUF!c>q diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow.bin index 4550c08d13753a732efba8ab2bbbd34699a07f5f..63a27d6a014ba809386e10c6243af6fd3e20c9d3 100644 GIT binary patch delta 41 xcmbQuG@ogL0_PtF2IhbN|NU2)s97&$XrO1HXJ}wxXsBmsW^7@?uzKRQQ~)t*4a)!k delta 37 tcmbQwG@EIH0_P6~2IhbN|NU2K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color.bin index 4550c08d13753a732efba8ab2bbbd34699a07f5f..63a27d6a014ba809386e10c6243af6fd3e20c9d3 100644 GIT binary patch delta 41 xcmbQuG@ogL0_PtF2IhbN|NU2)s97&$XrO1HXJ}wxXsBmsW^7@?uzKRQQ~)t*4a)!k delta 37 tcmbQwG@EIH0_P6~2IhbN|NU2K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture.bin index a299604962cf9f86b4a6ebaa5beceb068aca2497..fe8592c138dd449fed38182df0fc8d75323178c5 100644 GIT binary patch delta 41 xcmdnbbeL&^0;d8a1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUquDCjcL}4O{>K delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture_lighting.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture_lighting.bin index 7257af2e87f0b6febe1ba3b7d71984d5f8b47d88..fcdfc2e180ce6584535ae757889738744e3e5eb9 100644 GIT binary patch delta 42 ycmX@ea+GC)5vKqX1M|QC|NiStw4N_yXrO1HXJ}wxXsBmsW^7@?uzKT*NJaoPG!4W6 delta 38 ucmX@ga*$<$5ho851M|QC|Nd)Fw4Tprsb^%VXK8ArXKZL_$guHEBqIO=+zgZe diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_tree.bin index 9e69b0bb4a444f0b8c4f90863690f2bccaeed1d6..71f4167608c9d34bd143b09c84a28279f857491f 100644 GIT binary patch delta 42 ycmey$@{?tP5vL0i1M|QC|NiStw4N_yXrO1HXJ}wxXsBmsW^7@?uzKT*UPb^-U=EZ3 delta 38 ucmey#@|9(R5vKza1M|QC|Nd)Fw4Tprsb^%VXK8ArXKZL_$guHEFCzdMmK delta 37 tcmX@iw4Z5$0;dck1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF?C69Dj(3@iWu diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_vectordisplay_fb.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_vectordisplay_fb.bin index 63ec02a3531e0e4acd416c9357c6b454b55cf09f..9db127f1b781e8aaf8d7af6e02c22a245c103b75 100644 GIT binary patch delta 41 xcmaFN^qgse0;dZj1M|QC|Ng5?)T|dWG|)59Gc+(TG}JRRGqx~cSUqvuS^zKO4eS5_ delta 37 tcmaFP^q6Ua0;dBb1M|QC|Nbja)U4;T)HAZwvotl*Gd46dWSF>XEdc)z47>mU diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb.bin index e594526cf19a2c482821c995401e49c72be64b58..df53debb5b149a1219c3df7f413a6b8b0d3ead57 100644 GIT binary patch delta 14 Vcmey$^qFab1Y_7l$)}STO93l}1%m(p delta 17 Zcmey&^p$CX1Y^WR$)`*P1{4340suU^2IBw# diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate.bin index 51ae8f2dbaf3c171cee0fbd722a2b724b416dfaa..2ae88a47fffb3556693f99417631cc1a5738f8ce 100644 GIT binary patch delta 14 WcmX@Ww2x_m1f$|a$w?E}P6hxZ*acbu delta 17 ZcmdnTbbx7s1f%jq$w^EG1`}6L1^_WT1-t+N diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_esm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_esm.bin index 72ed5111aee649ec3fdca583b58630948ce1e1fe..700694d399e4633dc403efd9a96f95068d7ff4da 100644 GIT binary patch delta 37 tcmeyW@LpkqHY20`W*x>bHeL%I1w%bkBU1}=%T(RXli5o-CUXg70|3qV3MBvl delta 44 zcmaE_@Ks@hHY20!W*x>bHbDae3mpYRJyRo73v2H6RZnI diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_esm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_esm_csm.bin index 7c77f0cbbfe808d57c62b0dc16eed206f4e44a0e..525a27cdd51cef4ff09597e229c54c658c23f63e 100644 GIT binary patch delta 106 zcmaFof5(4A3L|6j=2S)z9$pI_1w%bkBU1}=%T(RXUA$GSs6vywc$GI>2(Q8>EG9V{ OoA6V)IUJLl)w2N$K^-Ij delta 125 zcmccP|IU9y3L|6d=2S)z9zg>G3mpYRJyRo73v7My3|#mZ`d%FS93dOg0n91^~n63PS(@ delta 44 zcmbQOxKMF}HX~!VxFc{w3L~Tc=2XTA9$pI_1w%bkBU1}=%T(RT8|0NXf8gz7#Ui{>_$fBwlakla Pgg0-HU&}E$ULzX-j&~n> delta 125 zcmdlHcq(v13L|6U=2XTA9zg>G3mpYRJyRo73v7My3|#mZ`dv7sx1W*5*CWf+4K3Szkzo6+_r? UbFVlPn(*cYG6y*(C#z-y02t03tN;K2 delta 121 zcmdnvea?GB3L|6c=2XVX+=2!M7CH)sdZtFE7Uq_zx&{W51H_d!tMi^`!78P)SzSnm Y6;o<+fVeR>;R!MaIhcTk2C8NQ09|t(%m4rY diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_hard_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_hard_linear.bin index c0e05951bddcdf8784c2ce8712d89b868ee22975..3988caee216a20fa631251697658701d32fdbf2c 100644 GIT binary patch delta 37 tcmbQL(66vTo00MUW*tT;HeL%I1w%bkBU1}=%T(RX;p~ANlUMO)0|35a3J3rI delta 44 zcmeBIn5wWro00M9W*tT;HbDae3mpYRJyRo73vL$L^h4NH|R;a~z9d{Z?W0QkfsGynhq diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_hard_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_hard_linear_omni.bin index 6187725d9f26d8ec9b33b0d2e046f77c23b160f1..1965c493afac576002ecb22df4685cb848e8ccaf 100644 GIT binary patch delta 37 tcmbPXHOXp2FC$~a=03*FLcA6_3Wj>7My3|#mZ`d%gG3@ZCa;yr1_0u~3v2)Y delta 44 zcmbPaHN$E{FC$~y=03*FLV^Yc7CH)sdZtFE7Uq_zx&{WD{X`-;m<$XiFPF&%04>}M AjsO4v diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_hard_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_hard_omni.bin index 133e398538cb108e491eaf9e9cf182ef618090e0..31b8e22ba357442da49c45813fbff3fb0d1ba141 100644 GIT binary patch delta 37 scmexn`N48SFC$~z=03(kAzlj|1w%bkBU1}=%T(RX0wR?hle=ZI0r2PxegFUf delta 44 zcmexh`OR`eFC$~h=03(kAwdHJ3mpYRJyRo73v&no9bo}tin0sSPco0!YXVdi&a=f0jn^N@(OG&`K*dn_?8A%Lk?+U6<(!> T)sTsXScNN0CU8vVvdseky>n|} delta 449 zcmdm1^`mNo3nP=h&1N^o40b^S0}CAmLp@U?Qwwv;R9ypu$&Mm=n_qIwWx^qKkb4y_ zsbzdCaY=OvV$-$RQRD`89r~L?#aCdL(%Wnyh0`7xSzJ<^6mZFGexiias^h9SrB-R+ dG_X$_r&N(1P6I;?aY|X3OyFPw#?1+vJOJ@Wa5De^ diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_pcf_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_pcf_csm.bin index 9f78cbeee15f4c32072a07d07b282d26782f8522..c78a27741db5c6075bd447e35105bb944872f992 100644 GIT binary patch delta 1592 zcmezHp84Hd<_)!sOgUdS*E5Rp@>=L980wiCnOc}zrs_^^JgzkPydeMPYkbF;Fr_x1 z7kq?87^s79^CyujxTM%6u40ke%rE^Ii|}NAY5vV7a+k45`K$16_Ef|swb@?} z98%8i;#j0M_j{>f5e6D2u=$rSHXUGlLIWkR>*C+MF$AYBo(P;$>Crf)4#nY=l1&oB z<&5%FoKhDva2lwSgHx(KAE$v2i*QO=mvOOUM2N}eu38gJhns9>Zgj#X+|`0rSg^wx zo9da}ScMh)u^O^s5>{dTX;_7~&BQ8fJJ%7LOAarwD{v4*+)UToHGUUmSBu-Rt)Bj{FcZaiL&={VEPcBj!*0!vWS z%}38+752G=RrvB%tin+@9k5yX;10U*X2S<%=qe2#m~DRd7+odUaV5{O3jcbAO?Yv` KJI={X-}3;^^W|Fr delta 1767 zcmaF&mifbb<_)!sOnKin*E5Rp3K|$#=qMQKnHrf|m|Ldm8W?O|$oHKIQ+V=1KEut| z1TSNkGT8h~7pGLc0agPG z%?vkBG{&ZDbD20CpL{x+23yB zcw~dT@X4<9mB6EyF%X|@WC%W!H-zJpWsk-u8yAO9c59*-9yfER;*(9xz-_X?=AGHN z^lr*m#bak`5iWh8*xOyo#f~*@O*gaG8e=!sbaPFEBQB}`%{Zl++MTfI+I+FA9E&h8 zd6{kQ?sLE{WxAPn5>9(2OvNgdILBu^df+4vWG9yHzjcn8jSir9nG8MpUil`=eKx;gGJws@Khl6rIuo785* zQ)Sq~&+wGl=2vI2`UzxM&PAL~cz*?_RM8Eb27bAXO=`2_eXOo?yl=Mo*CT8?z+SC+ XhEwX_OI%Wm8{Tp<85m4%_?8C%A_eNj diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_pcf_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_pcf_linear.bin index 5ee79f73a28f9111d1c4f76b0716c040894727f3..85cebb56f073cfad2b8ef9355c2f60ed57be441f 100644 GIT binary patch delta 382 zcmZ2o{jzF<3nQb#W>>~5?7S8_3Wj>7My3|#mZ`dv9ToI8M{v$$!Xj+IvkaTCDF0Gy z!aoJEs=guokuTY^nkQWM==aCrRH Y#wz?!5330IgMIfB*mh delta 433 zcmaD^wYqwP3nOFFW>>~5?1Bac7CH)sdZtFE7Uq_zx&{W5YsK|8hj7kh!Xc%>vkaFM zC;w7hQZEH@=+fVOS_GS}&9&l}u^6^FRtl@Itt?hySp}@Zf0Zs_F&pf2F101Nq+V)Z gb0}EXNo|}`EA?<1*kOoMD&1rX2NN(de%s^$0P4VRr~m)} diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_pcf_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_pcf_linear_csm.bin index 4bb6fa06e510eaf00f5f3561467a989f81252135..93c5b80ef332b1fe13ebc6063b3978d52d7043c8 100644 GIT binary patch delta 1544 zcmZ4YnR(4e<_)!sOj_SJ*E4qT@>=L980wiCnOc}zrs_^M6gAlF!GDwqL)dV$ztBZA z;mwAkOw1T64K|lZTt-s~Hn&3>tMDATOW0JeSHvoONCm6#RduYwFSO9z40g#cU97@9 zhFA@eH^C}wWRBGk7psTZypv|D&W;vT7tg3nevrh!`JxL4dMLuAWIe=iNtJu!l)C6A zj!TzL5KgJ~P@D!njKC>n9fLzkVDq$iQ7q2b{2)mMi!eAOJkqe~081^*#94Z)7%O0%41rx9u@@+C! z;hO1Kg_&k!74DelfXyYmi?9k$T8h;WiIrG|=dHnNi1G%k!YeknVGHl#-B`o>^*$_C znr<#SgvD&r%|DJ}QEj%l;Uv21%@@y+L$=G#uI@m)Bq?F5L~cV?3uvhN8j;rsX`(KVQuFnYRvKVI#SF+s3Ck7Ji^5i| z4(xQ+!X?y~xNL{?Ab}Aidh3Mr?SKXKJtbyvb&RGyYZ)`VIc`x*UIVSV_1td%d^21l z;?@x%hevC1x{~fZC`~4BBTgD9GKP}sQujU~+x$X~jvGb29|A(QO^J(73%NKeEN-6@ zax}Eg-&!W$lAT{lrd)UcktYHv9~)#+WR8cJ&x$$jpu$=|PruVCuupLVl7ACYX$$rm z--h(K0}BRrAw4Hy!N~(iuZIzIt5h1^%5ut$LBY%d_q4%`gPOBkLJ4MMN}h8kRH@?v zrcyab_B>0Pf`g83xtAbKVV)mcrsE=)P^WX2*gk(drJo@6zQBSfZ-^4E_j2v;zs>bE F^8-?r+!6o) diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_pcf_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_pcf_linear_omni.bin index d0be094575a54f3f8a965602166827c5daa9be86..4769169ac7f97d92623c2323211b32d36ab914cd 100644 GIT binary patch delta 388 zcmZpe&bV(HYVg1b+lFQMA zH!H|oLlXiUU@E^7o3N}BR$*4v71&h2QO7ELSqrQ1E?um`3k}fS40d3z>% delta 451 zcmdltjj>@moJu&Q-m0v?rR#z^PN~gWIHjiP;*_d1!0GsCW1Ld9 hW;hL0u-t*m@xnIya7pplw+6a0~zd diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_pcf_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_pcf_omni.bin index 44a131f69ad553803ecb5795d8bf3008ff885e7d..18a43e1ea2738e06698ae9f757135d8dbbb21303 100644 GIT binary patch delta 376 zcmX>(jj??iX{muT9{j=>Q25Op}$#CY#tM;@a78=x6p)u zD)lzMlwN~P_=?p9snB|d`SQR diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm.bin index ccababe2e1bae96bb7aedfd1bf1d5ff784e2aafd..f42d12496d6d8217ec3c31c8555f068802afe776 100644 GIT binary patch delta 18 acmbQOGE-%PHY4N9%{q)t0+TlgW&;2{{|0mb delta 21 dcmbQKGFxSXHY4Nf%{q)t0!#)5lh+Am0{~7;2G#%o diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm_csm.bin index 74ff8b8dd26addebfcdd4cf7426de49101558586..50e5c4f14cb5dd19f6c050059955a0e32255665b 100644 GIT binary patch delta 18 Zcmewn_bqNi3L_)$=2XUIx|4bJvjI(N2J`>` delta 21 ccmews_akmY3L_)`=2XUIx=aQJlezV?0bs@lRsaA1 diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm_linear.bin index 754e424ea1226b768c9d58f44686be27162a2649..3e96ec50a4c1642e5c1eb4cb08352ff268bb579c 100644 GIT binary patch delta 18 acmX@Ea#Ur5HY20xW*x?L0+a6uW&;2{8wOAS delta 21 dcmX@Aa$IGDHY20>W*x?L0!#)5lWz%T0{~2T2C@JE diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm_linear_csm.bin index 53f2ea31f22d6fe53926cad63e8dead631a47912..df85bd9510cc37b9003a08bf9e558e92c776db9a 100644 GIT binary patch delta 18 acmcbTa4BI!3M1po&8dt{dXr!3X9ECJI|xMp delta 21 dcmcbVa3x_w3M1p|&8dt{dQ1ielb`En0|00C2&Vu5 diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm_linear_omni.bin index 0b0a1bbbf16e67007363a1592b2c2202fc47b9d9..2d63ad15e45aa01f527ba7e4871dc0851f301cd8 100644 GIT binary patch delta 18 acmX?YchYV{FC*jj&3%jkvXdXkWdi_BbO*8k delta 21 dcmX?UciL`4FC*j5&3%jkvP=dBlkdr80{~#e2owMS diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lighting_vsm_omni.bin index ad331bd4ffd96214c1baa4eba6adbf516de1643c..772ec28f6ed7fccc9afba4cd8129cfd89af2f0c9 100644 GIT binary patch delta 18 ZcmbPhH`{JQFC$~;<~~Lx*~y#avH?Tx2Fw5e delta 21 ccmbPjH`i`MFC%03<~~LxStbL6$s6Rd0aX?UE&u=k diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur.bin index c50ce9cc452df86cf452a7a8623e3368f310360c..d8509532b15aa138d398fce98f2a009ec9c1765e 100644 GIT binary patch delta 210 zcmcb_yM}jyEMwP3IU7b^3mpYRJyRo73v{~EaQfaayE>D1_l;73Wj>7My3|#mZ`c129qB$iA=6$^v5a_I$4KF8LLeA sE!cylU`o*s1_s%Q+>0k}r~?2|kq6iS delta 25 hcmZ3(w2q0}E!cylU`o*s1_t?w+>4nE3?{Ct0{~^D2s!`& diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth_linear.bin index c1c6b5162905c489259548eebdcc5402f3f86bf0..a366ac46963d2a4a9750690c4005c68192a447c6 100644 GIT binary patch delta 22 dcmeyz_=l0(E!cx)iL_@G1H;>i+{F_c>Ht|{2l@a2 delta 25 gcmeyv_>Ym>E!cx)iL_@G1H=1?+{H`=1{3S*0B&mtTmS$7 diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth.bin index db9d665275dab6e8c9d402a0e4eff769ee0a5ba5..0fd472eda282c73c7eef7d036ed599b92c3895d8 100644 GIT binary patch delta 29 kcmZ3=ypVZgy&Jq1Itqq*rbea~=9a0tlf@bP0Dy7`5C8xG delta 33 ocmZ3;yp(x@E@SaTy&HlC1{OLBhI*z(rWWRwsk#ORlZ6@k0HDYS)Bpeg diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur.bin index c50ce9cc452df86cf452a7a8623e3368f310360c..d8509532b15aa138d398fce98f2a009ec9c1765e 100644 GIT binary patch delta 210 zcmcb_yM}jyEMwP3IU7b^3mpYRJyRo73v{~EaQfaayE>D1_l;73Wj>7My3|#mZ`c129qB$iA=6$^v5a_I$4KF8LLeA sufG&pNLJ^krRus z?q&gQtitzs(1kZQ^6kZDZnXfqN}%I(HhT(T6&4r4D*RM*0=n6X(z=^Bi}zy_ZjeM* Zy;)HjtK+0)(N%&S_d*V<@KyzJMgVV%Uibh2 delta 440 zcmeBiKI1$=mvPocJ#SV)0|N^k1w%bkBU1}=%T!$hgUJ&`MK;f3oxzAzN@sI6`$Sw) zrkpsX{&P*jrRx+APN}JUI1JR?oFFg(yMel!wS;g=eG$ecwRxiG9_)tcY;F_BrUMvA eI-C6^akx%rv!pamsmC%n4O}CKQ>s)!oDl%EKX0J` diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow_pd.bin index d6bdeb0b6c9e6e1fbb920f25c5a7f860e1620d42..384de3f538791859a68534d1e4e8e6e6f1276eca 100644 GIT binary patch delta 155 zcmZ3-)W@vi7VN=NFs0}RBZE+Bd`fCTNk(vTVos`mT3T^x2@@j&10zG)L~bS3(!9*H z{GwcijLh_m0)?{FWD^BU^%J#|oiIi9Dm1wi6cn_vXwa+FRL}yOreUaOW^Qh7WR$8s HaYG#dwIMTs delta 61 zcmeBUUdP1k7VN=NFs0}R1B3iT6{U%}iAn}~rkY#|3JTf^AeMrbLRo6EiH4z`nYp>S Okx{C)fx%<}#ySA(91i#Z diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb.bin index 32f69e5aed200377bcfced714fc28b29d89cfdcf..1bfc2361d5cd15d781581f6608e94f175f60ce1d 100644 GIT binary patch delta 14 WcmaFN^pI(S1f$DD$;%Vpl>z`N!v-e+ delta 17 ZcmaFJ^q6Ua1f$zT$;(Uz1{2?u0suKA28jRw diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate.bin index d77b34792fa2f4348e63cc3dae2bf16ce5e7cce5..f8ae5bc9b81e95461f9acfbd6b106a2cb815366c 100644 GIT binary patch delta 14 WcmZ3-w1#Pd1S9`M$%cuuCj$T?8U+9V delta 17 ZcmZ3(w2oZ<61j&Bz$ES%>j9E3bu)f}x(Nk*S5bWvcFG33g?U$+rC70JzBsB>(^b delta 44 zcmZpY?~vc1&Bz$BS%>j9tDu2_g^q%uo~egF`YEN(#q0}CAmLp@U?Qwwv;R9ypu&3AbsSuuqt-{n!>oF>$X WOG;j%3YXMLSuYMI1B1!JYTf`xOd!4h diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_esm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_esm_linear.bin index 57a0637840f1b210b63cdf2cb3a569b45f1a9306..3c41f4ed3f71e6af6d2783516ee8dd0cc038b7c3 100644 GIT binary patch delta 37 scmdlYzfOLGHX~!*W*tUpHeL%I1w%bkBU1}=%T(RX5$yaNlQa3f0lA3@LI3~& delta 44 zcmZ1{zeRq7HX~!pW*tUpHbDae3mpYRJyRo73v?`O6Aq diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_esm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_esm_linear_csm.bin index daa9d7bc412497a95378a2af48952d86d530fda2..b930d047c8166162d7c89067da0b785440076c7b 100644 GIT binary patch delta 106 zcmX@(x65xs3M1pi&8dv*xp^&g6b$uDjZ7`fEmL(T?~zd2?9Q9ZibeRj&=EA@&3h!S RqX~fxI3{PwF_}@_8vvi=9=`wp delta 125 zcmdnxcgAl+3M1p=&8dv*xdjajEOZnM^-PUSEzB)bbqx$QEAsZUVhT@I7My3|#mZ`d%ZwrfaO#UM64FKt23(^1p delta 44 zcmdmKvEO1tFC*jH&3%kELV^Yc7CH)sdZtFE7Uq_zx&{WDuM3NFFc}z3ekbh>05v2G A^Z)<= diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_esm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_esm_omni.bin index 0728fd38ac9cbde349d3a918331cb5ff1f7fa859..9e5441e58394cc77c59c0b9846a6e6f8b07ace90 100644 GIT binary patch delta 37 tcmbPe(QUDzmyxk@b06a`L0$_T1w%bkBU1}=%T(RXGljJ|CLfdb1_0-d3#kAA delta 44 zcmeCSm}s$~myxl4b06a`K|uop3mpYRJyRo73vyX=^&B%CTvkqe_E3bu)f}x(Nk*S5bWvcGxMQrjMlMnNG0|3LE3P}I} delta 44 zcmeB>>yz7{&B%Cfvkqe_tDu2_g^q%uo~eX3nvMSyHm=PdU delta 129 zcmccS@xo(63M1qH&8dtZxC9LhEOZnM^-PUSEzB)bbqx$A&yiM|oGHk?xu0hx3sz~B e&6$FXtXQQCH?I(Tjz!nzInwzYOhCiARlEUlL?Y$@ diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_hard_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_hard_linear.bin index 68de56248ffa465fab0afe3caf885ed0ba52f829..52a0b82131652a0308571e14e488775fe2445f4c 100644 GIT binary patch delta 37 tcmZ1{w?b}%HY4MY%{q)rS$QpV6b$uDjZ7`fEmL(jKVtjOKKU`9Hvrxj3@88q delta 44 zcmZ1>w@z+@HY4M|%{q)rSp^LYEOZnM^-PUSEzB)bbqx$Q-(&mF&SYRP`7WO~04akF AN&o-= diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_hard_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_hard_linear_csm.bin index e9d07c376e4587e215fa08d75cbc789b6d47f14b..08808de87a71d1771d07180f59e99089dfd29594 100644 GIT binary patch delta 106 zcmez1dCzl03L|6b=2S)#Ze9x=1w%bkBU1}=%T(RTaWcxA&+^=4!6JN1P=ghVu$j0x Pn(*d08CQjjlJpX9m8f+@9my`VQM XrZ8BCmbf@BsX`eg4kn<%lU2L{U#}o} diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_hard_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_hard_linear_omni.bin index eceb44fdf0f69081c1d5b1fe7a50acaedf51cab9..3218ab5f3cce04e2bc8b0f54291501524b992804 100644 GIT binary patch delta 37 tcmdmGzQue)FC(MU=03*bg1i7My3|#mZ`d%(}dYMCg)3g0|4NK3c&yX delta 44 zcmdmDzRP?=FC(MI=03*bf`SGH7CH)sdZtFE7Uq_zx&{WDlZ4qhm<$XiXG(hm04j+K A;{X5v diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_hard_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_hard_omni.bin index d7893ba4369e0a3918af4dfd30636c4ed62cbec8..0f8e094c7e9aa65f1b32147e3e1de202e0ff82bb 100644 GIT binary patch delta 37 scmbPXKFNGTFC!zv=03(&L0$_T1w%bkBU1}=%T(RXD#Gd>~bY`hja3Wj>7My3|#mZ`dvCkW_m4&!KJ!XhlqJsDG2fAc%u ziD<%`CkPxw69St%K^ThxdYhBPCSg-;EQwW^MFy+zRXMD}%M{Ta2X;xB3RYn^b*zSn ZYhe|Bp@Y?s9r{>>JB(~NCLgo%1ppioW-I^z delta 445 zcmcauI=O6v3nSyH&901>*aQs>EOZnM^-PUSEzB)bbqx$AHwfr$4&rEI!XYKhJsG={ z{^m!#6R}8bZV)(#MHp;PjW7y_l0+XQVXsKslA$?~qqxLgUt`o; zOcuMX$<^RbC=FCz8WsbV%1;p&l|dFOB21bR$_zvK;(y+pRe^oo7DPCJ}~tbq7!y=@ud0?M2ML z_JJ^Ob0D4VM;aXfN|K>J@DOSrM$9j{KnH*621@cVwt`e1lQ3zf!1yh@F&DDX{!AsC zF0jI@MeLi0{IQ@zX}1sZ-7+lcT!DPZLDsB74hA&nCbBiiQ|quKy#d*|$(9fo8WbL9 zCF{;Pvo*>01b?fr^VR`8s^VD4X$vhzgoEb!D+YP=43;G0kh?A*A6-G#Ub9>Hx%^Fn bH;`pXSTcPN`S}r+IG;FC{mkUCD)!+3 zf1Md19hSqukO@-I0s}WHPtl^bYKD?INAZV?JhN@-)L$RxRsON)ZB*f6@vccmNoQ4H z){3@Pp!72rqKkG&>P|?_Hb}GGX`t8ddhUA@a_iCAWs1eF0U0H)LoS*kgR-3MjPTED zAvTi7?`xs?Q3ImSaY%iWMo{IRN}}88VxUwv12Y42ka89vxfUV4FO{M(Y|D_2eK63x z0?D@u15?)^4F@jJ$tDP%EEa@gSa$#kw7m;Se*npS1cn#r>jY2*InGNsn7My3|#mZ`dv1J(65@8)P?!XjM5-H%P!i?0ux zu(%*r)lY@73U3y}YDj}5R$*Tmtin?AScRV}_F_6vfAbcV9yH<2f$DqEguvn9qlML6 XNnI@F>TQ0ik5zc1kpsu%&sM$w%~E74 delta 445 zcmexYdZ28B3nSzA&902*?1Bac7CH)sdZtFE7Uq_zx&{W5Co1Y~-p@zqv!D2aD8Z oMfE*cgu!7ap@qYGz0D7Guvrh*wNf9aRH2ar2NN)2Hd^@t05dIeGynhq diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_pcf_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_pcf_linear_csm.bin index 202b3b7623621835cee70d8b13bc618015e1e67f..5b07162b00192743e31db1783aebade08c925335 100644 GIT binary patch delta 1526 zcmaFN!)u|VV5nzmWNKk6W=-}RN>8zg0Inp zfGQ0)=ZWmX6gJqLDZU4raGDfW;bhs}*i^?WU=@y5#wr}HhE+IN6RQLLbg&A0>SHy; z)d*d9v!LlKbTE?(!O-y04%_kZ)(1bTLw#K6i z6?R|zuUmlC5ZNVIg?pA` zHRRVStil=Ve6fY`@2yzFIA$k?l?$(!Za%#StFYApE%Xossa|y$tFY8@tcG-+!YcgZ zEEZw2%^4TbeYttzl~`=9aJhl5ax%zqn{Hz<*L1VueXPP09$_`)-&3r@IWO06OqTlO F3jpHLuSx&_ delta 1733 zcmZ|Q-$#RC6bEqI(hnt;QC5*s+FJF#Tkp1%E=t5qOk@3^A51nQZ{5X~)I~%WttcWh zl2p5#j>f4w0~f=?fQIgpO5oB=XuV>lm5_rrZg8pl{)=PD=MW*D+qQ| zlh`GhCA+QH+bIZPQ72HS`drPDNPg`NLnP`l%yBVny!IB6OApD>7(-PR-SOUw1_Yvd^rH1K4l{?&GdNM4_2j>B?3tY*WAD6|RsNc6o0X>1!( zd>4{&pBub5;m!f1+#w9~MIk*O!N7qNNXKVRv@6>c+||xCJ4Qs2=r0DzALo`r5rti2 zM6uG)9XoiT&)GffQ}+mIEdlB03HI{5KvG^|VCOrey(A1&ry&KtPRrH#->EL^{0G6B B)a?KO diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_pcf_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_pcf_linear_omni.bin index 492e6e805b192101e4aa1d1910e8e8c36a11f91a..34d5c091ce268a6707af50eade9769f76eb9f33a 100644 GIT binary patch delta 384 zcmbO+k@4CD#tq9D8CP#!&e$u=YoViHsApz8I|-ZWgN#9%Xr b)lxL!&HHSwq6q;5Re$qk`!bHn-X6XH^4o0U delta 451 zcmcaMfpNw}#tq9D8Q*SR&e$s~XkcKWqhP3KYGi6*ZkeiUV6fRybQ2S%@MK3(z0GJ(oKi=$aY{|ln}ExO(S|ss)J$+1_{nS` bE(6b5F2^Oc!3L+)B>Qp>CIf@XoF2XaL+NqB diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_pcf_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_pcf_omni.bin index 81ea89086ae4625420d9c9ab2e455a757e7d79ee..53f13abd5c8c410fa5779507ab96ccc9e2039daf 100644 GIT binary patch delta 380 zcmaDpfpO^s#tq9D8LKugXH*mBwa`&8)H5|QwJ^6#)t!9MOm8!fXa^G(;mhJvu?a7i z!YW)XI}Mxa00peVs>)am`KgLk_^bw2;f2~*g-i9OU~`FwAy#2&6Ldp1A2d6UX29l! Yme8{FA>4cmn`DmIh1! delta 21 dcmdn5bWmx7HY20pW*x>8{7eQ0lfMXf0{~0>2Ce`A diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_vsm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_vsm_linear_csm.bin index 79058cad0d7c5536020a0c54b1d1f385df177277..cbcecf1feb42c13225ad247d8f2df3d6c0e9fd50 100644 GIT binary patch delta 18 Zcmewq^C4zK3L_)?=2XT5I+NA)ya7z*2Jip? delta 21 ccmewm^C@OS3L_)u=2XT5I!p!zlU4P+0boi8QUCw| diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_vsm_linear_omni.bin index 5915c930f4eada534e6c8764c7ddcca059c0127c..a2aeda4ead7c4b59d2fdbd7d22fe707b86e17bde 100644 GIT binary patch delta 18 ZcmX?Sea3o2FC(MX=03*H(vzEIy#Y%n2Uq|A delta 21 ccmX?Oea?DAFC(MP=03*H(o6;hlN)8d0bb(=x&QzG diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_vsm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lighting_vsm_omni.bin index 93b5a2a0bb2abf6d8354aeb42c2980727c3206ac..fd9d3902609c8e27aea7ddc02592032c30475813 100644 GIT binary patch delta 18 ZcmZ2rJzI`=OsK>V37vd^MFoqf7b~WybD3v?ETiE@IY~xA0|N^k1w%bkBU1}=%T!$hgUK$8$yh}FSwbgsGAZMb>BA`_ o%#2IV3}zJ^rpd8jm#M_6K76tcs}fcj$;lHt>G2fhFR delta 25 gcmeys_=%C*E!cx)iL_@G1HzI`=OsK>V37vd^MFoqf7b~WybD3v?ETiE@IY~xA0|N^k1w%bkBU1}=%T!$hgUK$8$yh}FSwbgsGAZMb>BA`_ o%#2IV3}zJ^rpd8jm#M_6K76tcs}fcj$;l|Owl8oTw#GF+Bw6x;X5++6l21bUEiQF>srFofY z`9--3WvR&~3YaPV8Dit1Hpaw#Y%Xk*c!SE;F>1vX8?P|wWV+}y}0ReR!+Isl)k BF?;|3 delta 83 zcmeyvw1`R7E!cylU`o*s1_oh928Oc4qRPy?bcM3iWD|w5_=5c6%#zIfyovF#N(OqS hnp_GB3fc-FmVy>ojfSC~nYp>Skx{C)fx*OobpR!67-j$f diff --git a/3rdparty/bgfx/examples/runtime/shaders/metal/fs_sms_shadow_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/metal/fs_sms_shadow_pd.bin index ccec78ba0020bea93aa126c6fa4c7d718cf6ea6c..4d4b4469aceccf011e2dd5db6fcc0483196a7522 100644 GIT binary patch delta 118 zcmaFQvWJ!1E!cylU`o*s28Oj0xfjbQD5T}&CzhBfl*Xr|7L;TJCnx5l`lqE8r1A!W@F?v&@ +#include namespace bgfx { @@ -45,10 +46,10 @@ namespace bgfx /// struct PlatformData { - void* ndt; //!< Native display type - void* nwh; //!< Native window handle - void* context; //!< GL context, or D3D device - void* backBuffer; //!< GL backbuffer, or D3D render target view + void* ndt; //!< Native display type. + void* nwh; //!< Native window handle. + void* context; //!< GL context, or D3D device. + void* backBuffer; //!< GL backbuffer, or D3D render target view. void* backBufferDS; //!< Backbuffer depth/stencil. }; @@ -58,7 +59,73 @@ namespace bgfx /// /// @attention C99 equivalent is `bgfx_set_platform_data`. /// - void setPlatformData(const PlatformData& _hooks); + void setPlatformData(const PlatformData& _data); + + /// Internal data. + /// + /// @attention C99 equivalent is `bgfx_internal_data_t`. + /// + struct InternalData + { + const struct Caps* caps; //!< Renderer capabilities. + void* context; //!< GL context, or D3D device. + }; + + /// Get internal data for interop. + /// + /// @attention It's expected you understand some bgfx internals before you + /// use this call. + /// + /// @warning Must be called only on render thread. + /// + /// @attention C99 equivalent is `bgfx_get_internal_data`. + /// + const InternalData* getInternalData(); + + /// Override internal texture with externally created texture. Previously + /// created internal texture will released. + /// + /// @attention It's expected you understand some bgfx internals before you + /// use this call. + /// + /// @param[in] _handle Texture handle. + /// @param[in] _ptr Native API pointer to texture. + /// + /// @returns Native API pointer to texture. If result is 0, texture is not created yet from the + /// main thread. + /// + /// @warning Must be called only on render thread. + /// + /// @attention C99 equivalent is `bgfx_override_internal_texture_ptr`. + /// + uintptr_t overrideInternal(TextureHandle _handle, uintptr_t _ptr); + + /// Override internal texture by creating new texture. Previously created + /// internal texture will released. + /// + /// @attention It's expected you understand some bgfx internals before you + /// use this call. + /// + /// @param[in] _handle Texture handle. + /// @param[in] _width Width. + /// @param[in] _height Height. + /// @param[in] _numMips Number of mip-maps. + /// @param[in] _format Texture format. See: `TextureFormat::Enum`. + /// @param[in] _flags Default texture sampling mode is linear, and wrap mode + /// is repeat. + /// - `BGFX_TEXTURE_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap + /// mode. + /// - `BGFX_TEXTURE_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic + /// sampling. + /// + /// @returns Native API pointer to texture. If result is 0, texture is not created yet from the + /// main thread. + /// + /// @warning Must be called only on render thread. + /// + /// @attention C99 equivalent is `bgfx_override_internal_texture`. + /// + uintptr_t overrideInternal(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, TextureFormat::Enum _format, uint32_t _flags = BGFX_TEXTURE_NONE); } // namespace bgfx diff --git a/3rdparty/bgfx/include/bgfx/c99/bgfx.h b/3rdparty/bgfx/include/bgfx/c99/bgfx.h index a3b31ee9ed3..fa585759ce9 100644 --- a/3rdparty/bgfx/include/bgfx/c99/bgfx.h +++ b/3rdparty/bgfx/include/bgfx/c99/bgfx.h @@ -40,7 +40,6 @@ #endif // defined(__cplusplus) #include -#include typedef enum bgfx_renderer_type { @@ -429,140 +428,6 @@ typedef struct bgfx_allocator_vtbl } bgfx_allocator_vtbl_t; -/**/ -typedef struct bgfx_interface_vtbl -{ - bgfx_render_frame_t (*render_frame)(); - void (*set_platform_data)(bgfx_platform_data_t* _pd); - void (*vertex_decl_begin)(bgfx_vertex_decl_t* _decl, bgfx_renderer_type_t _renderer); - void (*vertex_decl_add)(bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt); - void (*vertex_decl_skip)(bgfx_vertex_decl_t* _decl, uint8_t _num); - void (*vertex_decl_end)(bgfx_vertex_decl_t* _decl); - void (*vertex_pack)(const float _input[4], bool _inputNormalized, bgfx_attrib_t _attr, const bgfx_vertex_decl_t* _decl, void* _data, uint32_t _index); - void (*vertex_unpack)(float _output[4], bgfx_attrib_t _attr, const bgfx_vertex_decl_t* _decl, const void* _data, uint32_t _index); - void (*vertex_convert)(const bgfx_vertex_decl_t* _destDecl, void* _destData, const bgfx_vertex_decl_t* _srcDecl, const void* _srcData, uint32_t _num); - uint16_t (*weld_vertices)(uint16_t* _output, const bgfx_vertex_decl_t* _decl, const void* _data, uint16_t _num, float _epsilon); - void (*image_swizzle_bgra8)(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst); - void (*image_rgba8_downsample_2x2)(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst); - uint8_t (*get_supported_renderers)(bgfx_renderer_type_t _enum[BGFX_RENDERER_TYPE_COUNT]); - const char* (*get_renderer_name)(bgfx_renderer_type_t _type); - bool (*init)(bgfx_renderer_type_t _type, uint16_t _vendorId, uint16_t _deviceId, bgfx_callback_interface_t* _callback, bgfx_allocator_interface_t* _allocator); - void (*shutdown)(); - void (*reset)(uint32_t _width, uint32_t _height, uint32_t _flags); - uint32_t (*frame)(); - bgfx_renderer_type_t (*get_renderer_type)(); - const bgfx_caps_t* (*get_caps)(); - const bgfx_hmd_t* (*get_hmd)(); - const bgfx_stats_t* (*get_stats)(); - const bgfx_memory_t* (*alloc)(uint32_t _size); - const bgfx_memory_t* (*copy)(const void* _data, uint32_t _size); - const bgfx_memory_t* (*make_ref)(const void* _data, uint32_t _size); - const bgfx_memory_t* (*make_ref_release)(const void* _data, uint32_t _size, bgfx_release_fn_t _releaseFn, void* _userData); - void (*set_debug)(uint32_t _debug); - void (*dbg_text_clear)(uint8_t _attr, bool _small); - void (*dbg_text_printf)(uint16_t _x, uint16_t _y, uint8_t _attr, const char* _format, ...); - void (*dbg_text_image)(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const void* _data, uint16_t _pitch); - bgfx_index_buffer_handle_t (*create_index_buffer)(const bgfx_memory_t* _mem, uint16_t _flags); - void (*destroy_index_buffer)(bgfx_index_buffer_handle_t _handle); - bgfx_vertex_buffer_handle_t (*create_vertex_buffer)(const bgfx_memory_t* _mem, const bgfx_vertex_decl_t* _decl, uint16_t _flags); - void (*destroy_vertex_buffer)(bgfx_vertex_buffer_handle_t _handle); - bgfx_dynamic_index_buffer_handle_t (*create_dynamic_index_buffer)(uint32_t _num, uint16_t _flags); - bgfx_dynamic_index_buffer_handle_t (*create_dynamic_index_buffer_mem)(const bgfx_memory_t* _mem, uint16_t _flags); - void (*update_dynamic_index_buffer)(bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _startIndex, const bgfx_memory_t* _mem); - void (*destroy_dynamic_index_buffer)(bgfx_dynamic_index_buffer_handle_t _handle); - bgfx_dynamic_vertex_buffer_handle_t (*create_dynamic_vertex_buffer)(uint32_t _num, const bgfx_vertex_decl_t* _decl, uint16_t _flags); - bgfx_dynamic_vertex_buffer_handle_t (*create_dynamic_vertex_buffer_mem)(const bgfx_memory_t* _mem, const bgfx_vertex_decl_t* _decl, uint16_t _flags); - void (*update_dynamic_vertex_buffer)(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, const bgfx_memory_t* _mem); - void (*destroy_dynamic_vertex_buffer)(bgfx_dynamic_vertex_buffer_handle_t _handle); - bool (*check_avail_transient_index_buffer)(uint32_t _num); - bool (*check_avail_transient_vertex_buffer)(uint32_t _num, const bgfx_vertex_decl_t* _decl); - bool (*check_avail_instance_data_buffer)(uint32_t _num, uint16_t _stride); - bool (*check_avail_transient_buffers)(uint32_t _numVertices, const bgfx_vertex_decl_t* _decl, uint32_t _numIndices); - void (*alloc_transient_index_buffer)(bgfx_transient_index_buffer_t* _tib, uint32_t _num); - void (*alloc_transient_vertex_buffer)(bgfx_transient_vertex_buffer_t* _tvb, uint32_t _num, const bgfx_vertex_decl_t* _decl); - bool (*alloc_transient_buffers)(bgfx_transient_vertex_buffer_t* _tvb, const bgfx_vertex_decl_t* _decl, uint32_t _numVertices, bgfx_transient_index_buffer_t* _tib, uint32_t _numIndices); - const bgfx_instance_data_buffer_t* (*alloc_instance_data_buffer)(uint32_t _num, uint16_t _stride); - bgfx_indirect_buffer_handle_t (*create_indirect_buffer)(uint32_t _num); - void (*destroy_indirect_buffer)(bgfx_indirect_buffer_handle_t _handle); - bgfx_shader_handle_t (*create_shader)(const bgfx_memory_t* _mem); - uint16_t (*get_shader_uniforms)(bgfx_shader_handle_t _handle, bgfx_uniform_handle_t* _uniforms, uint16_t _max); - void (*destroy_shader)(bgfx_shader_handle_t _handle); - bgfx_program_handle_t (*create_program)(bgfx_shader_handle_t _vsh, bgfx_shader_handle_t _fsh, bool _destroyShaders); - bgfx_program_handle_t (*create_compute_program)(bgfx_shader_handle_t _csh, bool _destroyShaders); - void (*destroy_program)(bgfx_program_handle_t _handle); - void (*calc_texture_size)(bgfx_texture_info_t* _info, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, uint8_t _numMips, bgfx_texture_format_t _format); - bgfx_texture_handle_t (*create_texture)(const bgfx_memory_t* _mem, uint32_t _flags, uint8_t _skip, bgfx_texture_info_t* _info); - bgfx_texture_handle_t (*create_texture_2d)(uint16_t _width, uint16_t _height, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem); - bgfx_texture_handle_t (*create_texture_2d_scaled)(bgfx_backbuffer_ratio_t _ratio, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags); - bgfx_texture_handle_t (*create_texture_3d)(uint16_t _width, uint16_t _height, uint16_t _depth, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem); - bgfx_texture_handle_t (*create_texture_cube)(uint16_t _size, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem); - void (*update_texture_2d)(bgfx_texture_handle_t _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t* _mem, uint16_t _pitch); - void (*update_texture_3d)(bgfx_texture_handle_t _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const bgfx_memory_t* _mem); - void (*update_texture_cube)(bgfx_texture_handle_t _handle, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t* _mem, uint16_t _pitch); - void (*destroy_texture)(bgfx_texture_handle_t _handle); - bgfx_frame_buffer_handle_t (*create_frame_buffer)(uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, uint32_t _textureFlags); - bgfx_frame_buffer_handle_t (*create_frame_buffer_scaled)(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, uint32_t _textureFlags); - bgfx_frame_buffer_handle_t (*create_frame_buffer_from_handles)(uint8_t _num, const bgfx_texture_handle_t* _handles, bool _destroyTextures); - bgfx_frame_buffer_handle_t (*create_frame_buffer_from_nwh)(void* _nwh, uint16_t _width, uint16_t _height, bgfx_texture_format_t _depthFormat); - void (*destroy_frame_buffer)(bgfx_frame_buffer_handle_t _handle); - bgfx_uniform_handle_t (*create_uniform)(const char* _name, bgfx_uniform_type_t _type, uint16_t _num); - void (*destroy_uniform)(bgfx_uniform_handle_t _handle); - bgfx_occlusion_query_handle_t (*create_occlusion_query)(); - bgfx_occlusion_query_result_t (*get_result)(bgfx_occlusion_query_handle_t _handle); - void (*destroy_occlusion_query)(bgfx_occlusion_query_handle_t _handle); - void (*set_palette_color)(uint8_t _index, const float _rgba[4]); - void (*set_view_name)(uint8_t _id, const char* _name); - void (*set_view_rect)(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); - void (*set_view_scissor)(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); - void (*set_view_clear)(uint8_t _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil); - void (*set_view_clear_mrt)(uint8_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7); - void (*set_view_seq)(uint8_t _id, bool _enabled); - void (*set_view_frame_buffer)(uint8_t _id, bgfx_frame_buffer_handle_t _handle); - void (*set_view_transform)(uint8_t _id, const void* _view, const void* _proj); - void (*set_view_transform_stereo)(uint8_t _id, const void* _view, const void* _projL, uint8_t _flags, const void* _projR); - void (*set_view_remap)(uint8_t _id, uint8_t _num, const void* _remap); - void (*set_marker)(const char* _marker); - void (*set_state)(uint64_t _state, uint32_t _rgba); - void (*set_condition)(bgfx_occlusion_query_handle_t _handle, bool _visible); - void (*set_stencil)(uint32_t _fstencil, uint32_t _bstencil); - uint16_t (*set_scissor)(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); - void (*set_scissor_cached)(uint16_t _cache); - uint32_t (*set_transform)(const void* _mtx, uint16_t _num); - uint32_t (*alloc_transform)(bgfx_transform_t* _transform, uint16_t _num); - void (*set_transform_cached)(uint32_t _cache, uint16_t _num); - void (*set_uniform)(bgfx_uniform_handle_t _handle, const void* _value, uint16_t _num); - void (*set_index_buffer)(bgfx_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices); - void (*set_dynamic_index_buffer)(bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices); - void (*set_transient_index_buffer)(const bgfx_transient_index_buffer_t* _tib, uint32_t _firstIndex, uint32_t _numIndices); - void (*set_vertex_buffer)(bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); - void (*set_dynamic_vertex_buffer)(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _numVertices); - void (*set_transient_vertex_buffer)(const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices); - void (*set_instance_data_buffer)(const bgfx_instance_data_buffer_t* _idb, uint32_t _num); - void (*set_instance_data_from_vertex_buffer)(bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num); - void (*set_instance_data_from_dynamic_vertex_buffer)(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num); - void (*set_texture)(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags); - void (*set_texture_from_frame_buffer)(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, uint32_t _flags); - uint32_t (*touch)(uint8_t _id); - uint32_t (*submit)(uint8_t _id, bgfx_program_handle_t _handle, int32_t _depth); - uint32_t (*submit_occlusion_query)(uint8_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth); - uint32_t (*submit_indirect)(uint8_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth); - void (*set_image)(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format); - void (*set_image_from_frame_buffer)(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, bgfx_access_t _access, bgfx_texture_format_t _format); - void (*set_compute_index_buffer)(uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access); - void (*set_compute_vertex_buffer)(uint8_t _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access); - void (*set_compute_dynamic_index_buffer)(uint8_t _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access); - void (*set_compute_dynamic_vertex_buffer)(uint8_t _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access); - void (*set_compute_indirect_buffer)(uint8_t _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access); - uint32_t (*dispatch)(uint8_t _id, bgfx_program_handle_t _handle, uint16_t _numX, uint16_t _numY, uint16_t _numZ, uint8_t _flags); - uint32_t (*dispatch_indirect)(uint8_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags); - void (*discard)(); - void (*blit)(uint8_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth); - void (*save_screen_shot)(const char* _filePath); - -} bgfx_interface_vtbl_t; - -typedef bgfx_interface_vtbl_t* (*PFN_BGFX_GET_INTERFACE)(uint32_t _version); - /**/ BGFX_C_API void bgfx_vertex_decl_begin(bgfx_vertex_decl_t* _decl, bgfx_renderer_type_t _renderer); diff --git a/3rdparty/bgfx/include/bgfx/c99/bgfxplatform.h b/3rdparty/bgfx/include/bgfx/c99/bgfxplatform.h index ff2125f18c4..1fb82c974f8 100644 --- a/3rdparty/bgfx/include/bgfx/c99/bgfxplatform.h +++ b/3rdparty/bgfx/include/bgfx/c99/bgfxplatform.h @@ -13,6 +13,7 @@ // necessary to use this header in conjunction with creating windows. #include +#include typedef enum bgfx_render_frame { @@ -41,6 +42,160 @@ typedef struct bgfx_platform_data } bgfx_platform_data_t; -BGFX_C_API void bgfx_set_platform_data(bgfx_platform_data_t* _pd); +/**/ +BGFX_C_API void bgfx_set_platform_data(const bgfx_platform_data_t* _data); + +typedef struct bgfx_internal_data +{ + const struct bgfx_caps* caps; + void* context; + +} bgfx_internal_data_t; + +/**/ +BGFX_C_API const bgfx_internal_data_t* bgfx_get_internal_data(); + +/**/ +BGFX_C_API uintptr_t bgfx_override_internal_texture_ptr(bgfx_texture_handle_t _handle, uintptr_t _ptr); + +/**/ +BGFX_C_API uintptr_t bgfx_override_internal_texture(bgfx_texture_handle_t _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags); + +/**/ +typedef struct bgfx_interface_vtbl +{ + bgfx_render_frame_t (*render_frame)(); + void (*set_platform_data)(const bgfx_platform_data_t* _data); + const bgfx_internal_data_t* (*get_internal_data)(); + uintptr_t (*override_internal_texture_ptr)(bgfx_texture_handle_t _handle, uintptr_t _ptr); + uintptr_t (*override_internal_texture)(bgfx_texture_handle_t _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags); + void (*vertex_decl_begin)(bgfx_vertex_decl_t* _decl, bgfx_renderer_type_t _renderer); + void (*vertex_decl_add)(bgfx_vertex_decl_t* _decl, bgfx_attrib_t _attrib, uint8_t _num, bgfx_attrib_type_t _type, bool _normalized, bool _asInt); + void (*vertex_decl_skip)(bgfx_vertex_decl_t* _decl, uint8_t _num); + void (*vertex_decl_end)(bgfx_vertex_decl_t* _decl); + void (*vertex_pack)(const float _input[4], bool _inputNormalized, bgfx_attrib_t _attr, const bgfx_vertex_decl_t* _decl, void* _data, uint32_t _index); + void (*vertex_unpack)(float _output[4], bgfx_attrib_t _attr, const bgfx_vertex_decl_t* _decl, const void* _data, uint32_t _index); + void (*vertex_convert)(const bgfx_vertex_decl_t* _destDecl, void* _destData, const bgfx_vertex_decl_t* _srcDecl, const void* _srcData, uint32_t _num); + uint16_t (*weld_vertices)(uint16_t* _output, const bgfx_vertex_decl_t* _decl, const void* _data, uint16_t _num, float _epsilon); + void (*image_swizzle_bgra8)(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst); + void (*image_rgba8_downsample_2x2)(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst); + uint8_t (*get_supported_renderers)(bgfx_renderer_type_t _enum[BGFX_RENDERER_TYPE_COUNT]); + const char* (*get_renderer_name)(bgfx_renderer_type_t _type); + bool (*init)(bgfx_renderer_type_t _type, uint16_t _vendorId, uint16_t _deviceId, bgfx_callback_interface_t* _callback, bgfx_allocator_interface_t* _allocator); + void (*shutdown)(); + void (*reset)(uint32_t _width, uint32_t _height, uint32_t _flags); + uint32_t (*frame)(); + bgfx_renderer_type_t (*get_renderer_type)(); + const bgfx_caps_t* (*get_caps)(); + const bgfx_hmd_t* (*get_hmd)(); + const bgfx_stats_t* (*get_stats)(); + const bgfx_memory_t* (*alloc)(uint32_t _size); + const bgfx_memory_t* (*copy)(const void* _data, uint32_t _size); + const bgfx_memory_t* (*make_ref)(const void* _data, uint32_t _size); + const bgfx_memory_t* (*make_ref_release)(const void* _data, uint32_t _size, bgfx_release_fn_t _releaseFn, void* _userData); + void (*set_debug)(uint32_t _debug); + void (*dbg_text_clear)(uint8_t _attr, bool _small); + void (*dbg_text_printf)(uint16_t _x, uint16_t _y, uint8_t _attr, const char* _format, ...); + void (*dbg_text_image)(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const void* _data, uint16_t _pitch); + bgfx_index_buffer_handle_t (*create_index_buffer)(const bgfx_memory_t* _mem, uint16_t _flags); + void (*destroy_index_buffer)(bgfx_index_buffer_handle_t _handle); + bgfx_vertex_buffer_handle_t (*create_vertex_buffer)(const bgfx_memory_t* _mem, const bgfx_vertex_decl_t* _decl, uint16_t _flags); + void (*destroy_vertex_buffer)(bgfx_vertex_buffer_handle_t _handle); + bgfx_dynamic_index_buffer_handle_t (*create_dynamic_index_buffer)(uint32_t _num, uint16_t _flags); + bgfx_dynamic_index_buffer_handle_t (*create_dynamic_index_buffer_mem)(const bgfx_memory_t* _mem, uint16_t _flags); + void (*update_dynamic_index_buffer)(bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _startIndex, const bgfx_memory_t* _mem); + void (*destroy_dynamic_index_buffer)(bgfx_dynamic_index_buffer_handle_t _handle); + bgfx_dynamic_vertex_buffer_handle_t (*create_dynamic_vertex_buffer)(uint32_t _num, const bgfx_vertex_decl_t* _decl, uint16_t _flags); + bgfx_dynamic_vertex_buffer_handle_t (*create_dynamic_vertex_buffer_mem)(const bgfx_memory_t* _mem, const bgfx_vertex_decl_t* _decl, uint16_t _flags); + void (*update_dynamic_vertex_buffer)(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, const bgfx_memory_t* _mem); + void (*destroy_dynamic_vertex_buffer)(bgfx_dynamic_vertex_buffer_handle_t _handle); + bool (*check_avail_transient_index_buffer)(uint32_t _num); + bool (*check_avail_transient_vertex_buffer)(uint32_t _num, const bgfx_vertex_decl_t* _decl); + bool (*check_avail_instance_data_buffer)(uint32_t _num, uint16_t _stride); + bool (*check_avail_transient_buffers)(uint32_t _numVertices, const bgfx_vertex_decl_t* _decl, uint32_t _numIndices); + void (*alloc_transient_index_buffer)(bgfx_transient_index_buffer_t* _tib, uint32_t _num); + void (*alloc_transient_vertex_buffer)(bgfx_transient_vertex_buffer_t* _tvb, uint32_t _num, const bgfx_vertex_decl_t* _decl); + bool (*alloc_transient_buffers)(bgfx_transient_vertex_buffer_t* _tvb, const bgfx_vertex_decl_t* _decl, uint32_t _numVertices, bgfx_transient_index_buffer_t* _tib, uint32_t _numIndices); + const bgfx_instance_data_buffer_t* (*alloc_instance_data_buffer)(uint32_t _num, uint16_t _stride); + bgfx_indirect_buffer_handle_t (*create_indirect_buffer)(uint32_t _num); + void (*destroy_indirect_buffer)(bgfx_indirect_buffer_handle_t _handle); + bgfx_shader_handle_t (*create_shader)(const bgfx_memory_t* _mem); + uint16_t (*get_shader_uniforms)(bgfx_shader_handle_t _handle, bgfx_uniform_handle_t* _uniforms, uint16_t _max); + void (*destroy_shader)(bgfx_shader_handle_t _handle); + bgfx_program_handle_t (*create_program)(bgfx_shader_handle_t _vsh, bgfx_shader_handle_t _fsh, bool _destroyShaders); + bgfx_program_handle_t (*create_compute_program)(bgfx_shader_handle_t _csh, bool _destroyShaders); + void (*destroy_program)(bgfx_program_handle_t _handle); + void (*calc_texture_size)(bgfx_texture_info_t* _info, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, uint8_t _numMips, bgfx_texture_format_t _format); + bgfx_texture_handle_t (*create_texture)(const bgfx_memory_t* _mem, uint32_t _flags, uint8_t _skip, bgfx_texture_info_t* _info); + bgfx_texture_handle_t (*create_texture_2d)(uint16_t _width, uint16_t _height, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem); + bgfx_texture_handle_t (*create_texture_2d_scaled)(bgfx_backbuffer_ratio_t _ratio, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags); + bgfx_texture_handle_t (*create_texture_3d)(uint16_t _width, uint16_t _height, uint16_t _depth, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem); + bgfx_texture_handle_t (*create_texture_cube)(uint16_t _size, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags, const bgfx_memory_t* _mem); + void (*update_texture_2d)(bgfx_texture_handle_t _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t* _mem, uint16_t _pitch); + void (*update_texture_3d)(bgfx_texture_handle_t _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const bgfx_memory_t* _mem); + void (*update_texture_cube)(bgfx_texture_handle_t _handle, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t* _mem, uint16_t _pitch); + void (*destroy_texture)(bgfx_texture_handle_t _handle); + bgfx_frame_buffer_handle_t (*create_frame_buffer)(uint16_t _width, uint16_t _height, bgfx_texture_format_t _format, uint32_t _textureFlags); + bgfx_frame_buffer_handle_t (*create_frame_buffer_scaled)(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, uint32_t _textureFlags); + bgfx_frame_buffer_handle_t (*create_frame_buffer_from_handles)(uint8_t _num, const bgfx_texture_handle_t* _handles, bool _destroyTextures); + bgfx_frame_buffer_handle_t (*create_frame_buffer_from_nwh)(void* _nwh, uint16_t _width, uint16_t _height, bgfx_texture_format_t _depthFormat); + void (*destroy_frame_buffer)(bgfx_frame_buffer_handle_t _handle); + bgfx_uniform_handle_t (*create_uniform)(const char* _name, bgfx_uniform_type_t _type, uint16_t _num); + void (*destroy_uniform)(bgfx_uniform_handle_t _handle); + bgfx_occlusion_query_handle_t (*create_occlusion_query)(); + bgfx_occlusion_query_result_t (*get_result)(bgfx_occlusion_query_handle_t _handle); + void (*destroy_occlusion_query)(bgfx_occlusion_query_handle_t _handle); + void (*set_palette_color)(uint8_t _index, const float _rgba[4]); + void (*set_view_name)(uint8_t _id, const char* _name); + void (*set_view_rect)(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); + void (*set_view_scissor)(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); + void (*set_view_clear)(uint8_t _id, uint16_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil); + void (*set_view_clear_mrt)(uint8_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7); + void (*set_view_seq)(uint8_t _id, bool _enabled); + void (*set_view_frame_buffer)(uint8_t _id, bgfx_frame_buffer_handle_t _handle); + void (*set_view_transform)(uint8_t _id, const void* _view, const void* _proj); + void (*set_view_transform_stereo)(uint8_t _id, const void* _view, const void* _projL, uint8_t _flags, const void* _projR); + void (*set_view_remap)(uint8_t _id, uint8_t _num, const void* _remap); + void (*set_marker)(const char* _marker); + void (*set_state)(uint64_t _state, uint32_t _rgba); + void (*set_condition)(bgfx_occlusion_query_handle_t _handle, bool _visible); + void (*set_stencil)(uint32_t _fstencil, uint32_t _bstencil); + uint16_t (*set_scissor)(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height); + void (*set_scissor_cached)(uint16_t _cache); + uint32_t (*set_transform)(const void* _mtx, uint16_t _num); + uint32_t (*alloc_transform)(bgfx_transform_t* _transform, uint16_t _num); + void (*set_transform_cached)(uint32_t _cache, uint16_t _num); + void (*set_uniform)(bgfx_uniform_handle_t _handle, const void* _value, uint16_t _num); + void (*set_index_buffer)(bgfx_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices); + void (*set_dynamic_index_buffer)(bgfx_dynamic_index_buffer_handle_t _handle, uint32_t _firstIndex, uint32_t _numIndices); + void (*set_transient_index_buffer)(const bgfx_transient_index_buffer_t* _tib, uint32_t _firstIndex, uint32_t _numIndices); + void (*set_vertex_buffer)(bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _numVertices); + void (*set_dynamic_vertex_buffer)(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _numVertices); + void (*set_transient_vertex_buffer)(const bgfx_transient_vertex_buffer_t* _tvb, uint32_t _startVertex, uint32_t _numVertices); + void (*set_instance_data_buffer)(const bgfx_instance_data_buffer_t* _idb, uint32_t _num); + void (*set_instance_data_from_vertex_buffer)(bgfx_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num); + void (*set_instance_data_from_dynamic_vertex_buffer)(bgfx_dynamic_vertex_buffer_handle_t _handle, uint32_t _startVertex, uint32_t _num); + void (*set_texture)(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint32_t _flags); + void (*set_texture_from_frame_buffer)(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, uint32_t _flags); + uint32_t (*touch)(uint8_t _id); + uint32_t (*submit)(uint8_t _id, bgfx_program_handle_t _handle, int32_t _depth); + uint32_t (*submit_occlusion_query)(uint8_t _id, bgfx_program_handle_t _program, bgfx_occlusion_query_handle_t _occlusionQuery, int32_t _depth); + uint32_t (*submit_indirect)(uint8_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, int32_t _depth); + void (*set_image)(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_texture_handle_t _handle, uint8_t _mip, bgfx_access_t _access, bgfx_texture_format_t _format); + void (*set_image_from_frame_buffer)(uint8_t _stage, bgfx_uniform_handle_t _sampler, bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, bgfx_access_t _access, bgfx_texture_format_t _format); + void (*set_compute_index_buffer)(uint8_t _stage, bgfx_index_buffer_handle_t _handle, bgfx_access_t _access); + void (*set_compute_vertex_buffer)(uint8_t _stage, bgfx_vertex_buffer_handle_t _handle, bgfx_access_t _access); + void (*set_compute_dynamic_index_buffer)(uint8_t _stage, bgfx_dynamic_index_buffer_handle_t _handle, bgfx_access_t _access); + void (*set_compute_dynamic_vertex_buffer)(uint8_t _stage, bgfx_dynamic_vertex_buffer_handle_t _handle, bgfx_access_t _access); + void (*set_compute_indirect_buffer)(uint8_t _stage, bgfx_indirect_buffer_handle_t _handle, bgfx_access_t _access); + uint32_t (*dispatch)(uint8_t _id, bgfx_program_handle_t _handle, uint16_t _numX, uint16_t _numY, uint16_t _numZ, uint8_t _flags); + uint32_t (*dispatch_indirect)(uint8_t _id, bgfx_program_handle_t _handle, bgfx_indirect_buffer_handle_t _indirectHandle, uint16_t _start, uint16_t _num, uint8_t _flags); + void (*discard)(); + void (*blit)(uint8_t _id, bgfx_texture_handle_t _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, bgfx_texture_handle_t _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth); + void (*save_screen_shot)(const char* _filePath); + +} bgfx_interface_vtbl_t; + +typedef bgfx_interface_vtbl_t* (*PFN_BGFX_GET_INTERFACE)(uint32_t _version); #endif // BGFX_PLATFORM_C99_H_HEADER_GUARD diff --git a/3rdparty/bgfx/makefile b/3rdparty/bgfx/makefile index f583e7891db..afa61759a85 100644 --- a/3rdparty/bgfx/makefile +++ b/3rdparty/bgfx/makefile @@ -20,7 +20,8 @@ endif # $(info $(OS)) -GENIE=../bx/tools/bin/$(OS)/genie $(GENIE_FLAGS) +BX_DIR?=../bx +GENIE?=$(BX_DIR)/tools/bin/$(OS)/genie all: $(GENIE) --with-tools --with-shared-lib vs2008 @@ -214,6 +215,14 @@ rpi-release: .build/projects/gmake-rpi $(MAKE) -R -C .build/projects/gmake-rpi config=release rpi: rpi-debug rpi-release +build-darwin: osx + +build-linux: linux-debug64 linux-release64 + +build-windows: mingw-gcc + +build: build-$(OS) + rebuild-shaders: $(MAKE) -R -C examples rebuild @@ -268,16 +277,16 @@ BUILD_TOOLS_SUFFIX=Release EXE=.exe endif -tools/bin/$(OS)/shaderc$(EXE): .build/projects/$(BUILD_PROJECT_DIR) - $(SILENT) $(MAKE) -C .build/projects/$(BUILD_PROJECT_DIR) -f shaderc.make config=$(BUILD_TOOLS_CONFIG) - $(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/shaderc$(BUILD_TOOLS_SUFFIX)$(EXE) $(@) - -tools/bin/$(OS)/geometryc$(EXE): .build/projects/$(BUILD_PROJECT_DIR) +geometryc: .build/projects/$(BUILD_PROJECT_DIR) $(SILENT) $(MAKE) -C .build/projects/$(BUILD_PROJECT_DIR) -f geometryc.make config=$(BUILD_TOOLS_CONFIG) - $(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/geometryc$(BUILD_TOOLS_SUFFIX)$(EXE) $(@) + $(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/geometryc$(BUILD_TOOLS_SUFFIX)$(EXE) tools/bin/$(OS)/geometryc$(EXE) -tools/bin/$(OS)/texturec$(EXE): .build/projects/$(BUILD_PROJECT_DIR) +shaderc: .build/projects/$(BUILD_PROJECT_DIR) + $(SILENT) $(MAKE) -C .build/projects/$(BUILD_PROJECT_DIR) -f shaderc.make config=$(BUILD_TOOLS_CONFIG) + $(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/shaderc$(BUILD_TOOLS_SUFFIX)$(EXE) tools/bin/$(OS)/shaderc$(EXE) + +texturec: .build/projects/$(BUILD_PROJECT_DIR) $(SILENT) $(MAKE) -C .build/projects/$(BUILD_PROJECT_DIR) -f texturec.make config=$(BUILD_TOOLS_CONFIG) - $(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/texturec$(BUILD_TOOLS_SUFFIX)$(EXE) $(@) + $(SILENT) cp .build/$(BUILD_OUTPUT_DIR)/bin/texturec$(BUILD_TOOLS_SUFFIX)$(EXE) tools/bin/$(OS)/texturec$(EXE) -tools: tools/bin/$(OS)/shaderc$(EXE) tools/bin/$(OS)/geometryc$(EXE) tools/bin/$(OS)/texturec$(EXE) +tools: geometryc shaderc texturec diff --git a/3rdparty/bgfx/scripts/bgfx.lua b/3rdparty/bgfx/scripts/bgfx.lua index ce2effb0f88..cc646b6e261 100644 --- a/3rdparty/bgfx/scripts/bgfx.lua +++ b/3rdparty/bgfx/scripts/bgfx.lua @@ -36,7 +36,7 @@ function bgfxProject(_name, _kind, _defines) includedirs { path.join(BGFX_DIR, "3rdparty"), path.join(BGFX_DIR, "3rdparty/dxsdk/include"), - path.join(BGFX_DIR, "../bx/include"), + path.join(BX_DIR, "include"), } defines { diff --git a/3rdparty/bgfx/scripts/genie.lua b/3rdparty/bgfx/scripts/genie.lua index 0696469ca1c..77fe35d4cb6 100644 --- a/3rdparty/bgfx/scripts/genie.lua +++ b/3rdparty/bgfx/scripts/genie.lua @@ -66,9 +66,13 @@ solution "bgfx" startproject "example-00-helloworld" BGFX_DIR = path.getabsolute("..") +BX_DIR = os.getenv("BX_DIR") + local BGFX_BUILD_DIR = path.join(BGFX_DIR, ".build") local BGFX_THIRD_PARTY_DIR = path.join(BGFX_DIR, "3rdparty") -BX_DIR = path.getabsolute(path.join(BGFX_DIR, "../bx")) +if not BX_DIR then + BX_DIR = path.getabsolute(path.join(BGFX_DIR, "../bx")) +end if not os.isdir(BX_DIR) then print("bx not found at " .. BX_DIR) @@ -140,20 +144,15 @@ function exampleProject(_name) defines { "ENTRY_CONFIG_USE_SDL=1" } links { "SDL2" } - configuration { "x32", "windows" } - libdirs { "$(SDL2_DIR)/lib/x86" } - - configuration { "x64", "windows" } - libdirs { "$(SDL2_DIR)/lib/x64" } + configuration { "osx" } + libdirs { "$(SDL2_DIR)/lib" } configuration {} end if _OPTIONS["with-glfw"] then defines { "ENTRY_CONFIG_USE_GLFW=1" } - links { - "glfw3" - } + links { "glfw3" } configuration { "linux or freebsd" } links { @@ -415,7 +414,6 @@ end if _OPTIONS["with-tools"] then group "tools" - dofile "makedisttex.lua" dofile "shaderc.lua" dofile "texturec.lua" dofile "geometryc.lua" diff --git a/3rdparty/bgfx/scripts/makedisttex.lua b/3rdparty/bgfx/scripts/makedisttex.lua deleted file mode 100644 index 01705a08262..00000000000 --- a/3rdparty/bgfx/scripts/makedisttex.lua +++ /dev/null @@ -1,19 +0,0 @@ --- --- Copyright 2010-2016 Branimir Karadzic. All rights reserved. --- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause --- - -project "makedisttex" - uuid "b0561b30-91bb-11e1-b06e-023ad46e7d26" - kind "ConsoleApp" - - includedirs { - path.join(BX_DIR, "include"), - path.join(BGFX_DIR, "3rdparty"), - } - - files { - path.join(BGFX_DIR, "3rdparty/edtaa3/**.cpp"), - path.join(BGFX_DIR, "3rdparty/edtaa3/**.h"), - path.join(BGFX_DIR, "tools/makedisttex.cpp"), - } diff --git a/3rdparty/bgfx/scripts/shader.mk b/3rdparty/bgfx/scripts/shader.mk index 002b7564b3e..d7e0e151597 100644 --- a/3rdparty/bgfx/scripts/shader.mk +++ b/3rdparty/bgfx/scripts/shader.mk @@ -6,6 +6,11 @@ THISDIR:=$(dir $(lastword $(MAKEFILE_LIST))) include $(THISDIR)/tools.mk +# Define SHADERS_DIR if your shader files are in a different dir than the makefile including this. +# Notice: If defined, SHADERS_DIR should end with dir slash '/'. +# Example: +# SHADERS_DIR=shader_files/ + ifndef TARGET .PHONY: all all: @@ -67,18 +72,18 @@ CS_FLAGS+=-i $(THISDIR)../src/ BUILD_OUTPUT_DIR=$(addprefix ./, $(RUNTIME_DIR)/$(SHADER_PATH)) BUILD_INTERMEDIATE_DIR=$(addprefix $(BUILD_DIR)/, $(SHADER_PATH)) -VS_SOURCES=$(wildcard vs_*.sc) -VS_DEPS=$(addprefix $(BUILD_INTERMEDIATE_DIR)/,$(addsuffix .bin.d, $(basename $(VS_SOURCES)))) +VS_SOURCES=$(notdir $(wildcard $(addprefix $(SHADERS_DIR), vs_*.sc))) +VS_DEPS=$(addprefix $(BUILD_INTERMEDIATE_DIR)/,$(addsuffix .bin.d, $(basename $(notdir $(VS_SOURCES))))) -FS_SOURCES=$(wildcard fs_*.sc) -FS_DEPS=$(addprefix $(BUILD_INTERMEDIATE_DIR)/,$(addsuffix .bin.d, $(basename $(FS_SOURCES)))) +FS_SOURCES=$(notdir $(wildcard $(addprefix $(SHADERS_DIR), fs_*.sc))) +FS_DEPS=$(addprefix $(BUILD_INTERMEDIATE_DIR)/,$(addsuffix .bin.d, $(basename $(notdir $(FS_SOURCES))))) -CS_SOURCES=$(wildcard cs_*.sc) -CS_DEPS=$(addprefix $(BUILD_INTERMEDIATE_DIR)/,$(addsuffix .bin.d, $(basename $(CS_SOURCES)))) +CS_SOURCES=$(notdir $(wildcard $(addprefix $(SHADERS_DIR), cs_*.sc))) +CS_DEPS=$(addprefix $(BUILD_INTERMEDIATE_DIR)/,$(addsuffix .bin.d, $(basename $(notdir $(CS_SOURCES))))) -VS_BIN = $(addprefix $(BUILD_INTERMEDIATE_DIR)/, $(addsuffix .bin, $(basename $(VS_SOURCES)))) -FS_BIN = $(addprefix $(BUILD_INTERMEDIATE_DIR)/, $(addsuffix .bin, $(basename $(FS_SOURCES)))) -CS_BIN = $(addprefix $(BUILD_INTERMEDIATE_DIR)/, $(addsuffix .bin, $(basename $(CS_SOURCES)))) +VS_BIN = $(addprefix $(BUILD_INTERMEDIATE_DIR)/, $(addsuffix .bin, $(basename $(notdir $(VS_SOURCES))))) +FS_BIN = $(addprefix $(BUILD_INTERMEDIATE_DIR)/, $(addsuffix .bin, $(basename $(notdir $(FS_SOURCES))))) +CS_BIN = $(addprefix $(BUILD_INTERMEDIATE_DIR)/, $(addsuffix .bin, $(basename $(notdir $(CS_SOURCES))))) BIN = $(VS_BIN) $(FS_BIN) ASM = $(VS_ASM) $(FS_ASM) @@ -98,17 +103,17 @@ endif endif endif -$(BUILD_INTERMEDIATE_DIR)/vs_%.bin : vs_%.sc +$(BUILD_INTERMEDIATE_DIR)/vs_%.bin : $(SHADERS_DIR)vs_%.sc @echo [$(<)] $(SILENT) $(SHADERC) $(VS_FLAGS) --type vertex --depends -o $(@) -f $(<) --disasm $(SILENT) cp $(@) $(BUILD_OUTPUT_DIR)/$(@F) -$(BUILD_INTERMEDIATE_DIR)/fs_%.bin : fs_%.sc +$(BUILD_INTERMEDIATE_DIR)/fs_%.bin : $(SHADERS_DIR)fs_%.sc @echo [$(<)] $(SILENT) $(SHADERC) $(FS_FLAGS) --type fragment --depends -o $(@) -f $(<) --disasm $(SILENT) cp $(@) $(BUILD_OUTPUT_DIR)/$(@F) -$(BUILD_INTERMEDIATE_DIR)/cs_%.bin : cs_%.sc +$(BUILD_INTERMEDIATE_DIR)/cs_%.bin : $(SHADERS_DIR)cs_%.sc @echo [$(<)] $(SILENT) $(SHADERC) $(CS_FLAGS) --type compute --depends -o $(@) -f $(<) --disasm $(SILENT) cp $(@) $(BUILD_OUTPUT_DIR)/$(@F) diff --git a/3rdparty/bgfx/scripts/shaderc.lua b/3rdparty/bgfx/scripts/shaderc.lua index b2a5b5c54a0..4c09f847745 100644 --- a/3rdparty/bgfx/scripts/shaderc.lua +++ b/3rdparty/bgfx/scripts/shaderc.lua @@ -55,11 +55,6 @@ project "shaderc" path.join(GLSL_OPTIMIZER, "include/c99"), } - configuration { "vs* or mingw*" } - links { - "d3dcompiler", - } - configuration {} defines { -- fcpp @@ -73,6 +68,7 @@ project "shaderc" path.join(BX_DIR, "include"), path.join(BGFX_DIR, "include"), + path.join(BGFX_DIR, "3rdparty/dxsdk/include"), FCPP_DIR, path.join(GLSL_OPTIMIZER, "include"), diff --git a/3rdparty/bgfx/scripts/texturec.lua b/3rdparty/bgfx/scripts/texturec.lua index 8b9beed609e..dac357b6b86 100644 --- a/3rdparty/bgfx/scripts/texturec.lua +++ b/3rdparty/bgfx/scripts/texturec.lua @@ -19,8 +19,12 @@ project "texturec" path.join(BGFX_DIR, "src/image.*"), path.join(BGFX_DIR, "3rdparty/libsquish/**.cpp"), path.join(BGFX_DIR, "3rdparty/libsquish/**.h"), + path.join(BGFX_DIR, "3rdparty/edtaa3/**.cpp"), + path.join(BGFX_DIR, "3rdparty/edtaa3/**.h"), path.join(BGFX_DIR, "3rdparty/etc1/**.cpp"), path.join(BGFX_DIR, "3rdparty/etc1/**.h"), + path.join(BGFX_DIR, "3rdparty/etc2/**.cpp"), + path.join(BGFX_DIR, "3rdparty/etc2/**.hpp"), path.join(BGFX_DIR, "3rdparty/nvtt/**.cpp"), path.join(BGFX_DIR, "3rdparty/nvtt/**.h"), path.join(BGFX_DIR, "3rdparty/pvrtc/**.cpp"), diff --git a/3rdparty/bgfx/src/bgfx.cpp b/3rdparty/bgfx/src/bgfx.cpp index a6882850ba9..aae0311ebd5 100644 --- a/3rdparty/bgfx/src/bgfx.cpp +++ b/3rdparty/bgfx/src/bgfx.cpp @@ -112,10 +112,10 @@ namespace bgfx strcat(filePath, ".tga"); bx::CrtFileWriter writer; - if (0 == writer.open(filePath) ) + if (bx::open(&writer, filePath) ) { imageWriteTga(&writer, _width, _height, _pitch, _data, false, _yflip); - writer.close(); + bx::close(&writer); } #endif // BX_CONFIG_CRT_FILE_READER_WRITER } @@ -277,6 +277,7 @@ namespace bgfx static Context* s_ctx = NULL; static bool s_renderFrameCalled = false; + InternalData g_internalData; PlatformData g_platformData; void AllocatorStub::checkLeaks() @@ -292,19 +293,75 @@ namespace bgfx #endif // BGFX_CONFIG_MEMORY_TRACKING } - void setPlatformData(const PlatformData& _pd) + void setPlatformData(const PlatformData& _data) { if (NULL != s_ctx) { BGFX_FATAL(true - && g_platformData.ndt == _pd.ndt - && g_platformData.nwh == _pd.nwh - && g_platformData.context == _pd.context + && g_platformData.ndt == _data.ndt + && g_platformData.nwh == _data.nwh + && g_platformData.context == _data.context , Fatal::UnableToInitialize , "Only backbuffer pointer can be changed after initialization!" ); } - memcpy(&g_platformData, &_pd, sizeof(PlatformData) ); + memcpy(&g_platformData, &_data, sizeof(PlatformData) ); + } + + const InternalData* getInternalData() + { + BGFX_CHECK_RENDER_THREAD(); + return &g_internalData; + } + + uintptr_t overrideInternal(TextureHandle _handle, uintptr_t _ptr) + { + BGFX_CHECK_RENDER_THREAD(); + RendererContextI* rci = s_ctx->m_renderCtx; + if (0 == rci->getInternal(_handle) ) + { + return 0; + } + + rci->overrideInternal(_handle, _ptr); + + return rci->getInternal(_handle); + } + + uintptr_t overrideInternal(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, TextureFormat::Enum _format, uint32_t _flags) + { + BGFX_CHECK_RENDER_THREAD(); + RendererContextI* rci = s_ctx->m_renderCtx; + if (0 == rci->getInternal(_handle) ) + { + return 0; + } + + uint32_t size = sizeof(uint32_t) + sizeof(TextureCreate); + Memory* mem = const_cast(alloc(size) ); + + bx::StaticMemoryBlockWriter writer(mem->data, mem->size); + uint32_t magic = BGFX_CHUNK_MAGIC_TEX; + bx::write(&writer, magic); + + TextureCreate tc; + tc.m_flags = _flags; + tc.m_width = _width; + tc.m_height = _height; + tc.m_sides = 0; + tc.m_depth = 0; + tc.m_numMips = uint8_t(bx::uint16_max(1, _numMips) ); + tc.m_format = _format; + tc.m_cubeMap = false; + tc.m_mem = NULL; + bx::write(&writer, tc); + + rci->destroyTexture(_handle); + rci->createTexture(_handle, mem, _flags, 0); + + release(mem); + + return rci->getInternal(_handle); } void setGraphicsDebuggerPresent(bool _present) @@ -1026,6 +1083,15 @@ namespace bgfx static void dumpCaps() { + BX_TRACE("Sort key masks:"); + BX_TRACE("\t View %016" PRIx64, SORT_KEY_VIEW_MASK); + BX_TRACE("\t Draw bit %016" PRIx64, SORT_KEY_DRAW_BIT); + BX_TRACE("\t Seq %016" PRIx64, SORT_KEY_SEQ_MASK); + BX_TRACE("\tD Trans %016" PRIx64, SORT_KEY_DRAW_TRANS_MASK); + BX_TRACE("\tD Program %016" PRIx64, SORT_KEY_DRAW_PROGRAM_MASK); + BX_TRACE("\tC Program %016" PRIx64, SORT_KEY_COMPUTE_PROGRAM_MASK); + BX_TRACE("\tD Depth %016" PRIx64, SORT_KEY_DRAW_DEPTH_MASK); + BX_TRACE("Supported capabilities (renderer %s, vendor 0x%04x, device 0x%04x):" , s_ctx->m_renderCtx->getRendererName() , g_caps.vendorId @@ -1217,6 +1283,8 @@ namespace bgfx frame(); } + g_internalData.caps = getCaps(); + return true; } @@ -1263,6 +1331,7 @@ namespace bgfx m_render->destroy(); #endif // BGFX_CONFIG_MULTITHREADED + memset(&g_internalData, 0, sizeof(InternalData) ); s_ctx = NULL; m_submit->destroy(); @@ -2825,13 +2894,6 @@ again: ); } - uint32_t size = sizeof(uint32_t)+sizeof(TextureCreate); - const Memory* mem = alloc(size); - - bx::StaticMemoryBlockWriter writer(mem->data, mem->size); - uint32_t magic = BGFX_CHUNK_MAGIC_TEX; - bx::write(&writer, magic); - if (BackbufferRatio::Count != _ratio) { _width = uint16_t(s_ctx->m_resolution.m_width); @@ -2839,6 +2901,13 @@ again: getTextureSizeFromRatio(_ratio, _width, _height); } + uint32_t size = sizeof(uint32_t)+sizeof(TextureCreate); + const Memory* mem = alloc(size); + + bx::StaticMemoryBlockWriter writer(mem->data, mem->size); + uint32_t magic = BGFX_CHUNK_MAGIC_TEX; + bx::write(&writer, magic); + TextureCreate tc; tc.m_flags = _flags; tc.m_width = _width; @@ -2846,7 +2915,7 @@ again: tc.m_sides = 0; tc.m_depth = 0; tc.m_numMips = _numMips; - tc.m_format = uint8_t(_format); + tc.m_format = _format; tc.m_cubeMap = false; tc.m_mem = _mem; bx::write(&writer, tc); @@ -2897,15 +2966,15 @@ again: bx::write(&writer, magic); TextureCreate tc; - tc.m_flags = _flags; - tc.m_width = _width; - tc.m_height = _height; - tc.m_sides = 0; - tc.m_depth = _depth; + tc.m_flags = _flags; + tc.m_width = _width; + tc.m_height = _height; + tc.m_sides = 0; + tc.m_depth = _depth; tc.m_numMips = _numMips; - tc.m_format = uint8_t(_format); + tc.m_format = _format; tc.m_cubeMap = false; - tc.m_mem = _mem; + tc.m_mem = _mem; bx::write(&writer, tc); return s_ctx->createTexture(mem, _flags, 0, NULL, BackbufferRatio::Count); @@ -2947,7 +3016,7 @@ again: tc.m_sides = 6; tc.m_depth = 0; tc.m_numMips = _numMips; - tc.m_format = uint8_t(_format); + tc.m_format = _format; tc.m_cubeMap = true; tc.m_mem = _mem; bx::write(&writer, tc); @@ -3488,6 +3557,32 @@ again: #include #include +#define FLAGS_MASK_TEST(_flags, _mask) ( (_flags) == ( (_flags) & (_mask) ) ) + +BX_STATIC_ASSERT(FLAGS_MASK_TEST(0 + | BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER + | BGFX_TEXTURE_INTERNAL_SHARED + , BGFX_TEXTURE_RESERVED_MASK + ) ); + +BX_STATIC_ASSERT(FLAGS_MASK_TEST(0 + | BGFX_RESET_INTERNAL_FORCE + , BGFX_RESET_RESERVED_MASK + ) ); + +BX_STATIC_ASSERT(FLAGS_MASK_TEST(0 + | BGFX_STATE_INTERNAL_SCISSOR + | BGFX_STATE_INTERNAL_OCCLUSION_QUERY + , BGFX_STATE_RESERVED_MASK + ) ); + +BX_STATIC_ASSERT(FLAGS_MASK_TEST(0 + | BGFX_SUBMIT_INTERNAL_OCCLUSION_VISIBLE + , BGFX_SUBMIT_RESERVED_MASK + ) ); + +#undef FLAGS_MASK_TEST + BX_STATIC_ASSERT(bgfx::Fatal::Count == bgfx::Fatal::Enum(BGFX_FATAL_COUNT) ); BX_STATIC_ASSERT(bgfx::RendererType::Count == bgfx::RendererType::Enum(BGFX_RENDERER_TYPE_COUNT) ); BX_STATIC_ASSERT(bgfx::Attrib::Count == bgfx::Attrib::Enum(BGFX_ATTRIB_COUNT) ); @@ -3504,6 +3599,7 @@ BX_STATIC_ASSERT(sizeof(bgfx::InstanceDataBuffer) == sizeof(bgfx_instance_dat BX_STATIC_ASSERT(sizeof(bgfx::TextureInfo) == sizeof(bgfx_texture_info_t) ); BX_STATIC_ASSERT(sizeof(bgfx::Caps) == sizeof(bgfx_caps_t) ); BX_STATIC_ASSERT(sizeof(bgfx::PlatformData) == sizeof(bgfx_platform_data_t) ); +BX_STATIC_ASSERT(sizeof(bgfx::InternalData) == sizeof(bgfx_internal_data_t) ); namespace bgfx { @@ -4364,9 +4460,26 @@ BGFX_C_API bgfx_render_frame_t bgfx_render_frame() return bgfx_render_frame_t(bgfx::renderFrame() ); } -BGFX_C_API void bgfx_set_platform_data(bgfx_platform_data_t* _pd) +BGFX_C_API void bgfx_set_platform_data(const bgfx_platform_data_t* _data) { - bgfx::setPlatformData(*(bgfx::PlatformData*)_pd); + bgfx::setPlatformData(*(const bgfx::PlatformData*)_data); +} + +BGFX_C_API const bgfx_internal_data_t* bgfx_get_internal_data() +{ + return (const bgfx_internal_data_t*)bgfx::getInternalData(); +} + +BGFX_C_API uintptr_t bgfx_override_internal_texture_ptr(bgfx_texture_handle_t _handle, uintptr_t _ptr) +{ + union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle }; + return bgfx::overrideInternal(handle.cpp, _ptr); +} + +BGFX_C_API uintptr_t bgfx_override_internal_texture(bgfx_texture_handle_t _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, bgfx_texture_format_t _format, uint32_t _flags) +{ + union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle }; + return bgfx::overrideInternal(handle.cpp, _width, _height, _numMips, bgfx::TextureFormat::Enum(_format), _flags); } BGFX_C_API bgfx_interface_vtbl_t* bgfx_get_interface(uint32_t _version) @@ -4376,6 +4489,9 @@ BGFX_C_API bgfx_interface_vtbl_t* bgfx_get_interface(uint32_t _version) #define BGFX_IMPORT \ BGFX_IMPORT_FUNC(render_frame) \ BGFX_IMPORT_FUNC(set_platform_data) \ + BGFX_IMPORT_FUNC(get_internal_data) \ + BGFX_IMPORT_FUNC(override_internal_texture_ptr) \ + BGFX_IMPORT_FUNC(override_internal_texture) \ BGFX_IMPORT_FUNC(vertex_decl_begin) \ BGFX_IMPORT_FUNC(vertex_decl_add) \ BGFX_IMPORT_FUNC(vertex_decl_skip) \ diff --git a/3rdparty/bgfx/src/bgfx_p.h b/3rdparty/bgfx/src/bgfx_p.h index fc13eeb06b7..9e4e5a17184 100644 --- a/3rdparty/bgfx/src/bgfx_p.h +++ b/3rdparty/bgfx/src/bgfx_p.h @@ -201,6 +201,7 @@ namespace stl #define BGFX_MAX_COMPUTE_BINDINGS 8 #define BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER UINT32_C(0x10000000) +#define BGFX_TEXTURE_INTERNAL_SHARED UINT32_C(0x20000000) #define BGFX_RESET_INTERNAL_FORCE UINT32_C(0x80000000) @@ -212,9 +213,9 @@ namespace stl #define BGFX_RENDERER_DIRECT3D9_NAME "Direct3D 9" #define BGFX_RENDERER_DIRECT3D11_NAME "Direct3D 11" #define BGFX_RENDERER_DIRECT3D12_NAME "Direct3D 12" -#define BGFX_RENDERER_METAL_NAME "Metal" -#define BGFX_RENDERER_VULKAN_NAME "Vulkan" -#define BGFX_RENDERER_NULL_NAME "NULL" +#define BGFX_RENDERER_METAL_NAME "Metal" +#define BGFX_RENDERER_VULKAN_NAME "Vulkan" +#define BGFX_RENDERER_NULL_NAME "NULL" #if BGFX_CONFIG_RENDERER_OPENGL # if BGFX_CONFIG_RENDERER_OPENGL >= 31 && BGFX_CONFIG_RENDERER_OPENGL <= 33 @@ -256,6 +257,7 @@ namespace stl namespace bgfx { + extern InternalData g_internalData; extern PlatformData g_platformData; #if BGFX_CONFIG_MAX_DRAW_CALLS < (64<<10) @@ -309,13 +311,13 @@ namespace bgfx struct TextureCreate { + TextureFormat::Enum m_format; uint32_t m_flags; uint16_t m_width; uint16_t m_height; uint16_t m_sides; uint16_t m_depth; uint8_t m_numMips; - uint8_t m_format; bool m_cubeMap; const Memory* m_mem; }; @@ -448,13 +450,7 @@ namespace bgfx const uint32_t width = (bx::uint32_min(m_width, _width +_x)-_x)*2; const uint32_t height = bx::uint32_min(m_height, _height+_y)-_y; const uint32_t dstPitch = m_width*2; - - for (uint32_t yy = 0; yy < height; ++yy) - { - memcpy(dst, src, width); - dst += dstPitch; - src += _pitch; - } + bx::memCopy(dst, src, width, height, _pitch, dstPitch); } } @@ -700,26 +696,28 @@ namespace bgfx void operator=(const CommandBuffer&); }; -#define SORT_KEY_DRAW_BIT (UINT64_C(1)<<0x36) +#define SORT_KEY_NUM_BITS_TRANS 2 -#define SORT_KEY_SEQ_SHIFT 0x2b -#define SORT_KEY_SEQ_MASK (UINT64_C(0x7ff)<> SORT_KEY_SEQ_SHIFT); + m_seq = uint32_t( (_key & SORT_KEY_SEQ_MASK ) >> SORT_KEY_SEQ_SHIFT); m_view = uint8_t( (_key & SORT_KEY_VIEW_MASK) >> SORT_KEY_VIEW_SHIFT); if (_key & SORT_KEY_DRAW_BIT) { @@ -832,15 +830,15 @@ namespace bgfx void reset() { m_depth = 0; - m_program = 0; m_seq = 0; + m_program = 0; m_view = 0; m_trans = 0; } uint32_t m_depth; + uint32_t m_seq; uint16_t m_program; - uint16_t m_seq; uint8_t m_view; uint8_t m_trans; }; @@ -2041,6 +2039,8 @@ namespace bgfx virtual void updateTextureEnd() = 0; virtual void readTexture(TextureHandle _handle, void* _data) = 0; virtual void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) = 0; + virtual void overrideInternal(TextureHandle _handle, uintptr_t _ptr) = 0; + virtual uintptr_t getInternal(TextureHandle _handle) = 0; virtual void destroyTexture(TextureHandle _handle) = 0; virtual void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const TextureHandle* _textureHandles) = 0; virtual void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _depthFormat) = 0; diff --git a/3rdparty/bgfx/src/bgfx_shader.sh b/3rdparty/bgfx/src/bgfx_shader.sh index a82a03e2fbb..77998652e9d 100644 --- a/3rdparty/bgfx/src/bgfx_shader.sh +++ b/3rdparty/bgfx/src/bgfx_shader.sh @@ -12,6 +12,22 @@ #ifndef __cplusplus +#if BGFX_SHADER_LANGUAGE_HLSL > 3 +# define BRANCH [branch] +# define LOOP [loop] +# define UNROLL [unroll] +#else +# define BRANCH +# define LOOP +# define UNROLL +#endif // BGFX_SHADER_LANGUAGE_HLSL > 3 + +#if BGFX_SHADER_LANGUAGE_HLSL > 3 && BGFX_SHADER_TYPE_FRAGMENT +# define EARLY_DEPTH_STENCIL [earlydepthstencil] +#else +# define EARLY_DEPTH_STENCIL +#endif // BGFX_SHADER_LANGUAGE_HLSL > 3 && BGFX_SHADER_TYPE_FRAGMENT + #if BGFX_SHADER_LANGUAGE_HLSL # define dFdx(_x) ddx(_x) # define dFdy(_y) ddy(-_y) @@ -59,13 +75,13 @@ struct BgfxSampler2DShadow float bgfxShadow2D(BgfxSampler2DShadow _sampler, vec3 _coord) { - return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, _coord.xy, _coord.z * 2.0 - 1.0); + return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, _coord.xy, _coord.z); } float bgfxShadow2DProj(BgfxSampler2DShadow _sampler, vec4 _coord) { vec3 coord = _coord.xyz * rcp(_coord.w); - return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, coord.xy, coord.z * 2.0 - 1.0); + return _sampler.m_texture.SampleCmpLevelZero(_sampler.m_sampler, coord.xy, coord.z); } struct BgfxSampler3D @@ -180,9 +196,9 @@ float bgfxShadow2D(sampler2DShadow _sampler, vec3 _coord) { #if 0 float occluder = tex2D(_sampler, _coord.xy).x; - return step(_coord.z * 2.0 - 1.0, occluder); + return step(_coord.z, occluder); #else - return tex2Dproj(_sampler, vec4(_coord.xy, _coord.z * 2.0 - 1.0, 1.0) ).x; + return tex2Dproj(_sampler, vec4(_coord.xy, _coord.z, 1.0) ).x; #endif // 0 } @@ -191,7 +207,7 @@ float bgfxShadow2DProj(sampler2DShadow _sampler, vec4 _coord) #if 0 vec3 coord = _coord.xyz * rcp(_coord.w); float occluder = tex2D(_sampler, coord.xy).x; - return step(coord.z * 2.0 - 1.0, occluder); + return step(coord.z, occluder); #else return tex2Dproj(_sampler, _coord).x; #endif // 0 diff --git a/3rdparty/bgfx/src/config.h b/3rdparty/bgfx/src/config.h index 5966105ea15..edfa69da75a 100644 --- a/3rdparty/bgfx/src/config.h +++ b/3rdparty/bgfx/src/config.h @@ -65,6 +65,7 @@ || BX_PLATFORM_NACL \ || BX_PLATFORM_QNX \ || BX_PLATFORM_RPI \ + || BX_PLATFORM_STEAMLINK \ ? 1 : 0) # endif // BGFX_CONFIG_RENDERER_OPENGLES @@ -77,8 +78,10 @@ || BGFX_CONFIG_RENDERER_DIRECT3D9 \ || BGFX_CONFIG_RENDERER_DIRECT3D11 \ || BGFX_CONFIG_RENDERER_DIRECT3D12 \ + || BGFX_CONFIG_RENDERER_METAL \ || BGFX_CONFIG_RENDERER_OPENGL \ || BGFX_CONFIG_RENDERER_OPENGLES \ + || BGFX_CONFIG_RENDERER_VULKAN \ ? 1 : 0) ) # endif // BGFX_CONFIG_RENDERER_NULL #else @@ -175,19 +178,7 @@ #endif // BGFX_CONFIG_DEBUG_OCCLUSION #ifndef BGFX_CONFIG_MULTITHREADED -# define BGFX_CONFIG_MULTITHREADED ( (!BGFX_CONFIG_RENDERER_NULL)&&(0 \ - || BX_PLATFORM_ANDROID \ - || BX_PLATFORM_BSD \ - || BX_PLATFORM_LINUX \ - || BX_PLATFORM_IOS \ - || BX_PLATFORM_NACL \ - || BX_PLATFORM_OSX \ - || BX_PLATFORM_QNX \ - || BX_PLATFORM_RPI \ - || BX_PLATFORM_WINDOWS \ - || BX_PLATFORM_WINRT \ - || BX_PLATFORM_XBOX360 \ - ? 1 : 0) ) +# define BGFX_CONFIG_MULTITHREADED ( (0 == BX_PLATFORM_EMSCRIPTEN) ? 1 : 0) #endif // BGFX_CONFIG_MULTITHREADED #ifndef BGFX_CONFIG_MAX_DRAW_CALLS @@ -206,6 +197,21 @@ # define BGFX_CONFIG_MAX_RECT_CACHE (4<<10) #endif // BGFX_CONFIG_MAX_RECT_CACHE +#ifndef BGFX_CONFIG_SORT_KEY_NUM_BITS_DEPTH +# define BGFX_CONFIG_SORT_KEY_NUM_BITS_DEPTH 32 +#endif // BGFX_CONFIG_SORT_KEY_NUM_BITS_DEPTH + +#ifndef BGFX_CONFIG_SORT_KEY_NUM_BITS_SEQ +# define BGFX_CONFIG_SORT_KEY_NUM_BITS_SEQ 11 +#endif // BGFX_CONFIG_SORT_KEY_NUM_BITS_SEQ + +#ifndef BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM +# define BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM 9 +#endif // BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM + +// Cannot be configured directly. Must must be power of 2. +#define BGFX_CONFIG_MAX_PROGRAMS (1< + void encodeRgbE(float* _dst, const float* _src) + { + // Reference: + // https://www.opengl.org/registry/specs/EXT/texture_shared_exponent.txt + const int32_t expMax = (1<>23) & 0xff) - 127) ) ) + 1 + expBias; + float denom = bx::fpow(2.0f, float(expShared - expBias - MantissaBits) ); + + if ( (1< + void decodeRgbE(float* _dst, const float* _src) + { + const int32_t expBias = (1<<(ExpBits - 1) ) - 1; + const float exponent = _src[3]-float(expBias-MantissaBits); + const float scale = bx::fpow(2.0f, exponent); + _dst[0] = _src[0] * scale; + _dst[1] = _src[1] * scale; + _dst[2] = _src[2] * scale; + } + + // RGB9E5F + void packRgb9E5F(void* _dst, const float* _src) + { + float tmp[4]; + encodeRgbE<9, 5>(tmp, _src); + + *( (uint32_t*)_dst) = 0 + | (uint32_t(tmp[0]) ) + | (uint32_t(tmp[1]) << 9) + | (uint32_t(tmp[2]) <<18) + | (uint32_t(tmp[3]) <<27) + ; + } + + void unpackRgb9E5F(float* _dst, const void* _src) + { + uint32_t packed = *( (const uint32_t*)_src); + + float tmp[4]; + tmp[0] = float( ( (packed ) & 0x1ff) ) / 511.0f; + tmp[1] = float( ( (packed>> 9) & 0x1ff) ) / 511.0f; + tmp[2] = float( ( (packed>>18) & 0x1ff) ) / 511.0f; + tmp[3] = float( ( (packed>>27) & 0x1f) ); + + decodeRgbE<9, 5>(_dst, tmp); + } + + // RGBA32I + void packRgba32I(void* _dst, const float* _src) + { + memcpy(_dst, _src, 16); + } + + void unpackRgba32I(float* _dst, const void* _src) + { + memcpy(_dst, _src, 16); + } + + // RGBA32U + void packRgba32U(void* _dst, const float* _src) + { + memcpy(_dst, _src, 16); + } + + void unpackRgba32U(float* _dst, const void* _src) + { + memcpy(_dst, _src, 16); + } + + // RGBA32F + void packRgba32F(void* _dst, const float* _src) + { + memcpy(_dst, _src, 16); + } + + void unpackRgba32F(float* _dst, const void* _src) + { + memcpy(_dst, _src, 16); + } + + // R5G6B5 + void packR5G6B5(void* _dst, const float* _src) + { + *( (uint16_t*)_dst) = 0 + | uint16_t(toUnorm(_src[0], 31.0f) ) + | uint16_t(toUnorm(_src[1], 63.0f)<< 5) + | uint16_t(toUnorm(_src[2], 31.0f)<<11) + ; + } + + void unpackR5G6B5(float* _dst, const void* _src) + { + uint16_t packed = *( (const uint16_t*)_src); + _dst[0] = float( ( (packed ) & 0x1f) ) / 31.0f; + _dst[1] = float( ( (packed>> 5) & 0x3f) ) / 63.0f; + _dst[2] = float( ( (packed>>11) & 0x1f) ) / 31.0f; + } + + // RGBA4 + void packRgba4(void* _dst, const float* _src) + { + *( (uint16_t*)_dst) = 0 + | uint16_t(toUnorm(_src[0], 15.0f) ) + | uint16_t(toUnorm(_src[1], 15.0f)<< 4) + | uint16_t(toUnorm(_src[2], 15.0f)<< 8) + | uint16_t(toUnorm(_src[3], 15.0f)<<12) + ; + } + + void unpackRgba4(float* _dst, const void* _src) + { + uint16_t packed = *( (const uint16_t*)_src); + _dst[0] = float( ( (packed ) & 0xf) ) / 15.0f; + _dst[1] = float( ( (packed>> 4) & 0xf) ) / 15.0f; + _dst[2] = float( ( (packed>> 8) & 0xf) ) / 15.0f; + _dst[3] = float( ( (packed>>12) & 0xf) ) / 15.0f; + } + + // RGB5A1 + void packRgb5a1(void* _dst, const float* _src) + { + *( (uint16_t*)_dst) = 0 + | uint16_t(toUnorm(_src[0], 31.0f) ) + | uint16_t(toUnorm(_src[1], 31.0f)<< 5) + | uint16_t(toUnorm(_src[2], 31.0f)<<10) + | uint16_t(toUnorm(_src[3], 1.0f)<<15) + ; + } + + void unpackRgb5a1(float* _dst, const void* _src) + { + uint16_t packed = *( (const uint16_t*)_src); + _dst[0] = float( ( (packed ) & 0x1f) ) / 31.0f; + _dst[1] = float( ( (packed>> 5) & 0x1f) ) / 31.0f; + _dst[2] = float( ( (packed>>10) & 0x1f) ) / 31.0f; + _dst[3] = float( ( (packed>>14) & 0x1) ); + } + + // RGB10A2 + void packRgb10A2(void* _dst, const float* _src) + { + *( (uint32_t*)_dst) = 0 + | (toUnorm(_src[0], 1023.0f) ) + | (toUnorm(_src[1], 1023.0f)<<10) + | (toUnorm(_src[2], 1023.0f)<<20) + | (toUnorm(_src[3], 3.0f)<<30) + ; + } + + void unpackRgb10A2(float* _dst, const void* _src) + { + uint32_t packed = *( (const uint32_t*)_src); + _dst[0] = float( ( (packed ) & 0x3ff) ) / 1023.0f; + _dst[1] = float( ( (packed>>10) & 0x3ff) ) / 1023.0f; + _dst[2] = float( ( (packed>>20) & 0x3ff) ) / 1023.0f; + _dst[3] = float( ( (packed>>30) & 0x3) ) / 3.0f; + } + + // R11G11B10F + void packR11G11B10F(void* _dst, const float* _src) + { + *( (uint32_t*)_dst) = 0 + | ( (bx::halfFromFloat(_src[0])>> 4) & 0x7ff) + | ( (bx::halfFromFloat(_src[0])<< 7) & 0x3ff800) + | ( (bx::halfFromFloat(_src[0])<<17) & 0xffc00000) + ; + } + + void unpackR11G11B10F(float* _dst, const void* _src) + { + uint32_t packed = *( (const uint32_t*)_src); + _dst[0] = bx::halfToFloat( (packed<< 4) & 0x7ff0); + _dst[1] = bx::halfToFloat( (packed>> 7) & 0x7ff0); + _dst[2] = bx::halfToFloat( (packed>>17) & 0x7fe0); + } + + typedef void (*PackFn)(void*, const float*); + typedef void (*UnpackFn)(float*, const void*); + + struct PackUnpack + { + PackFn pack; + UnpackFn unpack; + }; + + static PackUnpack s_packUnpack[] = + { + { NULL, NULL }, // BC1 + { NULL, NULL }, // BC2 + { NULL, NULL }, // BC3 + { NULL, NULL }, // BC4 + { NULL, NULL }, // BC5 + { NULL, NULL }, // BC6H + { NULL, NULL }, // BC7 + { NULL, NULL }, // ETC1 + { NULL, NULL }, // ETC2 + { NULL, NULL }, // ETC2A + { NULL, NULL }, // ETC2A1 + { NULL, NULL }, // PTC12 + { NULL, NULL }, // PTC14 + { NULL, NULL }, // PTC12A + { NULL, NULL }, // PTC14A + { NULL, NULL }, // PTC22 + { NULL, NULL }, // PTC24 + { NULL, NULL }, // Unknown + { NULL, NULL }, // R1 + { packR8, unpackR8 }, // A8 + { packR8, unpackR8 }, // R8 + { packR8I, unpackR8I }, // R8I + { packR8U, unpackR8U }, // R8U + { packR8S, unpackR8S }, // R8S + { packR16, unpackR16 }, // R16 + { packR16I, unpackR16I }, // R16I + { packR16U, unpackR16U }, // R16U + { packR16F, unpackR16F }, // R16F + { packR16S, unpackR16S }, // R16S + { packR32I, unpackR32I }, // R32I + { packR32U, unpackR32U }, // R32U + { packR32F, unpackR32F }, // R32F + { packRg8, unpackRg8 }, // RG8 + { packRg8I, unpackRg8I }, // RG8I + { packRg8U, unpackRg8U }, // RG8U + { packRg8S, unpackRg8S }, // RG8S + { packRg16, unpackRg16 }, // RG16 + { packRg16I, unpackRg16I }, // RG16I + { packRg16U, unpackRg16U }, // RG16U + { packRg16F, unpackRg16F }, // RG16F + { packRg16S, unpackRg16S }, // RG16S + { packRg32I, unpackRg32I }, // RG32I + { packRg32U, unpackRg32U }, // RG32U + { packRg32F, unpackRg32F }, // RG32F + { packRgb9E5F, unpackRgb9E5F }, // RGB9E5F + { packBgra8, unpackBgra8 }, // BGRA8 + { packRgba8, unpackRgba8 }, // RGBA8 + { packRgba8I, unpackRgba8I }, // RGBA8I + { packRgba8U, unpackRgba8U }, // RGBA8U + { packRgba8S, unpackRgba8S }, // RGBA8S + { packRgba16, unpackRgba16 }, // RGBA16 + { packRgba16I, unpackRgba16I }, // RGBA16I + { packRgba16U, unpackRgba16U }, // RGBA16U + { packRgba16F, unpackRgba16F }, // RGBA16F + { packRgba16S, unpackRgba16S }, // RGBA16S + { packRgba32I, unpackRgba32I }, // RGBA32I + { packRgba32U, unpackRgba32U }, // RGBA32U + { packRgba32F, unpackRgba32F }, // RGBA32F + { packR5G6B5, unpackR5G6B5 }, // R5G6B5 + { packRgba4, unpackRgba4 }, // RGBA4 + { packRgb5a1, unpackRgb5a1 }, // RGB5A1 + { packRgb10A2, unpackRgb10A2 }, // RGB10A2 + { packR11G11B10F, unpackR11G11B10F }, // R11G11B10F + { NULL, NULL }, // UnknownDepth + { NULL, NULL }, // D16 + { NULL, NULL }, // D24 + { NULL, NULL }, // D24S8 + { NULL, NULL }, // D32 + { NULL, NULL }, // D16F + { NULL, NULL }, // D24F + { NULL, NULL }, // D32F + { NULL, NULL }, // D0S8 + }; + BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_packUnpack) ); + + bool imageConvert(void* _dst, TextureFormat::Enum _dstFormat, const void* _src, TextureFormat::Enum _srcFormat, uint32_t _width, uint32_t _height) + { + UnpackFn unpack = s_packUnpack[_srcFormat].unpack; + PackFn pack = s_packUnpack[_dstFormat].pack; + if (NULL == pack + || NULL == unpack) + { + return false; + } + + const uint8_t* src = (uint8_t*)_src; + uint8_t* dst = (uint8_t*)_dst; + + const uint32_t srcBpp = s_imageBlockInfo[_srcFormat].bitsPerPixel; + const uint32_t dstBpp = s_imageBlockInfo[_dstFormat].bitsPerPixel; + const uint32_t srcPitch = _width * srcBpp / 8; + const uint32_t dstPitch = _width * dstBpp / 8; + + for (uint32_t yy = 0; yy < _height; ++yy, src += srcPitch, dst += dstPitch) + { + for (uint32_t xx = 0; xx < _width; ++xx) + { + float rgba[4]; + unpack(rgba, &src[xx*srcBpp/8]); + pack(&dst[xx*dstBpp/8], rgba); + } + } + + return true; } uint8_t bitRangeConvert(uint32_t _in, uint32_t _from, uint32_t _to) @@ -1324,6 +2213,34 @@ namespace bgfx } } + const Memory* imageAlloc(ImageContainer& _imageContainer, TextureFormat::Enum _format, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _mips) + { + const uint8_t numMips = _mips ? imageGetNumMips(_format, _width, _height) : 1; + uint32_t size = imageGetSize(_format, _width, _height, 0, false, numMips); + const Memory* image = alloc(size); + + _imageContainer.m_data = image->data; + _imageContainer.m_format = _format; + _imageContainer.m_size = image->size; + _imageContainer.m_offset = 0; + _imageContainer.m_width = _width; + _imageContainer.m_height = _height; + _imageContainer.m_depth = _depth; + _imageContainer.m_numMips = numMips; + _imageContainer.m_hasAlpha = false; + _imageContainer.m_cubeMap = _cubeMap; + _imageContainer.m_ktx = false; + _imageContainer.m_ktxLE = false; + _imageContainer.m_srgb = false; + + return image; + } + + void imageFree(const Memory* _memory) + { + release(_memory); + } + // DDS #define DDS_MAGIC BX_MAKEFOURCC('D', 'D', 'S', ' ') #define DDS_HEADER_SIZE 124 @@ -1670,7 +2587,7 @@ namespace bgfx _imageContainer.m_width = width; _imageContainer.m_height = height; _imageContainer.m_depth = depth; - _imageContainer.m_format = uint8_t(format); + _imageContainer.m_format = format; _imageContainer.m_numMips = uint8_t( (caps[0] & DDSCAPS_MIPMAP) ? mips : 1); _imageContainer.m_hasAlpha = hasAlpha; _imageContainer.m_cubeMap = cubeMap; @@ -1852,7 +2769,7 @@ namespace bgfx { KTX_RG32UI, KTX_ZERO, KTX_RG, KTX_UNSIGNED_INT, }, // RG32U { KTX_RG32F, KTX_ZERO, KTX_RG, KTX_FLOAT, }, // RG32F { KTX_RGB9_E5, KTX_ZERO, KTX_RGB, KTX_UNSIGNED_INT_5_9_9_9_REV, }, // RGB9E5F - { KTX_RGBA8, KTX_SRGB8_ALPHA8, KTX_BGRA, KTX_UNSIGNED_BYTE, }, // BGRA8 + { KTX_BGRA, KTX_SRGB8_ALPHA8, KTX_BGRA, KTX_UNSIGNED_BYTE, }, // BGRA8 { KTX_RGBA8, KTX_SRGB8_ALPHA8, KTX_RGBA, KTX_UNSIGNED_BYTE, }, // RGBA8 { KTX_RGBA8I, KTX_ZERO, KTX_RGBA, KTX_BYTE, }, // RGBA8I { KTX_RGBA8UI, KTX_ZERO, KTX_RGBA, KTX_UNSIGNED_BYTE, }, // RGBA8U @@ -1946,7 +2863,7 @@ namespace bgfx _imageContainer.m_width = width; _imageContainer.m_height = height; _imageContainer.m_depth = depth; - _imageContainer.m_format = uint8_t(format); + _imageContainer.m_format = format; _imageContainer.m_numMips = uint8_t(numMips); _imageContainer.m_hasAlpha = hasAlpha; _imageContainer.m_cubeMap = numFaces > 1; @@ -2094,7 +3011,7 @@ namespace bgfx _imageContainer.m_width = width; _imageContainer.m_height = height; _imageContainer.m_depth = depth; - _imageContainer.m_format = uint8_t(format); + _imageContainer.m_format = format; _imageContainer.m_numMips = uint8_t(numMips); _imageContainer.m_hasAlpha = hasAlpha; _imageContainer.m_cubeMap = numFaces > 1; @@ -2161,16 +3078,17 @@ namespace bgfx return imageParse(_imageContainer, &reader); } - void imageDecodeToBgra8(uint8_t* _dst, const uint8_t* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, uint8_t _type) + void imageDecodeToBgra8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format) { - const uint8_t* src = _src; + const uint8_t* src = (const uint8_t*)_src; + uint8_t* dst = (uint8_t*)_dst; uint32_t width = _width/4; uint32_t height = _height/4; uint8_t temp[16*4]; - switch (_type) + switch (_format) { case TextureFormat::BC1: for (uint32_t yy = 0; yy < height; ++yy) @@ -2180,11 +3098,11 @@ namespace bgfx decodeBlockDxt1(temp, src); src += 8; - uint8_t* dst = &_dst[(yy*_pitch+xx*4)*4]; - memcpy(&dst[0*_pitch], &temp[ 0], 16); - memcpy(&dst[1*_pitch], &temp[16], 16); - memcpy(&dst[2*_pitch], &temp[32], 16); - memcpy(&dst[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; + memcpy(&block[0*_pitch], &temp[ 0], 16); + memcpy(&block[1*_pitch], &temp[16], 16); + memcpy(&block[2*_pitch], &temp[32], 16); + memcpy(&block[3*_pitch], &temp[48], 16); } } break; @@ -2199,11 +3117,11 @@ namespace bgfx decodeBlockDxt(temp, src); src += 8; - uint8_t* dst = &_dst[(yy*_pitch+xx*4)*4]; - memcpy(&dst[0*_pitch], &temp[ 0], 16); - memcpy(&dst[1*_pitch], &temp[16], 16); - memcpy(&dst[2*_pitch], &temp[32], 16); - memcpy(&dst[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; + memcpy(&block[0*_pitch], &temp[ 0], 16); + memcpy(&block[1*_pitch], &temp[16], 16); + memcpy(&block[2*_pitch], &temp[32], 16); + memcpy(&block[3*_pitch], &temp[48], 16); } } break; @@ -2218,11 +3136,11 @@ namespace bgfx decodeBlockDxt(temp, src); src += 8; - uint8_t* dst = &_dst[(yy*_pitch+xx*4)*4]; - memcpy(&dst[0*_pitch], &temp[ 0], 16); - memcpy(&dst[1*_pitch], &temp[16], 16); - memcpy(&dst[2*_pitch], &temp[32], 16); - memcpy(&dst[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; + memcpy(&block[0*_pitch], &temp[ 0], 16); + memcpy(&block[1*_pitch], &temp[16], 16); + memcpy(&block[2*_pitch], &temp[32], 16); + memcpy(&block[3*_pitch], &temp[48], 16); } } break; @@ -2235,11 +3153,11 @@ namespace bgfx decodeBlockDxt45A(temp, src); src += 8; - uint8_t* dst = &_dst[(yy*_pitch+xx*4)*4]; - memcpy(&dst[0*_pitch], &temp[ 0], 16); - memcpy(&dst[1*_pitch], &temp[16], 16); - memcpy(&dst[2*_pitch], &temp[32], 16); - memcpy(&dst[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; + memcpy(&block[0*_pitch], &temp[ 0], 16); + memcpy(&block[1*_pitch], &temp[16], 16); + memcpy(&block[2*_pitch], &temp[32], 16); + memcpy(&block[3*_pitch], &temp[48], 16); } } break; @@ -2249,10 +3167,10 @@ namespace bgfx { for (uint32_t xx = 0; xx < width; ++xx) { - decodeBlockDxt45A(temp+1, src); - src += 8; decodeBlockDxt45A(temp+2, src); src += 8; + decodeBlockDxt45A(temp+1, src); + src += 8; for (uint32_t ii = 0; ii < 16; ++ii) { @@ -2263,11 +3181,11 @@ namespace bgfx temp[ii*4+3] = 0; } - uint8_t* dst = &_dst[(yy*_pitch+xx*4)*4]; - memcpy(&dst[0*_pitch], &temp[ 0], 16); - memcpy(&dst[1*_pitch], &temp[16], 16); - memcpy(&dst[2*_pitch], &temp[32], 16); - memcpy(&dst[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; + memcpy(&block[0*_pitch], &temp[ 0], 16); + memcpy(&block[1*_pitch], &temp[16], 16); + memcpy(&block[2*_pitch], &temp[32], 16); + memcpy(&block[3*_pitch], &temp[48], 16); } } break; @@ -2281,11 +3199,11 @@ namespace bgfx decodeBlockEtc12(temp, src); src += 8; - uint8_t* dst = &_dst[(yy*_pitch+xx*4)*4]; - memcpy(&dst[0*_pitch], &temp[ 0], 16); - memcpy(&dst[1*_pitch], &temp[16], 16); - memcpy(&dst[2*_pitch], &temp[32], 16); - memcpy(&dst[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; + memcpy(&block[0*_pitch], &temp[ 0], 16); + memcpy(&block[1*_pitch], &temp[16], 16); + memcpy(&block[2*_pitch], &temp[32], 16); + memcpy(&block[3*_pitch], &temp[48], 16); } } break; @@ -2317,11 +3235,11 @@ namespace bgfx { decodeBlockPtc14(temp, src, xx, yy, width, height); - uint8_t* dst = &_dst[(yy*_pitch+xx*4)*4]; - memcpy(&dst[0*_pitch], &temp[ 0], 16); - memcpy(&dst[1*_pitch], &temp[16], 16); - memcpy(&dst[2*_pitch], &temp[32], 16); - memcpy(&dst[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; + memcpy(&block[0*_pitch], &temp[ 0], 16); + memcpy(&block[1*_pitch], &temp[16], 16); + memcpy(&block[2*_pitch], &temp[32], 16); + memcpy(&block[3*_pitch], &temp[48], 16); } } break; @@ -2333,11 +3251,11 @@ namespace bgfx { decodeBlockPtc14A(temp, src, xx, yy, width, height); - uint8_t* dst = &_dst[(yy*_pitch+xx*4)*4]; - memcpy(&dst[0*_pitch], &temp[ 0], 16); - memcpy(&dst[1*_pitch], &temp[16], 16); - memcpy(&dst[2*_pitch], &temp[32], 16); - memcpy(&dst[3*_pitch], &temp[48], 16); + uint8_t* block = &dst[(yy*_pitch+xx*4)*4]; + memcpy(&block[0*_pitch], &temp[ 0], 16); + memcpy(&block[1*_pitch], &temp[16], 16); + memcpy(&block[2*_pitch], &temp[32], 16); + memcpy(&block[3*_pitch], &temp[48], 16); } } break; @@ -2367,9 +3285,9 @@ namespace bgfx } } - void imageDecodeToRgba8(uint8_t* _dst, const uint8_t* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, uint8_t _type) + void imageDecodeToRgba8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format) { - switch (_type) + switch (_format) { case TextureFormat::RGBA8: memcpy(_dst, _src, _pitch*_height); @@ -2380,12 +3298,136 @@ namespace bgfx break; default: - imageDecodeToBgra8(_dst, _src, _width, _height, _pitch, _type); + imageDecodeToBgra8(_dst, _src, _width, _height, _pitch, _format); imageSwizzleBgra8(_width, _height, _pitch, _dst, _dst); break; } } + void imageRgba8ToRgba32fRef(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + { + const uint32_t dstwidth = _width; + const uint32_t dstheight = _height; + + if (0 == dstwidth + || 0 == dstheight) + { + return; + } + + float* dst = (float*)_dst; + const uint8_t* src = (const uint8_t*)_src; + + for (uint32_t yy = 0, ystep = _pitch; yy < dstheight; ++yy, src += ystep) + { + const uint8_t* rgba = src; + for (uint32_t xx = 0; xx < dstwidth; ++xx, rgba += 4, dst += 4) + { + dst[0] = powf(rgba[ 0], 2.2f); + dst[1] = powf(rgba[ 1], 2.2f); + dst[2] = powf(rgba[ 2], 2.2f); + dst[3] = rgba[ 3]; + } + } + } + + void imageRgba8ToRgba32f(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + { + const uint32_t dstwidth = _width; + const uint32_t dstheight = _height; + + if (0 == dstwidth + || 0 == dstheight) + { + return; + } + + float* dst = (float*)_dst; + const uint8_t* src = (const uint8_t*)_src; + + using namespace bx; + const float4_t unpack = float4_ld(1.0f, 1.0f/256.0f, 1.0f/65536.0f, 1.0f/16777216.0f); + const float4_t umask = float4_ild(0xff, 0xff00, 0xff0000, 0xff000000); + const float4_t wflip = float4_ild(0, 0, 0, 0x80000000); + const float4_t wadd = float4_ld(0.0f, 0.0f, 0.0f, 32768.0f*65536.0f); + + for (uint32_t yy = 0, ystep = _pitch; yy < dstheight; ++yy, src += ystep) + { + const uint8_t* rgba = src; + for (uint32_t xx = 0; xx < dstwidth; ++xx, rgba += 4, dst += 4) + { + const float4_t abgr0 = float4_splat(rgba); + const float4_t abgr0m = float4_and(abgr0, umask); + const float4_t abgr0x = float4_xor(abgr0m, wflip); + const float4_t abgr0f = float4_itof(abgr0x); + const float4_t abgr0c = float4_add(abgr0f, wadd); + const float4_t abgr0n = float4_mul(abgr0c, unpack); + + float4_st(dst, abgr0n); + } + } + } + + void imageDecodeToRgba32f(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format) + { + const uint8_t* src = (const uint8_t*)_src; + uint8_t* dst = (uint8_t*)_dst; + + switch (_format) + { + case TextureFormat::BC5: + { + uint32_t width = _width/4; + uint32_t height = _height/4; + + for (uint32_t yy = 0; yy < height; ++yy) + { + for (uint32_t xx = 0; xx < width; ++xx) + { + uint8_t temp[16*4]; + + decodeBlockDxt45A(temp+2, src); + src += 8; + decodeBlockDxt45A(temp+1, src); + src += 8; + + for (uint32_t ii = 0; ii < 16; ++ii) + { + float nx = temp[ii*4+2]*2.0f/255.0f - 1.0f; + float ny = temp[ii*4+1]*2.0f/255.0f - 1.0f; + float nz = sqrtf(1.0f - nx*nx - ny*ny); + + const uint32_t offset = (yy*4 + ii/4)*_width*16 + (xx*4 + ii%4)*16; + float* block = (float*)&dst[offset]; + block[0] = nx; + block[1] = ny; + block[2] = nz; + block[3] = 0.0f; + } + } + } + } + break; + + case TextureFormat::RGBA32F: + memcpy(_dst, _src, _pitch*_height); + break; + + case TextureFormat::RGBA8: + imageRgba8ToRgba32f(_dst, _width, _height, _pitch, _src); + break; + + default: + { + void* temp = BX_ALLOC(_allocator, imageGetSize(_format, uint16_t(_pitch/4), uint16_t(_height) ) ); + imageDecodeToRgba8(temp, _src, _width, _height, _pitch, _format); + imageRgba8ToRgba32f(_dst, _width, _height, _pitch, temp); + BX_FREE(_allocator, temp); + } + break; + } + } + bool imageGetRawData(const ImageContainer& _imageContainer, uint8_t _side, uint8_t _lod, const void* _data, uint32_t _size, ImageMip& _mip) { uint32_t offset = _imageContainer.m_offset; @@ -2443,7 +3485,7 @@ namespace bgfx _mip.m_size = size; _mip.m_data = &data[offset]; _mip.m_bpp = bpp; - _mip.m_format = uint8_t(format); + _mip.m_format = format; _mip.m_hasAlpha = hasAlpha; return true; } @@ -2484,7 +3526,7 @@ namespace bgfx _mip.m_size = size; _mip.m_data = &data[offset]; _mip.m_bpp = bpp; - _mip.m_format = uint8_t(format); + _mip.m_format = format; _mip.m_hasAlpha = hasAlpha; return true; } @@ -2504,7 +3546,7 @@ namespace bgfx return false; } - void imageWriteTga(bx::WriterI* _writer, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src, bool _grayscale, bool _yflip) + void imageWriteTga(bx::WriterI* _writer, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, bool _grayscale, bool _yflip) { uint8_t type = _grayscale ? 3 : 2; uint8_t bpp = _grayscale ? 8 : 32; @@ -2523,16 +3565,16 @@ namespace bgfx uint32_t dstPitch = _width*bpp/8; if (_yflip) { - uint8_t* data = (uint8_t*)_src + _srcPitch*_height - _srcPitch; + uint8_t* data = (uint8_t*)_src + _pitch*_height - _pitch; for (uint32_t yy = 0; yy < _height; ++yy) { bx::write(_writer, data, dstPitch); - data -= _srcPitch; + data -= _pitch; } } - else if (_srcPitch == dstPitch) + else if (_pitch == dstPitch) { - bx::write(_writer, _src, _height*_srcPitch); + bx::write(_writer, _src, _height*_pitch); } else { @@ -2540,7 +3582,7 @@ namespace bgfx for (uint32_t yy = 0; yy < _height; ++yy) { bx::write(_writer, data, dstPitch); - data += _srcPitch; + data += _pitch; } } } diff --git a/3rdparty/bgfx/src/image.h b/3rdparty/bgfx/src/image.h index 50824e5fd9e..458d7e51c46 100644 --- a/3rdparty/bgfx/src/image.h +++ b/3rdparty/bgfx/src/image.h @@ -13,12 +13,12 @@ namespace bgfx struct ImageContainer { void* m_data; + TextureFormat::Enum m_format; uint32_t m_size; uint32_t m_offset; uint32_t m_width; uint32_t m_height; uint32_t m_depth; - uint8_t m_format; uint8_t m_numMips; bool m_hasAlpha; bool m_cubeMap; @@ -29,12 +29,12 @@ namespace bgfx struct ImageMip { + TextureFormat::Enum m_format; uint32_t m_width; uint32_t m_height; uint32_t m_blockSize; uint32_t m_size; uint8_t m_bpp; - uint8_t m_format; bool m_hasAlpha; const uint8_t* m_data; }; @@ -103,19 +103,31 @@ namespace bgfx void imageCheckerboard(uint32_t _width, uint32_t _height, uint32_t _step, uint32_t _0, uint32_t _1, void* _dst); /// - void imageRgba8Downsample2x2(uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src, void* _dst); + void imageRgba8Downsample2x2(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst); /// - void imageSwizzleBgra8(uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src, void* _dst); + void imageRgba32fDownsample2x2NormalMap(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst); + + /// + void imageSwizzleBgra8(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst); /// void imageCopy(uint32_t _height, uint32_t _srcPitch, const void* _src, uint32_t _dstPitch, void* _dst); /// - void imageCopy(uint32_t _width, uint32_t _height, uint32_t _bpp, uint32_t _srcPitch, const void* _src, void* _dst); + void imageCopy(uint32_t _width, uint32_t _height, uint32_t _bpp, uint32_t _pitch, const void* _src, void* _dst); /// - void imageWriteTga(bx::WriterI* _writer, uint32_t _width, uint32_t _height, uint32_t _srcPitch, const void* _src, bool _grayscale, bool _yflip); + bool imageConvert(void* _dst, TextureFormat::Enum _dstFormat, const void* _src, TextureFormat::Enum _srcFormat, uint32_t _width, uint32_t _height); + + /// + const Memory* imageAlloc(ImageContainer& _imageContainer, TextureFormat::Enum _format, uint16_t _width, uint16_t _height, uint16_t _depth = 0, bool _cubeMap = false, bool _mips = false); + + /// + void imageFree(const Memory* _memory); + + /// + void imageWriteTga(bx::WriterI* _writer, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, bool _grayscale, bool _yflip); /// void imageWriteKtx(bx::WriterI* _writer, TextureFormat::Enum _format, bool _cubeMap, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips, const void* _src); @@ -130,10 +142,13 @@ namespace bgfx bool imageParse(ImageContainer& _imageContainer, const void* _data, uint32_t _size); /// - void imageDecodeToBgra8(uint8_t* _dst, const uint8_t* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, uint8_t _type); + void imageDecodeToBgra8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format); /// - void imageDecodeToRgba8(uint8_t* _dst, const uint8_t* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, uint8_t _type); + void imageDecodeToRgba8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format); + + /// + void imageDecodeToRgba32f(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format); /// bool imageGetRawData(const ImageContainer& _imageContainer, uint8_t _side, uint8_t _index, const void* _data, uint32_t _size, ImageMip& _mip); diff --git a/3rdparty/bgfx/src/renderer_d3d11.cpp b/3rdparty/bgfx/src/renderer_d3d11.cpp index 9fc75a8c452..1e36af03985 100644 --- a/3rdparty/bgfx/src/renderer_d3d11.cpp +++ b/3rdparty/bgfx/src/renderer_d3d11.cpp @@ -487,6 +487,8 @@ namespace bgfx { namespace d3d11 return false; }; + // Reference: + // https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK enum AGS_RETURN_CODE { AGS_SUCCESS, @@ -1465,6 +1467,8 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } BGFX_GPU_PROFILER_BIND(m_device, m_deviceCtx); + + g_internalData.context = m_device; return true; error: @@ -1742,7 +1746,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); tc.m_sides = 0; tc.m_depth = 0; tc.m_numMips = 1; - tc.m_format = texture.m_requestedFormat; + tc.m_format = TextureFormat::Enum(texture.m_requestedFormat); tc.m_cubeMap = false; tc.m_mem = NULL; bx::write(&writer, tc); @@ -1753,6 +1757,22 @@ BX_PRAGMA_DIAGNOSTIC_POP(); release(mem); } + void overrideInternal(TextureHandle _handle, uintptr_t _ptr) BX_OVERRIDE + { + // Resource ref. counts might be messed up outside of bgfx. + // Disabling ref. count check once texture is overridden. + setGraphicsDebuggerPresent(true); + m_textures[_handle.idx].overrideInternal(_ptr); + } + + uintptr_t getInternal(TextureHandle _handle) BX_OVERRIDE + { + // Resource ref. counts might be messed up outside of bgfx. + // Disabling ref. count check once texture is overridden. + setGraphicsDebuggerPresent(true); + return uintptr_t(m_textures[_handle.idx].m_ptr); + } + void destroyTexture(TextureHandle _handle) BX_OVERRIDE { m_textures[_handle.idx].destroy(); @@ -2224,6 +2244,9 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } else { + m_deviceCtx->ClearState(); + m_deviceCtx->Flush(); + if (resize) { m_deviceCtx->OMSetRenderTargets(1, s_zero.m_rtv, NULL); @@ -3078,6 +3101,13 @@ BX_PRAGMA_DIAGNOSTIC_POP(); D3D11_MAPPED_SUBRESOURCE mapped; DX_CHECK(m_deviceCtx->Map(m_captureTexture, 0, D3D11_MAP_READ, 0, &mapped) ); + imageSwizzleBgra8(getBufferWidth() + , getBufferHeight() + , mapped.RowPitch + , mapped.pData + , mapped.pData + ); + g_callback->captureFrame(mapped.pData, getBufferHeight()*mapped.RowPitch); m_deviceCtx->Unmap(m_captureTexture, 0); @@ -3999,7 +4029,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } } - const bool bufferOnly = 0 != (m_flags&(BGFX_TEXTURE_RT_BUFFER_ONLY|BGFX_TEXTURE_READ_BACK) ); + const bool writeOnly = 0 != (m_flags&(BGFX_TEXTURE_RT_WRITE_ONLY|BGFX_TEXTURE_READ_BACK) ); const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE); const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK); const bool srgb = 0 != (m_flags&BGFX_TEXTURE_SRGB) || imageContainer.m_srgb; @@ -4043,7 +4073,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); desc.Format = format; desc.SampleDesc = msaa; desc.Usage = kk == 0 || blit ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE; - desc.BindFlags = bufferOnly ? 0 : D3D11_BIND_SHADER_RESOURCE; + desc.BindFlags = writeOnly ? 0 : D3D11_BIND_SHADER_RESOURCE; desc.CPUAccessFlags = 0; if (isDepth( (TextureFormat::Enum)m_textureFormat) ) @@ -4116,7 +4146,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); break; } - if (!bufferOnly) + if (!writeOnly) { DX_CHECK(s_renderD3D11->m_device->CreateShaderResourceView(m_ptr, &srvd, &m_srv) ); } @@ -4147,7 +4177,19 @@ BX_PRAGMA_DIAGNOSTIC_POP(); s_renderD3D11->m_srvUavLru.invalidateWithParent(getHandle().idx); DX_RELEASE(m_srv, 0); DX_RELEASE(m_uav, 0); - DX_RELEASE(m_ptr, 0); + if (0 == (m_flags & BGFX_TEXTURE_INTERNAL_SHARED) ) + { + DX_RELEASE(m_ptr, 0); + } + } + + void TextureD3D11::overrideInternal(uintptr_t _ptr) + { + destroy(); + m_flags |= BGFX_TEXTURE_INTERNAL_SHARED; + m_ptr = (ID3D11Resource*)_ptr; + + s_renderD3D11->m_device->CreateShaderResourceView(m_ptr, NULL, &m_srv); } void TextureD3D11::update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) @@ -4175,7 +4217,7 @@ BX_PRAGMA_DIAGNOSTIC_POP(); if (convert) { temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch*_rect.m_height); - imageDecodeToBgra8(temp, data, _rect.m_width, _rect.m_height, srcpitch, m_requestedFormat); + imageDecodeToBgra8(temp, data, _rect.m_width, _rect.m_height, srcpitch, TextureFormat::Enum(m_requestedFormat) ); data = temp; } @@ -4727,7 +4769,8 @@ BX_PRAGMA_DIAGNOSTIC_POP(); { // reset the framebuffer to be the backbuffer; depending on the swap effect, // if we don't do this we'll only see one frame of output and then nothing - setFrameBuffer(fbh); + FrameBufferHandle invalid = BGFX_INVALID_HANDLE; + setFrameBuffer(invalid); bool viewRestart = false; uint8_t eye = 0; @@ -4887,12 +4930,18 @@ BX_PRAGMA_DIAGNOSTIC_POP(); } else { + bool depthStencil = isDepth(TextureFormat::Enum(src.m_textureFormat) ); + BX_CHECK(!depthStencil + || (width == src.m_width && height == src.m_height) + , "When blitting depthstencil surface, source resolution must match destination." + ); + D3D11_BOX box; box.left = blit.m_srcX; box.top = blit.m_srcY; box.front = 0; box.right = blit.m_srcX + width; - box.bottom = blit.m_srcY + height;; + box.bottom = blit.m_srcY + height; box.back = 1; const uint32_t srcZ = TextureD3D11::TextureCube == src.m_type @@ -4904,7 +4953,6 @@ BX_PRAGMA_DIAGNOSTIC_POP(); : 0 ; - bool depthStencil = isDepth(TextureFormat::Enum(src.m_textureFormat) ); deviceCtx->CopySubresourceRegion(dst.m_ptr , dstZ*dst.m_numMips+blit.m_dstMip , blit.m_dstX diff --git a/3rdparty/bgfx/src/renderer_d3d11.h b/3rdparty/bgfx/src/renderer_d3d11.h index 67c05eb8161..151d3ce5cc7 100644 --- a/3rdparty/bgfx/src/renderer_d3d11.h +++ b/3rdparty/bgfx/src/renderer_d3d11.h @@ -223,6 +223,7 @@ namespace bgfx { namespace d3d11 void create(const Memory* _mem, uint32_t _flags, uint8_t _skip); void destroy(); + void overrideInternal(uintptr_t _ptr); void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem); void commit(uint8_t _stage, uint32_t _flags, const float _palette[][4]); void resolve(); diff --git a/3rdparty/bgfx/src/renderer_d3d12.cpp b/3rdparty/bgfx/src/renderer_d3d12.cpp index 22251bebf9d..76eb52e0e21 100644 --- a/3rdparty/bgfx/src/renderer_d3d12.cpp +++ b/3rdparty/bgfx/src/renderer_d3d12.cpp @@ -1042,6 +1042,8 @@ namespace bgfx { namespace d3d12 m_gpuTimer.init(); m_occlusionQuery.init(); } + + g_internalData.context = m_device; return true; error: @@ -1359,7 +1361,7 @@ namespace bgfx { namespace d3d12 tc.m_sides = 0; tc.m_depth = 0; tc.m_numMips = 1; - tc.m_format = texture.m_requestedFormat; + tc.m_format = TextureFormat::Enum(texture.m_requestedFormat); tc.m_cubeMap = false; tc.m_mem = NULL; bx::write(&writer, tc); @@ -1370,6 +1372,17 @@ namespace bgfx { namespace d3d12 release(mem); } + void overrideInternal(TextureHandle _handle, uintptr_t _ptr) BX_OVERRIDE + { + BX_UNUSED(_handle, _ptr); + } + + uintptr_t getInternal(TextureHandle _handle) BX_OVERRIDE + { + BX_UNUSED(_handle); + return 0; + } + void destroyTexture(TextureHandle _handle) BX_OVERRIDE { m_textures[_handle.idx].destroy(); @@ -1860,8 +1873,8 @@ data.NumQualityLevels = 0; if (isValid(frameBuffer.m_depth) ) { TextureD3D12& texture = m_textures[frameBuffer.m_depth.idx]; - const bool bufferOnly = 0 != (texture.m_flags&BGFX_TEXTURE_RT_BUFFER_ONLY); - if (!bufferOnly) + const bool writeOnly = 0 != (texture.m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); + if (!writeOnly) { texture.setState(m_commandList, D3D12_RESOURCE_STATE_DEPTH_READ); } @@ -3801,7 +3814,7 @@ data.NumQualityLevels = 0; blockHeight = blockInfo.blockHeight; } - const bool bufferOnly = 0 != (m_flags&BGFX_TEXTURE_RT_BUFFER_ONLY); + const bool writeOnly = 0 != (m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE); const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK); @@ -3813,7 +3826,7 @@ data.NumQualityLevels = 0; , textureHeight , imageContainer.m_cubeMap ? "x6" : "" , renderTarget ? 'x' : ' ' - , bufferOnly ? 'x' : ' ' + , writeOnly ? 'x' : ' ' , computeWrite ? 'x' : ' ' , swizzle ? " (swizzle BGRA8 -> RGBA8)" : "" ); @@ -3969,7 +3982,7 @@ data.NumQualityLevels = 0; resourceDesc.Flags |= D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET; } - if (bufferOnly) + if (writeOnly) { resourceDesc.Flags |= D3D12_RESOURCE_FLAG_DENY_SHADER_RESOURCE; state &= ~D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE; diff --git a/3rdparty/bgfx/src/renderer_d3d9.cpp b/3rdparty/bgfx/src/renderer_d3d9.cpp index dc51a9eef3f..4fb4d435b4a 100644 --- a/3rdparty/bgfx/src/renderer_d3d9.cpp +++ b/3rdparty/bgfx/src/renderer_d3d9.cpp @@ -603,85 +603,85 @@ namespace bgfx { namespace d3d9 s_textureFormat[TextureFormat::BC5].m_fmt = s_extendedFormats[ExtendedFormat::Ati2].m_supported ? D3DFMT_ATI2 : D3DFMT_UNKNOWN; g_caps.supported |= m_instancingSupport ? BGFX_CAPS_INSTANCING : 0; + } - for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) - { - uint8_t support = 0; + for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) + { + uint8_t support = 0; - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , 0 - , D3DRTYPE_TEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_2D : BGFX_CAPS_FORMAT_TEXTURE_NONE; + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , 0 + , D3DRTYPE_TEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_2D : BGFX_CAPS_FORMAT_TEXTURE_NONE; - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , D3DUSAGE_QUERY_SRGBREAD - , D3DRTYPE_TEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , D3DUSAGE_QUERY_SRGBREAD + , D3DRTYPE_TEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , 0 - , D3DRTYPE_VOLUMETEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_3D : BGFX_CAPS_FORMAT_TEXTURE_NONE; + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , 0 + , D3DRTYPE_VOLUMETEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_3D : BGFX_CAPS_FORMAT_TEXTURE_NONE; - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , D3DUSAGE_QUERY_SRGBREAD - , D3DRTYPE_VOLUMETEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , D3DUSAGE_QUERY_SRGBREAD + , D3DRTYPE_VOLUMETEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , 0 - , D3DRTYPE_CUBETEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_CUBE : BGFX_CAPS_FORMAT_TEXTURE_NONE; + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , 0 + , D3DRTYPE_CUBETEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_CUBE : BGFX_CAPS_FORMAT_TEXTURE_NONE; - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , D3DUSAGE_QUERY_SRGBREAD - , D3DRTYPE_CUBETEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , D3DUSAGE_QUERY_SRGBREAD + , D3DRTYPE_CUBETEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , D3DUSAGE_QUERY_VERTEXTEXTURE - , D3DRTYPE_TEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_VERTEX : BGFX_CAPS_FORMAT_TEXTURE_NONE; + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , D3DUSAGE_QUERY_VERTEXTEXTURE + , D3DRTYPE_TEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_VERTEX : BGFX_CAPS_FORMAT_TEXTURE_NONE; - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , isDepth(TextureFormat::Enum(ii) ) ? D3DUSAGE_DEPTHSTENCIL : D3DUSAGE_RENDERTARGET - , D3DRTYPE_TEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER : BGFX_CAPS_FORMAT_TEXTURE_NONE; + support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter + , m_deviceType + , adapterFormat + , isDepth(TextureFormat::Enum(ii) ) ? D3DUSAGE_DEPTHSTENCIL : D3DUSAGE_RENDERTARGET + , D3DRTYPE_TEXTURE + , s_textureFormat[ii].m_fmt + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER : BGFX_CAPS_FORMAT_TEXTURE_NONE; - support |= SUCCEEDED(m_d3d9->CheckDeviceMultiSampleType(m_adapter - , m_deviceType - , s_textureFormat[ii].m_fmt - , true - , D3DMULTISAMPLE_2_SAMPLES - , NULL - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA : BGFX_CAPS_FORMAT_TEXTURE_NONE; + support |= SUCCEEDED(m_d3d9->CheckDeviceMultiSampleType(m_adapter + , m_deviceType + , s_textureFormat[ii].m_fmt + , true + , D3DMULTISAMPLE_2_SAMPLES + , NULL + ) ) ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA : BGFX_CAPS_FORMAT_TEXTURE_NONE; - g_caps.formats[ii] = support; - } + g_caps.formats[ii] = support; } m_fmtDepth = D3DFMT_D24S8; @@ -752,6 +752,7 @@ namespace bgfx { namespace d3d9 m_initialized = true; + g_internalData.context = m_device; return true; error: @@ -996,6 +997,22 @@ namespace bgfx { namespace d3d9 texture.m_height = _height; } + void overrideInternal(TextureHandle _handle, uintptr_t _ptr) BX_OVERRIDE + { + // Resource ref. counts might be messed up outside of bgfx. + // Disabling ref. count check once texture is overridden. + setGraphicsDebuggerPresent(true); + m_textures[_handle.idx].overrideInternal(_ptr); + } + + uintptr_t getInternal(TextureHandle _handle) BX_OVERRIDE + { + // Resource ref. counts might be messed up outside of bgfx. + // Disabling ref. count check once texture is overridden. + setGraphicsDebuggerPresent(true); + return uintptr_t(m_textures[_handle.idx].m_ptr); + } + void destroyTexture(TextureHandle _handle) BX_OVERRIDE { m_textures[_handle.idx].destroy(); @@ -1925,30 +1942,34 @@ namespace bgfx { namespace d3d9 device->SetVertexShader(program.m_vsh->m_vertexShader); device->SetPixelShader(program.m_fsh->m_pixelShader); + float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4]; + if (BGFX_CLEAR_COLOR_USE_PALETTE & _clear.m_flags) { - float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4]; for (uint32_t ii = 0; ii < numMrt; ++ii) { - uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE-1, _clear.m_index[ii]); + uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE - 1, _clear.m_index[ii]); memcpy(mrtClear[ii], _palette[index], 16); } - - DX_CHECK(m_device->SetPixelShaderConstantF(0, mrtClear[0], numMrt) ); } else { float rgba[4] = { - _clear.m_index[0]*1.0f/255.0f, - _clear.m_index[1]*1.0f/255.0f, - _clear.m_index[2]*1.0f/255.0f, - _clear.m_index[3]*1.0f/255.0f, + _clear.m_index[0] * 1.0f / 255.0f, + _clear.m_index[1] * 1.0f / 255.0f, + _clear.m_index[2] * 1.0f / 255.0f, + _clear.m_index[3] * 1.0f / 255.0f, }; - DX_CHECK(m_device->SetPixelShaderConstantF(0, rgba, 1) ); + for (uint32_t ii = 0; ii < numMrt; ++ii) + { + memcpy(mrtClear[ii], rgba, 16); + } } + DX_CHECK(device->SetPixelShaderConstantF(0, mrtClear[0], numMrt)); + DX_CHECK(device->SetStreamSource(0, vb.m_ptr, 0, stride) ); DX_CHECK(device->SetStreamSourceFreq(0, 1) ); DX_CHECK(device->SetStreamSource(1, NULL, 0, 0) ); @@ -2427,10 +2448,10 @@ namespace bgfx { namespace d3d9 uint32_t msaaQuality = ( (m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT); msaaQuality = bx::uint32_satsub(msaaQuality, 1); - bool bufferOnly = 0 != (m_flags&BGFX_TEXTURE_RT_BUFFER_ONLY); + bool writeOnly = 0 != (m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); if (0 != msaaQuality - || bufferOnly) + || writeOnly) { const Msaa& msaa = s_msaa[msaaQuality]; @@ -2461,7 +2482,7 @@ namespace bgfx { namespace d3d9 ) ); } - if (bufferOnly) + if (writeOnly) { // This is render buffer, there is no sampling, no need // to create texture. @@ -2798,8 +2819,8 @@ namespace bgfx { namespace d3d9 m_height = textureHeight; m_depth = imageContainer.m_depth; m_numMips = numMips; - m_requestedFormat = imageContainer.m_format; - m_textureFormat = imageContainer.m_format; + m_requestedFormat = + m_textureFormat = uint8_t(imageContainer.m_format); const TextureFormatInfo& tfi = s_textureFormat[m_requestedFormat]; uint8_t bpp = getBitsPerPixel(TextureFormat::Enum(m_textureFormat) ); @@ -2837,7 +2858,7 @@ namespace bgfx { namespace d3d9 , 0 != (m_flags&BGFX_TEXTURE_RT_MASK) ? " (render target)" : "" ); - if (0 != (_flags&BGFX_TEXTURE_RT_BUFFER_ONLY) ) + if (0 != (_flags&BGFX_TEXTURE_RT_WRITE_ONLY) ) { return; } @@ -2892,13 +2913,7 @@ namespace bgfx { namespace d3d9 , mip.m_format ); - uint32_t dstpitch = pitch; - for (uint32_t yy = 0; yy < height; ++yy) - { - uint8_t* src = &temp[yy*srcpitch]; - uint8_t* dst = &bits[yy*dstpitch]; - memcpy(dst, src, dstpitch); - } + bx::memCopy(bits, temp, pitch, height, srcpitch, pitch); BX_FREE(g_allocator, temp); } @@ -2950,7 +2965,7 @@ namespace bgfx { namespace d3d9 if (convert) { temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch*_rect.m_height); - imageDecodeToBgra8(temp, data, _rect.m_width, _rect.m_height, srcpitch, m_requestedFormat); + imageDecodeToBgra8(temp, data, _rect.m_width, _rect.m_height, srcpitch, TextureFormat::Enum(m_requestedFormat) ); data = temp; } diff --git a/3rdparty/bgfx/src/renderer_d3d9.h b/3rdparty/bgfx/src/renderer_d3d9.h index 0bef1737058..aecfba57322 100644 --- a/3rdparty/bgfx/src/renderer_d3d9.h +++ b/3rdparty/bgfx/src/renderer_d3d9.h @@ -325,12 +325,22 @@ namespace bgfx { namespace d3d9 void destroy() { - DX_RELEASE(m_ptr, 0); + if (0 == (m_flags & BGFX_TEXTURE_INTERNAL_SHARED) ) + { + DX_RELEASE(m_ptr, 0); + } DX_RELEASE(m_surface, 0); DX_RELEASE(m_staging, 0); m_textureFormat = TextureFormat::Unknown; } + void overrideInternal(uintptr_t _ptr) + { + destroy(); + m_flags |= BGFX_TEXTURE_INTERNAL_SHARED; + m_ptr = (IDirect3DBaseTexture9*)_ptr; + } + void updateBegin(uint8_t _side, uint8_t _mip); void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem); void updateEnd(); diff --git a/3rdparty/bgfx/src/renderer_gl.cpp b/3rdparty/bgfx/src/renderer_gl.cpp index 35fbdc427cf..be4ab0a09d7 100644 --- a/3rdparty/bgfx/src/renderer_gl.cpp +++ b/3rdparty/bgfx/src/renderer_gl.cpp @@ -260,9 +260,9 @@ namespace bgfx { namespace gl { GL_RGBA32I, GL_ZERO, GL_RGBA, GL_INT, false }, // RGBA32I { GL_RGBA32UI, GL_ZERO, GL_RGBA, GL_UNSIGNED_INT, false }, // RGBA32U { GL_RGBA32F, GL_ZERO, GL_RGBA, GL_FLOAT, false }, // RGBA32F - { GL_RGB565, GL_ZERO, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, false }, // R5G6B5 - { GL_RGBA4, GL_ZERO, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4, false }, // RGBA4 - { GL_RGB5_A1, GL_ZERO, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, false }, // RGB5A1 + { GL_RGB565, GL_ZERO, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV, false }, // R5G6B5 + { GL_RGBA4, GL_ZERO, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4_REV, false }, // RGBA4 + { GL_RGB5_A1, GL_ZERO, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, false }, // RGB5A1 { GL_RGB10_A2, GL_ZERO, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, false }, // RGB10A2 { GL_R11F_G11F_B10F, GL_ZERO, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, false }, // R11G11B10F { GL_ZERO, GL_ZERO, GL_ZERO, GL_ZERO, false }, // UnknownDepth @@ -1209,6 +1209,34 @@ namespace bgfx { namespace gl _minFilter = s_textureFilterMin[min][_hasMips ? mip+1 : 0]; } + void updateExtension(const char* _name) + { + bool supported = false; + for (uint32_t ii = 0; ii < Extension::Count; ++ii) + { + Extension& extension = s_extension[ii]; + if (!extension.m_supported + && extension.m_initialize) + { + const char* ext = _name; + if (0 == strncmp(ext, "GL_", 3) ) // skip GL_ + { + ext += 3; + } + + if (0 == strcmp(ext, extension.m_name) ) + { + extension.m_supported = true; + supported = true; + break; + } + } + } + + BX_TRACE("GL_EXTENSION %s: %s", supported ? " (supported)" : "", _name); + BX_UNUSED(supported); + } + struct RendererContextGL : public RendererContextI { RendererContextGL() @@ -1365,42 +1393,31 @@ namespace bgfx { namespace gl strncpy(name, pos, len); name[len] = '\0'; - bool supported = false; - for (uint32_t ii = 0; ii < Extension::Count; ++ii) - { - Extension& extension = s_extension[ii]; - if (!extension.m_supported - && extension.m_initialize) - { - const char* ext = name; - if (0 == strncmp(ext, "GL_", 3) ) // skip GL_ - { - ext += 3; - } - - if (0 == strcmp(ext, extension.m_name) ) - { - extension.m_supported = true; - supported = true; - break; - } - } - } - - BX_TRACE("GL_EXTENSION %3d%s: %s", index, supported ? " (supported)" : "", name); - BX_UNUSED(supported); + updateExtension(name); pos += len+1; ++index; } + } + else if (NULL != glGetStringi) + { + GLint numExtensions = 0; + glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions); + glGetError(); // ignore error if glGetIntegerv returns NULL. - BX_TRACE("Supported extensions:"); - for (uint32_t ii = 0; ii < Extension::Count; ++ii) + for (GLint index = 0; index < numExtensions; ++index) { - if (s_extension[ii].m_supported) - { - BX_TRACE("\t%2d: %s", ii, s_extension[ii].m_name); - } + const char* name = (const char*)glGetStringi(GL_EXTENSIONS, index); + updateExtension(name); + } + } + + BX_TRACE("Supported extensions:"); + for (uint32_t ii = 0; ii < Extension::Count; ++ii) + { + if (s_extension[ii].m_supported) + { + BX_TRACE("\t%2d: %s", ii, s_extension[ii].m_name); } } } @@ -1502,9 +1519,9 @@ namespace bgfx { namespace gl // internalFormat and format must match: // https://www.khronos.org/opengles/sdk/docs/man/xhtml/glTexImage2D.xml setTextureFormat(TextureFormat::RGBA8, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE); - setTextureFormat(TextureFormat::R5G6B5, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5); - setTextureFormat(TextureFormat::RGBA4, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4); - setTextureFormat(TextureFormat::RGB5A1, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1); + setTextureFormat(TextureFormat::R5G6B5, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV); + setTextureFormat(TextureFormat::RGBA4, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4_REV); + setTextureFormat(TextureFormat::RGB5A1, GL_RGBA, GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV); if (s_extension[Extension::OES_texture_half_float].m_supported || s_extension[Extension::OES_texture_float ].m_supported) @@ -2200,7 +2217,7 @@ namespace bgfx { namespace gl tc.m_sides = 0; tc.m_depth = 0; tc.m_numMips = 1; - tc.m_format = texture.m_requestedFormat; + tc.m_format = TextureFormat::Enum(texture.m_requestedFormat); tc.m_cubeMap = false; tc.m_mem = NULL; bx::write(&writer, tc); @@ -2211,6 +2228,16 @@ namespace bgfx { namespace gl release(mem); } + void overrideInternal(TextureHandle _handle, uintptr_t _ptr) BX_OVERRIDE + { + m_textures[_handle.idx].overrideInternal(_ptr); + } + + uintptr_t getInternal(TextureHandle _handle) BX_OVERRIDE + { + return uintptr_t(m_textures[_handle.idx].m_id); + } + void destroyTexture(TextureHandle _handle) BX_OVERRIDE { m_textures[_handle.idx].destroy(); @@ -2882,6 +2909,11 @@ namespace bgfx { namespace gl , m_capture ) ); + if (GL_RGBA == m_readPixelsFmt) + { + imageSwizzleBgra8(m_resolution.m_width, m_resolution.m_height, m_resolution.m_width*4, m_capture, m_capture); + } + g_callback->captureFrame(m_capture, m_captureSize); } } @@ -3171,29 +3203,34 @@ namespace bgfx { namespace gl GL_CHECK(glUseProgram(program.m_id) ); program.bindAttributes(vertexDecl, 0); + float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4]; + if (BGFX_CLEAR_COLOR_USE_PALETTE & _clear.m_flags) { - float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4]; for (uint32_t ii = 0; ii < numMrt; ++ii) { uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE-1, _clear.m_index[ii]); memcpy(mrtClear[ii], _palette[index], 16); } - - GL_CHECK(glUniform4fv(0, numMrt, mrtClear[0]) ); } else { float rgba[4] = { - _clear.m_index[0]*1.0f/255.0f, - _clear.m_index[1]*1.0f/255.0f, - _clear.m_index[2]*1.0f/255.0f, - _clear.m_index[3]*1.0f/255.0f, + _clear.m_index[0] * 1.0f / 255.0f, + _clear.m_index[1] * 1.0f / 255.0f, + _clear.m_index[2] * 1.0f / 255.0f, + _clear.m_index[3] * 1.0f / 255.0f, }; - GL_CHECK(glUniform4fv(0, 1, rgba) ); + + for (uint32_t ii = 0; ii < numMrt; ++ii) + { + memcpy(mrtClear[ii], rgba, 16); + } } + GL_CHECK(glUniform4fv(0, numMrt, mrtClear[0]) ); + GL_CHECK(glDrawArrays(GL_TRIANGLE_STRIP , 0 , 4 @@ -3909,7 +3946,7 @@ namespace bgfx { namespace gl } } - bool TextureGL::init(GLenum _target, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _format, uint8_t _numMips, uint32_t _flags) + bool TextureGL::init(GLenum _target, uint32_t _width, uint32_t _height, uint32_t _depth, TextureFormat::Enum _format, uint8_t _numMips, uint32_t _flags) { m_target = _target; m_numMips = _numMips; @@ -3918,13 +3955,13 @@ namespace bgfx { namespace gl m_height = _height; m_depth = _depth; m_currentSamplerHash = UINT32_MAX; - m_requestedFormat = _format; - m_textureFormat = _format; + m_requestedFormat = + m_textureFormat = uint8_t(_format); - const bool bufferOnly = 0 != (m_flags&BGFX_TEXTURE_RT_BUFFER_ONLY); + const bool writeOnly = 0 != (m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE ); - if (!bufferOnly) + if (!writeOnly) { GL_CHECK(glGenTextures(1, &m_id) ); BX_CHECK(0 != m_id, "Failed to generate texture id."); @@ -3998,7 +4035,7 @@ namespace bgfx { namespace gl msaaQuality = bx::uint32_min(s_renderGL->m_maxMsaa, msaaQuality == 0 ? 0 : 1<m_num) { if (0 != (m_resolution.m_flags & BGFX_RESET_FLUSH_AFTER_RENDER) ) diff --git a/3rdparty/bgfx/src/renderer_gl.h b/3rdparty/bgfx/src/renderer_gl.h index 34804d6b23c..06b1525fd64 100644 --- a/3rdparty/bgfx/src/renderer_gl.h +++ b/3rdparty/bgfx/src/renderer_gl.h @@ -321,6 +321,18 @@ typedef uint64_t GLuint64; # define GL_R11F_G11F_B10F 0x8C3A #endif // GL_R11F_G11F_B10F +#ifndef GL_UNSIGNED_SHORT_5_6_5_REV +# define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#endif // GL_UNSIGNED_SHORT_5_6_5_REV + +#ifndef GL_UNSIGNED_SHORT_1_5_5_5_REV +# define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#endif // GL_UNSIGNED_SHORT_1_5_5_5_REV + +#ifndef GL_UNSIGNED_SHORT_4_4_4_4_REV +# define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#endif // GL_UNSIGNED_SHORT_4_4_4_4_REV + #ifndef GL_UNSIGNED_INT_10F_11F_11F_REV # define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B #endif // GL_UNSIGNED_INT_10F_11F_11F_REV @@ -742,6 +754,10 @@ typedef uint64_t GLuint64; # define GL_FRAMEBUFFER_SRGB 0x8DB9 #endif // GL_FRAMEBUFFER_SRGB +#ifndef GL_NUM_EXTENSIONS +# define GL_NUM_EXTENSIONS 0x821D +#endif // GL_NUM_EXTENSIONS + // _KHR or _ARB... #define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 #define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 @@ -1103,9 +1119,10 @@ namespace bgfx { namespace gl { } - bool init(GLenum _target, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _format, uint8_t _numMips, uint32_t _flags); + bool init(GLenum _target, uint32_t _width, uint32_t _height, uint32_t _depth, TextureFormat::Enum _format, uint8_t _numMips, uint32_t _flags); void create(const Memory* _mem, uint32_t _flags, uint8_t _skip); void destroy(); + void overrideInternal(uintptr_t _ptr); void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem); void setSamplerState(uint32_t _flags, const float _rgba[4]); void commit(uint32_t _stage, uint32_t _flags, const float _palette[][4]); diff --git a/3rdparty/bgfx/src/renderer_mtl.mm b/3rdparty/bgfx/src/renderer_mtl.mm index bb52c45b855..833a53bea0d 100644 --- a/3rdparty/bgfx/src/renderer_mtl.mm +++ b/3rdparty/bgfx/src/renderer_mtl.mm @@ -495,6 +495,7 @@ namespace bgfx { namespace mtl m_occlusionQuery.preReset(); + g_internalData.context = m_device; return true; } @@ -666,7 +667,7 @@ namespace bgfx { namespace mtl tc.m_sides = 0; tc.m_depth = 0; tc.m_numMips = 1; - tc.m_format = texture.m_requestedFormat; + tc.m_format = TextureFormat::Enum(texture.m_requestedFormat); tc.m_cubeMap = false; tc.m_mem = NULL; bx::write(&writer, tc); @@ -677,6 +678,17 @@ namespace bgfx { namespace mtl release(mem); } + void overrideInternal(TextureHandle _handle, uintptr_t _ptr) BX_OVERRIDE + { + BX_UNUSED(_handle, _ptr); + } + + uintptr_t getInternal(TextureHandle _handle) BX_OVERRIDE + { + BX_UNUSED(_handle); + return 0; + } + void destroyTexture(TextureHandle _handle) BX_OVERRIDE { m_textures[_handle.idx].destroy(); @@ -1887,7 +1899,7 @@ namespace bgfx { namespace mtl , 0 != (_flags&BGFX_TEXTURE_RT_MASK) ? " (render target)" : "" ); - const bool bufferOnly = 0 != (_flags&BGFX_TEXTURE_RT_BUFFER_ONLY); + const bool writeOnly = 0 != (_flags&BGFX_TEXTURE_RT_WRITE_ONLY); // const bool computeWrite = 0 != (_flags&BGFX_TEXTURE_COMPUTE_WRITE); // const bool renderTarget = 0 != (_flags&BGFX_TEXTURE_RT_MASK); const bool srgb = 0 != (_flags&BGFX_TEXTURE_SRGB) || imageContainer.m_srgb; @@ -1919,11 +1931,11 @@ namespace bgfx { namespace mtl desc.resourceOptions = MTLResourceStorageModePrivate; desc.cpuCacheMode = MTLCPUCacheModeDefaultCache; - desc.storageMode = (MTLStorageMode)(bufferOnly + desc.storageMode = (MTLStorageMode)(writeOnly ? 2 /*MTLStorageModePrivate*/ : 1 /*MTLStorageModeManaged*/ ); - desc.usage = bufferOnly + desc.usage = writeOnly ? MTLTextureUsageShaderWrite : MTLTextureUsageShaderRead ; @@ -2040,7 +2052,13 @@ namespace bgfx { namespace mtl if (convert) { temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch*_rect.m_height); - imageDecodeToBgra8(temp, data, _rect.m_width, _rect.m_height, srcpitch, m_requestedFormat); + imageDecodeToBgra8(temp + , data + , _rect.m_width + , _rect.m_height + , srcpitch + , TextureFormat::Enum(m_requestedFormat) + ); data = temp; } diff --git a/3rdparty/bgfx/src/renderer_null.cpp b/3rdparty/bgfx/src/renderer_null.cpp index 021944e15cd..a68e66f0d68 100644 --- a/3rdparty/bgfx/src/renderer_null.cpp +++ b/3rdparty/bgfx/src/renderer_null.cpp @@ -121,6 +121,15 @@ namespace bgfx { namespace noop { } + void overrideInternal(TextureHandle /*_handle*/, uintptr_t /*_ptr*/) BX_OVERRIDE + { + } + + uintptr_t getInternal(TextureHandle /*_handle*/) BX_OVERRIDE + { + return 0; + } + void destroyTexture(TextureHandle /*_handle*/) BX_OVERRIDE { } diff --git a/3rdparty/bgfx/src/shader_dx9bc.cpp b/3rdparty/bgfx/src/shader_dx9bc.cpp index 81d3dfb606a..071a9e2705e 100644 --- a/3rdparty/bgfx/src/shader_dx9bc.cpp +++ b/3rdparty/bgfx/src/shader_dx9bc.cpp @@ -722,8 +722,7 @@ namespace bgfx { bx::MemoryReader reader(_src.byteCode.data(), uint32_t(_src.byteCode.size() ) ); - bx::CrtAllocator r; - bx::MemoryBlock mb(&r); + bx::MemoryBlock mb(g_allocator); bx::MemoryWriter writer(&mb); for (uint32_t token = 0, numTokens = uint32_t(_src.byteCode.size() / sizeof(uint32_t) ); token < numTokens;) diff --git a/3rdparty/bgfx/src/shader_dxbc.cpp b/3rdparty/bgfx/src/shader_dxbc.cpp index a1fde52f7ab..36d81842c8d 100644 --- a/3rdparty/bgfx/src/shader_dxbc.cpp +++ b/3rdparty/bgfx/src/shader_dxbc.cpp @@ -1903,8 +1903,7 @@ namespace bgfx { bx::MemoryReader reader(_src.byteCode.data(), uint32_t(_src.byteCode.size() ) ); - bx::CrtAllocator r; - bx::MemoryBlock mb(&r); + bx::MemoryBlock mb(g_allocator); bx::MemoryWriter writer(&mb); for (uint32_t token = 0, numTokens = uint32_t(_src.byteCode.size() / sizeof(uint32_t) ); token < numTokens;) diff --git a/3rdparty/bgfx/tools/geometryc/geometryc.cpp b/3rdparty/bgfx/tools/geometryc/geometryc.cpp index 4856d71ea12..b5fc62affe2 100644 --- a/3rdparty/bgfx/tools/geometryc/geometryc.cpp +++ b/3rdparty/bgfx/tools/geometryc/geometryc.cpp @@ -811,7 +811,7 @@ int main(int _argc, const char* _argv[]) PrimitiveArray primitives; bx::CrtFileWriter writer; - if (0 != writer.open(outFilePath) ) + if (bx::open(&writer, outFilePath) ) { printf("Unable to open output file '%s'.", outFilePath); exit(EXIT_FAILURE); @@ -1000,8 +1000,8 @@ int main(int _argc, const char* _argv[]) ); } - printf("size: %d\n", uint32_t(writer.seek() ) ); - writer.close(); + printf("size: %d\n", uint32_t(bx::seek(&writer) ) ); + bx::close(&writer); delete [] indexData; delete [] vertexData; diff --git a/3rdparty/bgfx/tools/makedisttex.cpp b/3rdparty/bgfx/tools/makedisttex.cpp deleted file mode 100644 index 6bc99b5289d..00000000000 --- a/3rdparty/bgfx/tools/makedisttex.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright 2011-2016 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause - */ - -#include -#include -#include -#include - -#include - -#define STB_IMAGE_IMPLEMENTATION -#include - -#define BX_NAMESPACE 1 -#include -#include -#include - -long int fsize(FILE* _file) -{ - long int pos = ftell(_file); - fseek(_file, 0L, SEEK_END); - long int size = ftell(_file); - fseek(_file, pos, SEEK_SET); - return size; -} - -void edtaa3(double* _img, uint16_t _width, uint16_t _height, double* _out) -{ - uint32_t size = _width*_height; - - short* xdist = (short*)malloc(size*sizeof(short) ); - short* ydist = (short*)malloc(size*sizeof(short) ); - double* gx = (double*)malloc(size*sizeof(double) ); - double* gy = (double*)malloc(size*sizeof(double) ); - - computegradient(_img, _width, _height, gx, gy); - edtaa3(_img, gx, gy, _width, _height, xdist, ydist, _out); - - for (uint32_t ii = 0; ii < size; ++ii) - { - if (_out[ii] < 0.0) - { - _out[ii] = 0.0; - } - } - - free(xdist); - free(ydist); - free(gx); - free(gy); -} - -void saveTga(const char* _filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, bool _grayscale, const void* _data) -{ - FILE* file = fopen(_filePath, "wb"); - if ( NULL != file ) - { - uint8_t type = _grayscale ? 3 : 2; - uint8_t bpp = _grayscale ? 8 : 32; - uint8_t xorig = 0; - uint8_t yorig = 0; - - putc(0, file); - putc(0, file); - putc(type, file); - putc(0, file); - putc(0, file); - putc(0, file); - putc(0, file); - putc(0, file); - putc(0, file); - putc(xorig, file); - putc(0, file); - putc(yorig, file); - putc(_width&0xff, file); - putc( (_width>>8)&0xff, file); - putc(_height&0xff, file); - putc( (_height>>8)&0xff, file); - putc(bpp, file); - putc(32, file); - - uint32_t width = _width * bpp / 8; - uint8_t* data = (uint8_t*)_data; - for (uint32_t yy = 0; yy < _height; ++yy) - { - fwrite(data, width, 1, file); - data += _pitch; - } - - fclose(file); - } -} - -inline double min(double _a, double _b) -{ - return _a > _b ? _b : _a; -} - -inline double max(double _a, double _b) -{ - return _a > _b ? _a : _b; -} - -inline double clamp(double _val, double _min, double _max) -{ - return max(min(_val, _max), _min); -} - -inline double saturate(double _val) -{ - return clamp(_val, 0.0, 1.0); -} - -int main(int _argc, const char* _argv[]) -{ - bx::CommandLine cmdLine(_argc, _argv); - - const char* inFilePath = cmdLine.findOption('i'); - if (NULL == inFilePath) - { - fprintf(stderr, "Input file name must be specified.\n"); - return EXIT_FAILURE; - } - - const char* outFilePath = cmdLine.findOption('o'); - if (NULL == outFilePath) - { - fprintf(stderr, "Output file name must be specified.\n"); - return EXIT_FAILURE; - } - - double edge = 16.0; - const char* edgeOpt = cmdLine.findOption('e'); - if (NULL != edgeOpt) - { - edge = atof(edgeOpt); - } - - int width; - int height; - int comp; - - stbi_uc* img = stbi_load(inFilePath, &width, &height, &comp, 1); - - if (NULL == img) - { - fprintf(stderr, "Failed to load %s.\n", inFilePath); - return EXIT_FAILURE; - } - - uint32_t size = width*height; - - double* imgIn = (double*)malloc(size*sizeof(double) ); - double* outside = (double*)malloc(size*sizeof(double) ); - double* inside = (double*)malloc(size*sizeof(double) ); - - for (uint32_t ii = 0; ii < size; ++ii) - { - imgIn[ii] = double(img[ii])/255.0; - } - - edtaa3(imgIn, width, height, outside); - - for (uint32_t ii = 0; ii < size; ++ii) - { - imgIn[ii] = 1.0 - imgIn[ii]; - } - - edtaa3(imgIn, width, height, inside); - - free(imgIn); - - uint8_t* grayscale = (uint8_t*)malloc(size); - - double edgeOffset = edge*0.5; - double invEdge = 1.0/edge; - - for (uint32_t ii = 0; ii < size; ++ii) - { - double dist = saturate( ( (outside[ii] - inside[ii])+edgeOffset) * invEdge); - grayscale[ii] = 255-uint8_t(dist * 255.0); - } - - free(inside); - free(outside); - - saveTga(outFilePath, width, height, width, true, grayscale); - - free(grayscale); - - return EXIT_SUCCESS; -} diff --git a/3rdparty/bgfx/tools/shaderc/shaderc.cpp b/3rdparty/bgfx/tools/shaderc/shaderc.cpp index 4b6c7ec0ff1..915119afc91 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc.cpp +++ b/3rdparty/bgfx/tools/shaderc/shaderc.cpp @@ -4,8 +4,7 @@ */ #include "shaderc.h" - -bool g_verbose = false; +#include #define MAX_TAGS 256 extern "C" @@ -13,215 +12,124 @@ extern "C" #include } // extern "C" -#define BGFX_CHUNK_MAGIC_CSH BX_MAKEFOURCC('C', 'S', 'H', 0x2) -#define BGFX_CHUNK_MAGIC_FSH BX_MAKEFOURCC('F', 'S', 'H', 0x4) -#define BGFX_CHUNK_MAGIC_VSH BX_MAKEFOURCC('V', 'S', 'H', 0x4) - -long int fsize(FILE* _file) +namespace bgfx { - long int pos = ftell(_file); - fseek(_file, 0L, SEEK_END); - long int size = ftell(_file); - fseek(_file, pos, SEEK_SET); - return size; -} + bool g_verbose = false; -static const char* s_ARB_shader_texture_lod[] = -{ - "texture2DLod", - "texture2DProjLod", - "texture3DLod", - "texture3DProjLod", - "textureCubeLod", - "shadow2DLod", - "shadow2DProjLod", - NULL - // "texture1DLod", - // "texture1DProjLod", - // "shadow1DLod", - // "shadow1DProjLod", -}; + #define BGFX_CHUNK_MAGIC_CSH BX_MAKEFOURCC('C', 'S', 'H', 0x2) + #define BGFX_CHUNK_MAGIC_FSH BX_MAKEFOURCC('F', 'S', 'H', 0x4) + #define BGFX_CHUNK_MAGIC_VSH BX_MAKEFOURCC('V', 'S', 'H', 0x4) -static const char* s_EXT_shadow_samplers[] = -{ - "shadow2D", - "shadow2DProj", - "sampler2DShadow", - NULL -}; - -static const char* s_OES_standard_derivatives[] = -{ - "dFdx", - "dFdy", - "fwidth", - NULL -}; - -static const char* s_OES_texture_3D[] = -{ - "texture3D", - "texture3DProj", - "texture3DLod", - "texture3DProjLod", - NULL -}; - -static const char* s_130[] = -{ - "uint", - "uint2", - "uint3", - "uint4", - "isampler3D", - "usampler3D", - NULL -}; - -const char* s_uniformTypeName[UniformType::Count] = -{ - "int", - NULL, - "vec4", - "mat3", - "mat4", -}; - -const char* interpolationDx11(const char* _glsl) -{ - if (0 == strcmp(_glsl, "smooth") ) + long int fsize(FILE* _file) { - return "linear"; - } - else if (0 == strcmp(_glsl, "flat") ) - { - return "nointerpolation"; + long int pos = ftell(_file); + fseek(_file, 0L, SEEK_END); + long int size = ftell(_file); + fseek(_file, pos, SEEK_SET); + return size; } - return _glsl; // noperspective -} - -const char* getUniformTypeName(UniformType::Enum _enum) -{ - return s_uniformTypeName[_enum]; -} - -UniformType::Enum nameToUniformTypeEnum(const char* _name) -{ - for (uint32_t ii = 0; ii < UniformType::Count; ++ii) + static const char* s_ARB_shader_texture_lod[] = { - if (NULL != s_uniformTypeName[ii] - && 0 == strcmp(_name, s_uniformTypeName[ii]) ) + "texture2DLod", + "texture2DProjLod", + "texture3DLod", + "texture3DProjLod", + "textureCubeLod", + "shadow2DLod", + "shadow2DProjLod", + NULL + // "texture1DLod", + // "texture1DProjLod", + // "shadow1DLod", + // "shadow1DProjLod", + }; + + static const char* s_EXT_shadow_samplers[] = + { + "shadow2D", + "shadow2DProj", + "sampler2DShadow", + NULL + }; + + static const char* s_OES_standard_derivatives[] = + { + "dFdx", + "dFdy", + "fwidth", + NULL + }; + + static const char* s_OES_texture_3D[] = + { + "texture3D", + "texture3DProj", + "texture3DLod", + "texture3DProjLod", + NULL + }; + + static const char* s_130[] = + { + "uint", + "uint2", + "uint3", + "uint4", + "isampler3D", + "usampler3D", + NULL + }; + + const char* s_uniformTypeName[UniformType::Count] = + { + "int", + NULL, + "vec4", + "mat3", + "mat4", + }; + + const char* interpolationDx11(const char* _glsl) + { + if (0 == strcmp(_glsl, "smooth") ) { - return UniformType::Enum(ii); + return "linear"; } - } - - return UniformType::Count; -} - -int32_t writef(bx::WriterI* _writer, const char* _format, ...) -{ - va_list argList; - va_start(argList, _format); - - char temp[2048]; - - char* out = temp; - int32_t max = sizeof(temp); - int32_t len = bx::vsnprintf(out, max, _format, argList); - if (len > max) - { - out = (char*)alloca(len); - len = bx::vsnprintf(out, len, _format, argList); - } - - len = bx::write(_writer, out, len); - - va_end(argList); - - return len; -} - -class Bin2cWriter : public bx::CrtFileWriter -{ -public: - Bin2cWriter(const char* _name) - : m_name(_name) - { - } - - virtual ~Bin2cWriter() - { - } - - virtual int32_t close() BX_OVERRIDE - { - generate(); - return bx::CrtFileWriter::close(); - } - - virtual int32_t write(const void* _data, int32_t _size) BX_OVERRIDE - { - const char* data = (const char*)_data; - m_buffer.insert(m_buffer.end(), data, data+_size); - return _size; - } - -private: - void generate() - { -#define HEX_DUMP_WIDTH 16 -#define HEX_DUMP_SPACE_WIDTH 96 -#define HEX_DUMP_FORMAT "%-" BX_STRINGIZE(HEX_DUMP_SPACE_WIDTH) "." BX_STRINGIZE(HEX_DUMP_SPACE_WIDTH) "s" - const uint8_t* data = &m_buffer[0]; - uint32_t size = (uint32_t)m_buffer.size(); - - outf("static const uint8_t %s[%d] =\n{\n", m_name.c_str(), size); - - if (NULL != data) + else if (0 == strcmp(_glsl, "flat") ) { - char hex[HEX_DUMP_SPACE_WIDTH+1]; - char ascii[HEX_DUMP_WIDTH+1]; - uint32_t hexPos = 0; - uint32_t asciiPos = 0; - for (uint32_t ii = 0; ii < size; ++ii) + return "nointerpolation"; + } + + return _glsl; // noperspective + } + + const char* getUniformTypeName(UniformType::Enum _enum) + { + return s_uniformTypeName[_enum]; + } + + UniformType::Enum nameToUniformTypeEnum(const char* _name) + { + for (uint32_t ii = 0; ii < UniformType::Count; ++ii) + { + if (NULL != s_uniformTypeName[ii] + && 0 == strcmp(_name, s_uniformTypeName[ii]) ) { - bx::snprintf(&hex[hexPos], sizeof(hex)-hexPos, "0x%02x, ", data[asciiPos]); - hexPos += 6; - - ascii[asciiPos] = isprint(data[asciiPos]) && data[asciiPos] != '\\' ? data[asciiPos] : '.'; - asciiPos++; - - if (HEX_DUMP_WIDTH == asciiPos) - { - ascii[asciiPos] = '\0'; - outf("\t" HEX_DUMP_FORMAT "// %s\n", hex, ascii); - data += asciiPos; - hexPos = 0; - asciiPos = 0; - } - } - - if (0 != asciiPos) - { - ascii[asciiPos] = '\0'; - outf("\t" HEX_DUMP_FORMAT "// %s\n", hex, ascii); + return UniformType::Enum(ii); } } - outf("};\n"); -#undef HEX_DUMP_WIDTH -#undef HEX_DUMP_SPACE_WIDTH -#undef HEX_DUMP_FORMAT + return UniformType::Count; } - int32_t outf(const char* _format, ...) + int32_t writef(bx::WriterI* _writer, const char* _format, ...) { va_list argList; va_start(argList, _format); char temp[2048]; + char* out = temp; int32_t max = sizeof(temp); int32_t len = bx::vsnprintf(out, max, _format, argList); @@ -231,1365 +139,1252 @@ private: len = bx::vsnprintf(out, len, _format, argList); } - int32_t size = bx::CrtFileWriter::write(out, len); + len = bx::write(_writer, out, len); va_end(argList); - return size; + return len; } - std::string m_filePath; - std::string m_name; - typedef std::vector Buffer; - Buffer m_buffer; -}; - -struct Varying -{ - std::string m_precision; - std::string m_interpolation; - std::string m_name; - std::string m_type; - std::string m_init; - std::string m_semantics; -}; - -typedef std::unordered_map VaryingMap; - -class File -{ -public: - File(const char* _filePath) - : m_data(NULL) + class Bin2cWriter : public bx::CrtFileWriter { - FILE* file = fopen(_filePath, "r"); - if (NULL != file) + public: + Bin2cWriter(const char* _name) + : m_name(_name) { - m_size = fsize(file); - m_data = new char[m_size+1]; - m_size = (uint32_t)fread(m_data, 1, m_size, file); - m_data[m_size] = '\0'; - fclose(file); + } + + virtual ~Bin2cWriter() + { + } + + virtual void close() BX_OVERRIDE + { + generate(); + return bx::CrtFileWriter::close(); + } + + virtual int32_t write(const void* _data, int32_t _size, bx::Error*) BX_OVERRIDE + { + const char* data = (const char*)_data; + m_buffer.insert(m_buffer.end(), data, data+_size); + return _size; + } + + private: + void generate() + { +#define HEX_DUMP_WIDTH 16 +#define HEX_DUMP_SPACE_WIDTH 96 +#define HEX_DUMP_FORMAT "%-" BX_STRINGIZE(HEX_DUMP_SPACE_WIDTH) "." BX_STRINGIZE(HEX_DUMP_SPACE_WIDTH) "s" + const uint8_t* data = &m_buffer[0]; + uint32_t size = (uint32_t)m_buffer.size(); + + outf("static const uint8_t %s[%d] =\n{\n", m_name.c_str(), size); + + if (NULL != data) + { + char hex[HEX_DUMP_SPACE_WIDTH+1]; + char ascii[HEX_DUMP_WIDTH+1]; + uint32_t hexPos = 0; + uint32_t asciiPos = 0; + for (uint32_t ii = 0; ii < size; ++ii) + { + bx::snprintf(&hex[hexPos], sizeof(hex)-hexPos, "0x%02x, ", data[asciiPos]); + hexPos += 6; + + ascii[asciiPos] = isprint(data[asciiPos]) && data[asciiPos] != '\\' ? data[asciiPos] : '.'; + asciiPos++; + + if (HEX_DUMP_WIDTH == asciiPos) + { + ascii[asciiPos] = '\0'; + outf("\t" HEX_DUMP_FORMAT "// %s\n", hex, ascii); + data += asciiPos; + hexPos = 0; + asciiPos = 0; + } + } + + if (0 != asciiPos) + { + ascii[asciiPos] = '\0'; + outf("\t" HEX_DUMP_FORMAT "// %s\n", hex, ascii); + } + } + + outf("};\n"); +#undef HEX_DUMP_WIDTH +#undef HEX_DUMP_SPACE_WIDTH +#undef HEX_DUMP_FORMAT + } + + int32_t outf(const char* _format, ...) + { + va_list argList; + va_start(argList, _format); + + char temp[2048]; + char* out = temp; + int32_t max = sizeof(temp); + int32_t len = bx::vsnprintf(out, max, _format, argList); + if (len > max) + { + out = (char*)alloca(len); + len = bx::vsnprintf(out, len, _format, argList); + } + + bx::Error err; + int32_t size = bx::CrtFileWriter::write(out, len, &err); + + va_end(argList); + + return size; + } + + std::string m_filePath; + std::string m_name; + typedef std::vector Buffer; + Buffer m_buffer; + }; + + struct Varying + { + std::string m_precision; + std::string m_interpolation; + std::string m_name; + std::string m_type; + std::string m_init; + std::string m_semantics; + }; + + typedef std::unordered_map VaryingMap; + + class File + { + public: + File(const char* _filePath) + : m_data(NULL) + { + FILE* file = fopen(_filePath, "r"); + if (NULL != file) + { + m_size = fsize(file); + m_data = new char[m_size+1]; + m_size = (uint32_t)fread(m_data, 1, m_size, file); + m_data[m_size] = '\0'; + fclose(file); + } + } + + ~File() + { + delete [] m_data; + } + + const char* getData() const + { + return m_data; + } + + uint32_t getSize() const + { + return m_size; + } + + private: + char* m_data; + uint32_t m_size; + }; + + void strInsert(char* _str, const char* _insert) + { + size_t len = strlen(_insert); + memmove(&_str[len], _str, strlen(_str) ); + memcpy(_str, _insert, len); + } + + void strReplace(char* _str, const char* _find, const char* _replace) + { + const size_t len = strlen(_find); + + char* replace = (char*)alloca(len+1); + bx::strlcpy(replace, _replace, len+1); + for (size_t ii = strlen(replace); ii < len; ++ii) + { + replace[ii] = ' '; + } + replace[len] = '\0'; + + BX_CHECK(len >= strlen(_replace), ""); + for (char* ptr = strstr(_str, _find); NULL != ptr; ptr = strstr(ptr + len, _find) ) + { + memcpy(ptr, replace, len); } } - ~File() + void strNormalizeEol(char* _str) { - delete [] m_data; + strReplace(_str, "\r\n", "\n"); + strReplace(_str, "\r", "\n"); } - const char* getData() const + void printCode(const char* _code, int32_t _line, int32_t _start, int32_t _end) { - return m_data; - } + fprintf(stderr, "Code:\n---\n"); - uint32_t getSize() const - { - return m_size; - } - -private: - char* m_data; - uint32_t m_size; -}; - -void strInsert(char* _str, const char* _insert) -{ - size_t len = strlen(_insert); - memmove(&_str[len], _str, strlen(_str) ); - memcpy(_str, _insert, len); -} - -void strReplace(char* _str, const char* _find, const char* _replace) -{ - const size_t len = strlen(_find); - - char* replace = (char*)alloca(len+1); - bx::strlcpy(replace, _replace, len+1); - for (size_t ii = strlen(replace); ii < len; ++ii) - { - replace[ii] = ' '; - } - replace[len] = '\0'; - - BX_CHECK(len >= strlen(_replace), ""); - for (char* ptr = strstr(_str, _find); NULL != ptr; ptr = strstr(ptr + len, _find) ) - { - memcpy(ptr, replace, len); - } -} - -void strNormalizeEol(char* _str) -{ - strReplace(_str, "\r\n", "\n"); - strReplace(_str, "\r", "\n"); -} - -void printCode(const char* _code, int32_t _line, int32_t _start, int32_t _end) -{ - fprintf(stderr, "Code:\n---\n"); - - LineReader lr(_code); - for (int32_t line = 1; !lr.isEof() && line < _end; ++line) - { - if (line >= _start) + LineReader lr(_code); + for (int32_t line = 1; !lr.isEof() && line < _end; ++line) { - fprintf(stderr, "%s%3d: %s", _line == line ? ">>> " : " ", line, lr.getLine().c_str() ); + if (line >= _start) + { + fprintf(stderr, "%s%3d: %s", _line == line ? ">>> " : " ", line, lr.getLine().c_str() ); + } + else + { + lr.skipLine(); + } } - else + + fprintf(stderr, "---\n"); + } + + void writeFile(const char* _filePath, const void* _data, int32_t _size) + { + bx::CrtFileWriter out; + if (bx::open(&out, _filePath) ) { - lr.skipLine(); + bx::write(&out, _data, _size); + bx::close(&out); } } - fprintf(stderr, "---\n"); -} - -void writeFile(const char* _filePath, const void* _data, int32_t _size) -{ - bx::CrtFileWriter out; - if (0 == out.open(_filePath) ) + struct Preprocessor { - out.write(_data, _size); - out.close(); - } -} - -struct Preprocessor -{ - Preprocessor(const char* _filePath, bool _gles, const char* _includeDir = NULL) - : m_tagptr(m_tags) - , m_scratchPos(0) - , m_fgetsPos(0) - { - m_tagptr->tag = FPPTAG_USERDATA; - m_tagptr->data = this; - m_tagptr++; - - m_tagptr->tag = FPPTAG_DEPENDS; - m_tagptr->data = (void*)fppDepends; - m_tagptr++; - - m_tagptr->tag = FPPTAG_INPUT; - m_tagptr->data = (void*)fppInput; - m_tagptr++; - - m_tagptr->tag = FPPTAG_OUTPUT; - m_tagptr->data = (void*)fppOutput; - m_tagptr++; - - m_tagptr->tag = FPPTAG_ERROR; - m_tagptr->data = (void*)fppError; - m_tagptr++; - - m_tagptr->tag = FPPTAG_IGNOREVERSION; - m_tagptr->data = (void*)0; - m_tagptr++; - - m_tagptr->tag = FPPTAG_LINE; - m_tagptr->data = (void*)0; - m_tagptr++; - - m_tagptr->tag = FPPTAG_INPUT_NAME; - m_tagptr->data = scratch(_filePath); - m_tagptr++; - - if (NULL != _includeDir) + Preprocessor(const char* _filePath, bool _gles, const char* _includeDir = NULL) + : m_tagptr(m_tags) + , m_scratchPos(0) + , m_fgetsPos(0) { - addInclude(_includeDir); + m_tagptr->tag = FPPTAG_USERDATA; + m_tagptr->data = this; + m_tagptr++; + + m_tagptr->tag = FPPTAG_DEPENDS; + m_tagptr->data = (void*)fppDepends; + m_tagptr++; + + m_tagptr->tag = FPPTAG_INPUT; + m_tagptr->data = (void*)fppInput; + m_tagptr++; + + m_tagptr->tag = FPPTAG_OUTPUT; + m_tagptr->data = (void*)fppOutput; + m_tagptr++; + + m_tagptr->tag = FPPTAG_ERROR; + m_tagptr->data = (void*)fppError; + m_tagptr++; + + m_tagptr->tag = FPPTAG_IGNOREVERSION; + m_tagptr->data = (void*)0; + m_tagptr++; + + m_tagptr->tag = FPPTAG_LINE; + m_tagptr->data = (void*)0; + m_tagptr++; + + m_tagptr->tag = FPPTAG_INPUT_NAME; + m_tagptr->data = scratch(_filePath); + m_tagptr++; + + if (NULL != _includeDir) + { + addInclude(_includeDir); + } + + if (!_gles) + { + m_default = "#define lowp\n#define mediump\n#define highp\n"; + } } - if (!_gles) + void setDefine(const char* _define) { - m_default = "#define lowp\n#define mediump\n#define highp\n"; + m_tagptr->tag = FPPTAG_DEFINE; + m_tagptr->data = scratch(_define); + m_tagptr++; } - } - void setDefine(const char* _define) - { - m_tagptr->tag = FPPTAG_DEFINE; - m_tagptr->data = scratch(_define); - m_tagptr++; - } - - void setDefaultDefine(const char* _name) - { - char temp[1024]; - bx::snprintf(temp, BX_COUNTOF(temp) - , "#ifndef %s\n" - "# define %s 0\n" - "#endif // %s\n" - "\n" - , _name - , _name - , _name - ); - - m_default += temp; - } - - void writef(const char* _format, ...) - { - va_list argList; - va_start(argList, _format); - bx::stringPrintfVargs(m_default, _format, argList); - va_end(argList); - } - - void addInclude(const char* _includeDir) - { - char* start = scratch(_includeDir); - - for (char* split = strchr(start, ';'); NULL != split; split = strchr(start, ';')) + void setDefaultDefine(const char* _name) { - *split = '\0'; + char temp[1024]; + bx::snprintf(temp, BX_COUNTOF(temp) + , "#ifndef %s\n" + "# define %s 0\n" + "#endif // %s\n" + "\n" + , _name + , _name + , _name + ); + + m_default += temp; + } + + void writef(const char* _format, ...) + { + va_list argList; + va_start(argList, _format); + bx::stringPrintfVargs(m_default, _format, argList); + va_end(argList); + } + + void addInclude(const char* _includeDir) + { + char* start = scratch(_includeDir); + + for (char* split = strchr(start, ';'); NULL != split; split = strchr(start, ';') ) + { + *split = '\0'; + m_tagptr->tag = FPPTAG_INCLUDE_DIR; + m_tagptr->data = start; + m_tagptr++; + start = split + 1; + } + m_tagptr->tag = FPPTAG_INCLUDE_DIR; m_tagptr->data = start; m_tagptr++; - start = split + 1; } - m_tagptr->tag = FPPTAG_INCLUDE_DIR; - m_tagptr->data = start; - m_tagptr++; - } - - void addDependency(const char* _fileName) - { - m_depends += " \\\n "; - m_depends += _fileName; - } - - bool run(const char* _input) - { - m_fgetsPos = 0; - - m_preprocessed.clear(); - m_input = m_default; - m_input += "\n\n"; - - size_t len = strlen(_input)+1; - char* temp = new char[len]; - bx::eolLF(temp, len, _input); - m_input += temp; - delete [] temp; - - fppTag* tagptr = m_tagptr; - - tagptr->tag = FPPTAG_END; - tagptr->data = 0; - tagptr++; - - int result = fppPreProcess(m_tags); - - return 0 == result; - } - - char* fgets(char* _buffer, int _size) - { - int ii = 0; - for (char ch = m_input[m_fgetsPos]; m_fgetsPos < m_input.size() && ii < _size-1; ch = m_input[++m_fgetsPos]) + void addDependency(const char* _fileName) { - _buffer[ii++] = ch; + m_depends += " \\\n "; + m_depends += _fileName; + } - if (ch == '\n' || ii == _size) + bool run(const char* _input) + { + m_fgetsPos = 0; + + m_preprocessed.clear(); + m_input = m_default; + m_input += "\n\n"; + + size_t len = strlen(_input)+1; + char* temp = new char[len]; + bx::eolLF(temp, len, _input); + m_input += temp; + delete [] temp; + + fppTag* tagptr = m_tagptr; + + tagptr->tag = FPPTAG_END; + tagptr->data = 0; + tagptr++; + + int result = fppPreProcess(m_tags); + + return 0 == result; + } + + char* fgets(char* _buffer, int _size) + { + int ii = 0; + for (char ch = m_input[m_fgetsPos]; m_fgetsPos < m_input.size() && ii < _size-1; ch = m_input[++m_fgetsPos]) { - _buffer[ii] = '\0'; - m_fgetsPos++; - return _buffer; + _buffer[ii++] = ch; + + if (ch == '\n' || ii == _size) + { + _buffer[ii] = '\0'; + m_fgetsPos++; + return _buffer; + } } + + return NULL; } - return NULL; - } - - static void fppDepends(char* _fileName, void* _userData) - { - Preprocessor* thisClass = (Preprocessor*)_userData; - thisClass->addDependency(_fileName); - } - - static char* fppInput(char* _buffer, int _size, void* _userData) - { - Preprocessor* thisClass = (Preprocessor*)_userData; - return thisClass->fgets(_buffer, _size); - } - - static void fppOutput(int _ch, void* _userData) - { - Preprocessor* thisClass = (Preprocessor*)_userData; - thisClass->m_preprocessed += _ch; - } - - static void fppError(void* /*_userData*/, char* _format, va_list _vargs) - { - vfprintf(stderr, _format, _vargs); - } - - char* scratch(const char* _str) - { - char* result = &m_scratch[m_scratchPos]; - strcpy(result, _str); - m_scratchPos += (uint32_t)strlen(_str)+1; - - return result; - } - - fppTag m_tags[MAX_TAGS]; - fppTag* m_tagptr; - - std::string m_depends; - std::string m_default; - std::string m_input; - std::string m_preprocessed; - char m_scratch[16<<10]; - uint32_t m_scratchPos; - uint32_t m_fgetsPos; -}; - -typedef std::vector InOut; - -uint32_t parseInOut(InOut& _inout, const char* _str, const char* _eol) -{ - uint32_t hash = 0; - _str = bx::strws(_str); - - if (_str < _eol) - { - const char* delim; - do + static void fppDepends(char* _fileName, void* _userData) { - delim = strpbrk(_str, " ,"); - if (NULL != delim) + Preprocessor* thisClass = (Preprocessor*)_userData; + thisClass->addDependency(_fileName); + } + + static char* fppInput(char* _buffer, int _size, void* _userData) + { + Preprocessor* thisClass = (Preprocessor*)_userData; + return thisClass->fgets(_buffer, _size); + } + + static void fppOutput(int _ch, void* _userData) + { + Preprocessor* thisClass = (Preprocessor*)_userData; + thisClass->m_preprocessed += _ch; + } + + static void fppError(void* /*_userData*/, char* _format, va_list _vargs) + { + vfprintf(stderr, _format, _vargs); + } + + char* scratch(const char* _str) + { + char* result = &m_scratch[m_scratchPos]; + strcpy(result, _str); + m_scratchPos += (uint32_t)strlen(_str)+1; + + return result; + } + + fppTag m_tags[MAX_TAGS]; + fppTag* m_tagptr; + + std::string m_depends; + std::string m_default; + std::string m_input; + std::string m_preprocessed; + char m_scratch[16<<10]; + uint32_t m_scratchPos; + uint32_t m_fgetsPos; + }; + + typedef std::vector InOut; + + uint32_t parseInOut(InOut& _inout, const char* _str, const char* _eol) + { + uint32_t hash = 0; + _str = bx::strws(_str); + + if (_str < _eol) + { + const char* delim; + do { - delim = delim > _eol ? _eol : delim; - std::string token; - token.assign(_str, delim-_str); - _inout.push_back(token); - _str = bx::strws(delim + 1); + delim = strpbrk(_str, " ,"); + if (NULL != delim) + { + delim = delim > _eol ? _eol : delim; + std::string token; + token.assign(_str, delim-_str); + _inout.push_back(token); + _str = bx::strws(delim + 1); + } } + while (delim < _eol && _str < _eol && NULL != delim); + + std::sort(_inout.begin(), _inout.end() ); + + bx::HashMurmur2A murmur; + murmur.begin(); + for (InOut::const_iterator it = _inout.begin(), itEnd = _inout.end(); it != itEnd; ++it) + { + murmur.add(it->c_str(), (uint32_t)it->size() ); + } + hash = murmur.end(); } - while (delim < _eol && _str < _eol && NULL != delim); - std::sort(_inout.begin(), _inout.end() ); + return hash; + } - bx::HashMurmur2A murmur; - murmur.begin(); - for (InOut::const_iterator it = _inout.begin(), itEnd = _inout.end(); it != itEnd; ++it) + void addFragData(Preprocessor& _preprocessor, char* _data, uint32_t _idx, bool _comma) + { + char find[32]; + bx::snprintf(find, sizeof(find), "gl_FragData[%d]", _idx); + + char replace[32]; + bx::snprintf(replace, sizeof(replace), "gl_FragData_%d_", _idx); + + strReplace(_data, find, replace); + + _preprocessor.writef( + " \\\n\t%sout vec4 gl_FragData_%d_ : SV_TARGET%d" + , _comma ? ", " : " " + , _idx + , _idx + ); + } + + void voidFragData(char* _data, uint32_t _idx) + { + char find[32]; + bx::snprintf(find, sizeof(find), "gl_FragData[%d]", _idx); + + strReplace(_data, find, "bgfx_VoidFrag"); + } + + // c - compute + // d - domain + // f - fragment + // g - geometry + // h - hull + // v - vertex + // + // OpenGL #version Features Direct3D Features Shader Model + // 2.1 120 vf 9.0 vf 2.0 + // 3.0 130 + // 3.1 140 + // 3.2 150 vgf + // 3.3 330 10.0 vgf 4.0 + // 4.0 400 vhdgf + // 4.1 410 + // 4.2 420 11.0 vhdgf+c 5.0 + // 4.3 430 vhdgf+c + // 4.4 440 + + void help(const char* _error = NULL) + { + if (NULL != _error) { - murmur.add(it->c_str(), (uint32_t)it->size() ); + fprintf(stderr, "Error:\n%s\n\n", _error); } - hash = murmur.end(); + + fprintf(stderr + , "shaderc, bgfx shader compiler tool\n" + "Copyright 2011-2016 Branimir Karadzic. All rights reserved.\n" + "License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n\n" + ); + + fprintf(stderr + , "Usage: shaderc -f -o --type --platform \n" + + "\n" + "Options:\n" + " -f Input file path.\n" + " -i Include path (for multiple paths use semicolon).\n" + " -o Output file path.\n" + " --bin2c Generate C header file.\n" + " --depends Generate makefile style depends file.\n" + " --platform Target platform.\n" + " android\n" + " asm.js\n" + " ios\n" + " linux\n" + " nacl\n" + " osx\n" + " windows\n" + " --preprocess Preprocess only.\n" + " --define Add defines to preprocessor (semicolon separated).\n" + " --raw Do not process shader. No preprocessor, and no glsl-optimizer (GLSL only).\n" + " --type Shader type (vertex, fragment)\n" + " --varyingdef Path to varying.def.sc file.\n" + " --verbose Verbose.\n" + + "\n" + "Options (DX9 and DX11 only):\n" + + "\n" + " --debug Debug information.\n" + " --disasm Disassemble compiled shader.\n" + " -p, --profile Shader model (f.e. ps_3_0).\n" + " -O Optimization level (0, 1, 2, 3).\n" + " --Werror Treat warnings as errors.\n" + + "\n" + "For additional information, see https://github.com/bkaradzic/bgfx\n" + ); } - return hash; -} - -void addFragData(Preprocessor& _preprocessor, char* _data, uint32_t _idx, bool _comma) -{ - char find[32]; - bx::snprintf(find, sizeof(find), "gl_FragData[%d]", _idx); - - char replace[32]; - bx::snprintf(replace, sizeof(replace), "gl_FragData_%d_", _idx); - - strReplace(_data, find, replace); - - _preprocessor.writef( - " \\\n\t%sout vec4 gl_FragData_%d_ : SV_TARGET%d" - , _comma ? ", " : " " - , _idx - , _idx - ); -} - -void voidFragData(char* _data, uint32_t _idx) -{ - char find[32]; - bx::snprintf(find, sizeof(find), "gl_FragData[%d]", _idx); - - strReplace(_data, find, "bgfx_VoidFrag"); -} - -// c - compute -// d - domain -// f - fragment -// g - geometry -// h - hull -// v - vertex -// -// OpenGL #version Features Direct3D Features Shader Model -// 2.1 120 vf 9.0 vf 2.0 -// 3.0 130 -// 3.1 140 -// 3.2 150 vgf -// 3.3 330 10.0 vgf 4.0 -// 4.0 400 vhdgf -// 4.1 410 -// 4.2 420 11.0 vhdgf+c 5.0 -// 4.3 430 vhdgf+c -// 4.4 440 - -void help(const char* _error = NULL) -{ - if (NULL != _error) + int compileShader(int _argc, const char* _argv[]) { - fprintf(stderr, "Error:\n%s\n\n", _error); - } + bx::CommandLine cmdLine(_argc, _argv); - fprintf(stderr - , "shaderc, bgfx shader compiler tool\n" - "Copyright 2011-2016 Branimir Karadzic. All rights reserved.\n" - "License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n\n" - ); - - fprintf(stderr - , "Usage: shaderc -f -o --type --platform \n" - - "\n" - "Options:\n" - " -f Input file path.\n" - " -i Include path (for multiple paths use semicolon).\n" - " -o Output file path.\n" - " --bin2c Generate C header file.\n" - " --depends Generate makefile style depends file.\n" - " --platform Target platform.\n" - " android\n" - " asm.js\n" - " ios\n" - " linux\n" - " nacl\n" - " osx\n" - " windows\n" - " --preprocess Preprocess only.\n" - " --raw Do not process shader. No preprocessor, and no glsl-optimizer (GLSL only).\n" - " --type Shader type (vertex, fragment)\n" - " --varyingdef Path to varying.def.sc file.\n" - " --verbose Verbose.\n" - - "\n" - "Options (DX9 and DX11 only):\n" - - "\n" - " --debug Debug information.\n" - " --disasm Disassemble compiled shader.\n" - " -p, --profile Shader model (f.e. ps_3_0).\n" - " -O Optimization level (0, 1, 2, 3).\n" - " --Werror Treat warnings as errors.\n" - - "\n" - "For additional information, see https://github.com/bkaradzic/bgfx\n" - ); -} - -int main(int _argc, const char* _argv[]) -{ - bx::CommandLine cmdLine(_argc, _argv); - - if (cmdLine.hasArg('h', "help") ) - { - help(); - return EXIT_FAILURE; - } - - g_verbose = cmdLine.hasArg("verbose"); - - const char* filePath = cmdLine.findOption('f'); - if (NULL == filePath) - { - help("Shader file name must be specified."); - return EXIT_FAILURE; - } - - const char* outFilePath = cmdLine.findOption('o'); - if (NULL == outFilePath) - { - help("Output file name must be specified."); - return EXIT_FAILURE; - } - - const char* type = cmdLine.findOption('\0', "type"); - if (NULL == type) - { - help("Must specify shader type."); - return EXIT_FAILURE; - } - - const char* platform = cmdLine.findOption('\0', "platform"); - if (NULL == platform) - { - help("Must specify platform."); - return EXIT_FAILURE; - } - - bool raw = cmdLine.hasArg('\0', "raw"); - - uint32_t glsl = 0; - uint32_t essl = 0; - uint32_t hlsl = 2; - uint32_t d3d = 11; - uint32_t metal = 0; - const char* profile = cmdLine.findOption('p', "profile"); - if (NULL != profile) - { - if (0 == strncmp(&profile[1], "s_4_0_level", 11) ) + if (cmdLine.hasArg('h', "help") ) { - hlsl = 2; + help(); + return EXIT_FAILURE; } - else if (0 == strncmp(&profile[1], "s_3", 3) ) + + g_verbose = cmdLine.hasArg("verbose"); + + const char* filePath = cmdLine.findOption('f'); + if (NULL == filePath) { - hlsl = 3; - d3d = 9; + help("Shader file name must be specified."); + return EXIT_FAILURE; } - else if (0 == strncmp(&profile[1], "s_4", 3) ) + + const char* outFilePath = cmdLine.findOption('o'); + if (NULL == outFilePath) { - hlsl = 4; + help("Output file name must be specified."); + return EXIT_FAILURE; } - else if (0 == strncmp(&profile[1], "s_5", 3) ) + + const char* type = cmdLine.findOption('\0', "type"); + if (NULL == type) { - hlsl = 5; + help("Must specify shader type."); + return EXIT_FAILURE; } - else if (0 == strcmp(profile, "metal") ) + + const char* platform = cmdLine.findOption('\0', "platform"); + if (NULL == platform) { - metal = 1; + help("Must specify platform."); + return EXIT_FAILURE; + } + + bool raw = cmdLine.hasArg('\0', "raw"); + + uint32_t glsl = 0; + uint32_t essl = 0; + uint32_t hlsl = 2; + uint32_t d3d = 11; + uint32_t metal = 0; + const char* profile = cmdLine.findOption('p', "profile"); + if (NULL != profile) + { + if (0 == strncmp(&profile[1], "s_4_0_level", 11) ) + { + hlsl = 2; + } + else if (0 == strncmp(&profile[1], "s_3", 3) ) + { + hlsl = 3; + d3d = 9; + } + else if (0 == strncmp(&profile[1], "s_4", 3) ) + { + hlsl = 4; + } + else if (0 == strncmp(&profile[1], "s_5", 3) ) + { + hlsl = 5; + } + else if (0 == strcmp(profile, "metal") ) + { + metal = 1; + } + else + { + glsl = atoi(profile); + } } else { - glsl = atoi(profile); + essl = 2; } - } - else - { - essl = 2; - } - const char* bin2c = NULL; - if (cmdLine.hasArg("bin2c") ) - { - bin2c = cmdLine.findOption("bin2c"); - if (NULL == bin2c) + const char* bin2c = NULL; + if (cmdLine.hasArg("bin2c") ) { - bin2c = bx::baseName(outFilePath); - uint32_t len = (uint32_t)strlen(bin2c); - char* temp = (char*)alloca(len+1); - for (char *out = temp; *bin2c != '\0';) + bin2c = cmdLine.findOption("bin2c"); + if (NULL == bin2c) { - char ch = *bin2c++; - if (isalnum(ch) ) + bin2c = bx::baseName(outFilePath); + uint32_t len = (uint32_t)strlen(bin2c); + char* temp = (char*)alloca(len+1); + for (char *out = temp; *bin2c != '\0';) { - *out++ = ch; - } - else - { - *out++ = '_'; + char ch = *bin2c++; + if (isalnum(ch) ) + { + *out++ = ch; + } + else + { + *out++ = '_'; + } } + temp[len] = '\0'; + + bin2c = temp; } - temp[len] = '\0'; - - bin2c = temp; - } - } - - bool depends = cmdLine.hasArg("depends"); - bool preprocessOnly = cmdLine.hasArg("preprocess"); - const char* includeDir = cmdLine.findOption('i'); - - Preprocessor preprocessor(filePath, 0 != essl, includeDir); - - std::string dir; - { - const char* base = bx::baseName(filePath); - - if (base != filePath) - { - dir.assign(filePath, base-filePath); - preprocessor.addInclude(dir.c_str() ); - } - } - - preprocessor.setDefaultDefine("BX_PLATFORM_ANDROID"); - preprocessor.setDefaultDefine("BX_PLATFORM_EMSCRIPTEN"); - preprocessor.setDefaultDefine("BX_PLATFORM_IOS"); - preprocessor.setDefaultDefine("BX_PLATFORM_LINUX"); - preprocessor.setDefaultDefine("BX_PLATFORM_NACL"); - preprocessor.setDefaultDefine("BX_PLATFORM_OSX"); - preprocessor.setDefaultDefine("BX_PLATFORM_WINDOWS"); - preprocessor.setDefaultDefine("BX_PLATFORM_XBOX360"); -// preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_ESSL"); - preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_GLSL"); - preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_HLSL"); - preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_METAL"); - preprocessor.setDefaultDefine("BGFX_SHADER_TYPE_COMPUTE"); - preprocessor.setDefaultDefine("BGFX_SHADER_TYPE_FRAGMENT"); - preprocessor.setDefaultDefine("BGFX_SHADER_TYPE_VERTEX"); - - char glslDefine[128]; - bx::snprintf(glslDefine, BX_COUNTOF(glslDefine), "BGFX_SHADER_LANGUAGE_GLSL=%d", essl ? 1 : glsl); - - if (0 == bx::stricmp(platform, "android") ) - { - preprocessor.setDefine("BX_PLATFORM_ANDROID=1"); - preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); - } - else if (0 == bx::stricmp(platform, "asm.js") ) - { - preprocessor.setDefine("BX_PLATFORM_EMSCRIPTEN=1"); - preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); - } - else if (0 == bx::stricmp(platform, "ios") ) - { - preprocessor.setDefine("BX_PLATFORM_IOS=1"); - preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); - } - else if (0 == bx::stricmp(platform, "linux") ) - { - preprocessor.setDefine("BX_PLATFORM_LINUX=1"); - preprocessor.setDefine(glslDefine); - } - else if (0 == bx::stricmp(platform, "nacl") ) - { - preprocessor.setDefine("BX_PLATFORM_NACL=1"); - preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); - } - else if (0 == bx::stricmp(platform, "osx") ) - { - preprocessor.setDefine("BX_PLATFORM_OSX=1"); - preprocessor.setDefine(glslDefine); - char temp[256]; - bx::snprintf(temp, sizeof(temp), "BGFX_SHADER_LANGUAGE_METAL=%d", metal); - preprocessor.setDefine(temp); - } - else if (0 == bx::stricmp(platform, "windows") ) - { - preprocessor.setDefine("BX_PLATFORM_WINDOWS=1"); - char temp[256]; - bx::snprintf(temp, sizeof(temp), "BGFX_SHADER_LANGUAGE_HLSL=%d", hlsl); - preprocessor.setDefine(temp); - } - else if (0 == bx::stricmp(platform, "xbox360") ) - { - preprocessor.setDefine("BX_PLATFORM_XBOX360=1"); - preprocessor.setDefine("BGFX_SHADER_LANGUAGE_HLSL=3"); - } - else - { - fprintf(stderr, "Unknown platform %s?!", platform); - return EXIT_FAILURE; - } - - preprocessor.setDefine("M_PI=3.1415926535897932384626433832795"); - - char shaderType = tolower(type[0]); - switch (shaderType) - { - case 'c': - preprocessor.setDefine("BGFX_SHADER_TYPE_COMPUTE=1"); - break; - - case 'f': - preprocessor.setDefine("BGFX_SHADER_TYPE_FRAGMENT=1"); - break; - - case 'v': - preprocessor.setDefine("BGFX_SHADER_TYPE_VERTEX=1"); - break; - - default: - fprintf(stderr, "Unknown type: %s?!", type); - return EXIT_FAILURE; - } - - bool compiled = false; - - FILE* file = fopen(filePath, "r"); - if (NULL == file) - { - fprintf(stderr, "Unable to open file '%s'.\n", filePath); - } - else - { - VaryingMap varyingMap; - - std::string defaultVarying = dir + "varying.def.sc"; - const char* varyingdef = cmdLine.findOption("varyingdef", defaultVarying.c_str() ); - File attribdef(varyingdef); - const char* parse = attribdef.getData(); - if (NULL != parse - && *parse != '\0') - { - preprocessor.addDependency(varyingdef); - } - else - { - fprintf(stderr, "ERROR: Failed to parse varying def file: \"%s\" No input/output semantics will be generated in the code!\n", varyingdef); } - while (NULL != parse - && *parse != '\0') + bool depends = cmdLine.hasArg("depends"); + bool preprocessOnly = cmdLine.hasArg("preprocess"); + const char* includeDir = cmdLine.findOption('i'); + + Preprocessor preprocessor(filePath, 0 != essl, includeDir); + + std::string dir; { - parse = bx::strws(parse); - const char* eol = strchr(parse, ';'); + const char* base = bx::baseName(filePath); + + if (base != filePath) + { + dir.assign(filePath, base-filePath); + preprocessor.addInclude(dir.c_str() ); + } + } + + const char* defines = cmdLine.findOption("define"); + while (NULL != defines + && '\0' != *defines) + { + defines = bx::strws(defines); + const char* eol = strchr(defines, ';'); if (NULL == eol) { - eol = bx::streol(parse); - } - - if (NULL != eol) - { - const char* precision = NULL; - const char* interpolation = NULL; - const char* typen = parse; - - if (0 == strncmp(typen, "lowp", 4) - || 0 == strncmp(typen, "mediump", 7) - || 0 == strncmp(typen, "highp", 5) ) - { - precision = typen; - typen = parse = bx::strws(bx::strword(parse) ); - } - - if (0 == strncmp(typen, "flat", 4) - || 0 == strncmp(typen, "smooth", 6) - || 0 == strncmp(typen, "noperspective", 13) ) - { - interpolation = typen; - typen = parse = bx::strws(bx::strword(parse) ); - } - - const char* name = parse = bx::strws(bx::strword(parse) ); - const char* column = parse = bx::strws(bx::strword(parse) ); - const char* semantics = parse = bx::strws((*parse == ':' ? ++parse : parse)); - const char* assign = parse = bx::strws(bx::strword(parse) ); - const char* init = parse = bx::strws((*parse == '=' ? ++parse : parse)); - - if (typen < eol - && name < eol - && column < eol - && ':' == *column - && semantics < eol) - { - Varying var; - if (NULL != precision) - { - var.m_precision.assign(precision, bx::strword(precision)-precision); - } - - if (NULL != interpolation) - { - var.m_interpolation.assign(interpolation, bx::strword(interpolation)-interpolation); - } - - var.m_type.assign(typen, bx::strword(typen)-typen); - var.m_name.assign(name, bx::strword(name)-name); - var.m_semantics.assign(semantics, bx::strword(semantics)-semantics); - - if (d3d == 9 - && var.m_semantics == "BITANGENT") - { - var.m_semantics = "BINORMAL"; - } - - if (assign < eol - && '=' == *assign - && init < eol) - { - var.m_init.assign(init, eol-init); - } - - varyingMap.insert(std::make_pair(var.m_name, var) ); - } - - parse = bx::strws(bx::strnl(eol) ); + eol = defines + strlen(defines); } + std::string define(defines, eol); + preprocessor.setDefine(define.c_str() ); + defines = ';' == *eol ? eol+1 : eol; } - InOut shaderInputs; - InOut shaderOutputs; - uint32_t inputHash = 0; - uint32_t outputHash = 0; + preprocessor.setDefaultDefine("BX_PLATFORM_ANDROID"); + preprocessor.setDefaultDefine("BX_PLATFORM_EMSCRIPTEN"); + preprocessor.setDefaultDefine("BX_PLATFORM_IOS"); + preprocessor.setDefaultDefine("BX_PLATFORM_LINUX"); + preprocessor.setDefaultDefine("BX_PLATFORM_NACL"); + preprocessor.setDefaultDefine("BX_PLATFORM_OSX"); + preprocessor.setDefaultDefine("BX_PLATFORM_WINDOWS"); + preprocessor.setDefaultDefine("BX_PLATFORM_XBOX360"); + // preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_ESSL"); + preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_GLSL"); + preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_HLSL"); + preprocessor.setDefaultDefine("BGFX_SHADER_LANGUAGE_METAL"); + preprocessor.setDefaultDefine("BGFX_SHADER_TYPE_COMPUTE"); + preprocessor.setDefaultDefine("BGFX_SHADER_TYPE_FRAGMENT"); + preprocessor.setDefaultDefine("BGFX_SHADER_TYPE_VERTEX"); - char* data; - char* input; + char glslDefine[128]; + bx::snprintf(glslDefine, BX_COUNTOF(glslDefine), "BGFX_SHADER_LANGUAGE_GLSL=%d", essl ? 1 : glsl); + + if (0 == bx::stricmp(platform, "android") ) { - const size_t padding = 1024; - uint32_t size = (uint32_t)fsize(file); - data = new char[size+padding+1]; - size = (uint32_t)fread(data, 1, size, file); - // Compiler generates "error X3000: syntax error: unexpected end of file" - // if input doesn't have empty line at EOF. - data[size] = '\n'; - memset(&data[size+1], 0, padding); - fclose(file); + preprocessor.setDefine("BX_PLATFORM_ANDROID=1"); + preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); + } + else if (0 == bx::stricmp(platform, "asm.js") ) + { + preprocessor.setDefine("BX_PLATFORM_EMSCRIPTEN=1"); + preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); + } + else if (0 == bx::stricmp(platform, "ios") ) + { + preprocessor.setDefine("BX_PLATFORM_IOS=1"); + preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); + } + else if (0 == bx::stricmp(platform, "linux") ) + { + preprocessor.setDefine("BX_PLATFORM_LINUX=1"); + preprocessor.setDefine(glslDefine); + } + else if (0 == bx::stricmp(platform, "nacl") ) + { + preprocessor.setDefine("BX_PLATFORM_NACL=1"); + preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1"); + } + else if (0 == bx::stricmp(platform, "osx") ) + { + preprocessor.setDefine("BX_PLATFORM_OSX=1"); + preprocessor.setDefine(glslDefine); + char temp[256]; + bx::snprintf(temp, sizeof(temp), "BGFX_SHADER_LANGUAGE_METAL=%d", metal); + preprocessor.setDefine(temp); + } + else if (0 == bx::stricmp(platform, "windows") ) + { + preprocessor.setDefine("BX_PLATFORM_WINDOWS=1"); + char temp[256]; + bx::snprintf(temp, sizeof(temp), "BGFX_SHADER_LANGUAGE_HLSL=%d", hlsl); + preprocessor.setDefine(temp); + } + else if (0 == bx::stricmp(platform, "xbox360") ) + { + preprocessor.setDefine("BX_PLATFORM_XBOX360=1"); + preprocessor.setDefine("BGFX_SHADER_LANGUAGE_HLSL=3"); + } + else + { + fprintf(stderr, "Unknown platform %s?!", platform); + return EXIT_FAILURE; + } - strNormalizeEol(data); + preprocessor.setDefine("M_PI=3.1415926535897932384626433832795"); - input = const_cast(bx::strws(data) ); - while (input[0] == '$') + char shaderType = tolower(type[0]); + switch (shaderType) + { + case 'c': + preprocessor.setDefine("BGFX_SHADER_TYPE_COMPUTE=1"); + break; + + case 'f': + preprocessor.setDefine("BGFX_SHADER_TYPE_FRAGMENT=1"); + break; + + case 'v': + preprocessor.setDefine("BGFX_SHADER_TYPE_VERTEX=1"); + break; + + default: + fprintf(stderr, "Unknown type: %s?!", type); + return EXIT_FAILURE; + } + + bool compiled = false; + + FILE* file = fopen(filePath, "r"); + if (NULL == file) + { + fprintf(stderr, "Unable to open file '%s'.\n", filePath); + } + else + { + VaryingMap varyingMap; + + std::string defaultVarying = dir + "varying.def.sc"; + const char* varyingdef = cmdLine.findOption("varyingdef", defaultVarying.c_str() ); + File attribdef(varyingdef); + const char* parse = attribdef.getData(); + if (NULL != parse + && *parse != '\0') { - const char* str = bx::strws(input+1); - const char* eol = bx::streol(str); - const char* nl = bx::strnl(eol); - input = const_cast(nl); - - if (0 == strncmp(str, "input", 5) ) - { - str += 5; - const char* comment = strstr(str, "//"); - eol = NULL != comment && comment < eol ? comment : eol; - inputHash = parseInOut(shaderInputs, str, eol); - } - else if (0 == strncmp(str, "output", 6) ) - { - str += 6; - const char* comment = strstr(str, "//"); - eol = NULL != comment && comment < eol ? comment : eol; - outputHash = parseInOut(shaderOutputs, str, eol); - } - else if (0 == strncmp(str, "raw", 3) ) - { - raw = true; - str += 3; - } - - input = const_cast(bx::strws(input) ); + preprocessor.addDependency(varyingdef); + } + else + { + fprintf(stderr, "ERROR: Failed to parse varying def file: \"%s\" No input/output semantics will be generated in the code!\n", varyingdef); } - if (!raw) + while (NULL != parse + && *parse != '\0') { - // To avoid commented code being recognized as used feature, - // first preprocess pass is used to strip all comments before - // substituting code. - preprocessor.run(input); - delete [] data; + parse = bx::strws(parse); + const char* eol = strchr(parse, ';'); + if (NULL == eol) + { + eol = bx::streol(parse); + } - size = (uint32_t)preprocessor.m_preprocessed.size(); + if (NULL != eol) + { + const char* precision = NULL; + const char* interpolation = NULL; + const char* typen = parse; + + if (0 == strncmp(typen, "lowp", 4) + || 0 == strncmp(typen, "mediump", 7) + || 0 == strncmp(typen, "highp", 5) ) + { + precision = typen; + typen = parse = bx::strws(bx::strword(parse) ); + } + + if (0 == strncmp(typen, "flat", 4) + || 0 == strncmp(typen, "smooth", 6) + || 0 == strncmp(typen, "noperspective", 13) ) + { + interpolation = typen; + typen = parse = bx::strws(bx::strword(parse) ); + } + + const char* name = parse = bx::strws(bx::strword(parse) ); + const char* column = parse = bx::strws(bx::strword(parse) ); + const char* semantics = parse = bx::strws( (*parse == ':' ? ++parse : parse) ); + const char* assign = parse = bx::strws(bx::strword(parse) ); + const char* init = parse = bx::strws( (*parse == '=' ? ++parse : parse) ); + + if (typen < eol + && name < eol + && column < eol + && ':' == *column + && semantics < eol) + { + Varying var; + if (NULL != precision) + { + var.m_precision.assign(precision, bx::strword(precision)-precision); + } + + if (NULL != interpolation) + { + var.m_interpolation.assign(interpolation, bx::strword(interpolation)-interpolation); + } + + var.m_type.assign(typen, bx::strword(typen)-typen); + var.m_name.assign(name, bx::strword(name)-name); + var.m_semantics.assign(semantics, bx::strword(semantics)-semantics); + + if (d3d == 9 + && var.m_semantics == "BITANGENT") + { + var.m_semantics = "BINORMAL"; + } + + if (assign < eol + && '=' == *assign + && init < eol) + { + var.m_init.assign(init, eol-init); + } + + varyingMap.insert(std::make_pair(var.m_name, var) ); + } + + parse = bx::strws(bx::strnl(eol) ); + } + } + + InOut shaderInputs; + InOut shaderOutputs; + uint32_t inputHash = 0; + uint32_t outputHash = 0; + + char* data; + char* input; + { + const size_t padding = 1024; + uint32_t size = (uint32_t)fsize(file); data = new char[size+padding+1]; - memcpy(data, preprocessor.m_preprocessed.c_str(), size); - memset(&data[size], 0, padding+1); - input = data; - } - } + size = (uint32_t)fread(data, 1, size, file); + // Compiler generates "error X3000: syntax error: unexpected end of file" + // if input doesn't have empty line at EOF. + data[size] = '\n'; + memset(&data[size+1], 0, padding); + fclose(file); - if (raw) - { - bx::CrtFileWriter* writer = NULL; + strNormalizeEol(data); - if (NULL != bin2c) - { - writer = new Bin2cWriter(bin2c); - } - else - { - writer = new bx::CrtFileWriter; - } - - if (0 != writer->open(outFilePath) ) - { - fprintf(stderr, "Unable to open output file '%s'.", outFilePath); - return EXIT_FAILURE; - } - - if ('f' == shaderType) - { - bx::write(writer, BGFX_CHUNK_MAGIC_FSH); - bx::write(writer, inputHash); - } - else if ('v' == shaderType) - { - bx::write(writer, BGFX_CHUNK_MAGIC_VSH); - bx::write(writer, outputHash); - } - else - { - bx::write(writer, BGFX_CHUNK_MAGIC_CSH); - bx::write(writer, outputHash); - } - - if (0 != glsl) - { - bx::write(writer, uint16_t(0) ); - - uint32_t shaderSize = (uint32_t)strlen(input); - bx::write(writer, shaderSize); - bx::write(writer, input, shaderSize); - bx::write(writer, uint8_t(0) ); - - compiled = true; - } - else - { - compiled = compileHLSLShader(cmdLine, d3d, input, writer); - } - - writer->close(); - delete writer; - } - else if ('c' == shaderType) // Compute - { - char* entry = strstr(input, "void main()"); - if (NULL == entry) - { - fprintf(stderr, "Shader entry point 'void main()' is not found.\n"); - } - else - { - if (0 != glsl - || 0 != essl - || 0 != metal) + input = const_cast(bx::strws(data) ); + while (input[0] == '$') { + const char* str = bx::strws(input+1); + const char* eol = bx::streol(str); + const char* nl = bx::strnl(eol); + input = const_cast(nl); + + if (0 == strncmp(str, "input", 5) ) + { + str += 5; + const char* comment = strstr(str, "//"); + eol = NULL != comment && comment < eol ? comment : eol; + inputHash = parseInOut(shaderInputs, str, eol); + } + else if (0 == strncmp(str, "output", 6) ) + { + str += 6; + const char* comment = strstr(str, "//"); + eol = NULL != comment && comment < eol ? comment : eol; + outputHash = parseInOut(shaderOutputs, str, eol); + } + else if (0 == strncmp(str, "raw", 3) ) + { + raw = true; + str += 3; + } + + input = const_cast(bx::strws(input) ); + } + + if (!raw) + { + // To avoid commented code being recognized as used feature, + // first preprocess pass is used to strip all comments before + // substituting code. + preprocessor.run(input); + delete [] data; + + size = (uint32_t)preprocessor.m_preprocessed.size(); + data = new char[size+padding+1]; + memcpy(data, preprocessor.m_preprocessed.c_str(), size); + memset(&data[size], 0, padding+1); + input = data; + } + } + + if (raw) + { + bx::CrtFileWriter* writer = NULL; + + if (NULL != bin2c) + { + writer = new Bin2cWriter(bin2c); } else { - preprocessor.writef( - "#define lowp\n" - "#define mediump\n" - "#define highp\n" - "#define ivec2 int2\n" - "#define ivec3 int3\n" - "#define ivec4 int4\n" - "#define uvec2 uint2\n" - "#define uvec3 uint3\n" - "#define uvec4 uint4\n" - "#define vec2 float2\n" - "#define vec3 float3\n" - "#define vec4 float4\n" - "#define mat2 float2x2\n" - "#define mat3 float3x3\n" - "#define mat4 float4x4\n" - ); - - entry[4] = '_'; - - preprocessor.writef("#define void_main()"); - preprocessor.writef(" \\\n\tvoid main("); - - uint32_t arg = 0; - - const bool hasLocalInvocationID = NULL != strstr(input, "gl_LocalInvocationID"); - const bool hasLocalInvocationIndex = NULL != strstr(input, "gl_LocalInvocationIndex"); - const bool hasGlobalInvocationID = NULL != strstr(input, "gl_GlobalInvocationID"); - const bool hasWorkGroupID = NULL != strstr(input, "gl_WorkGroupID"); - - if (hasLocalInvocationID) - { - preprocessor.writef( - " \\\n\t%sint3 gl_LocalInvocationID : SV_GroupThreadID" - , arg++ > 0 ? ", " : " " - ); - } - - if (hasLocalInvocationIndex) - { - preprocessor.writef( - " \\\n\t%sint gl_LocalInvocationIndex : SV_GroupIndex" - , arg++ > 0 ? ", " : " " - ); - } - - if (hasGlobalInvocationID) - { - preprocessor.writef( - " \\\n\t%sint3 gl_GlobalInvocationID : SV_DispatchThreadID" - , arg++ > 0 ? ", " : " " - ); - } - - if (hasWorkGroupID) - { - preprocessor.writef( - " \\\n\t%sint3 gl_WorkGroupID : SV_GroupID" - , arg++ > 0 ? ", " : " " - ); - } - - preprocessor.writef( - " \\\n\t)\n" - ); + writer = new bx::CrtFileWriter; } - if (preprocessor.run(input) ) + if (!bx::open(writer, outFilePath) ) { - BX_TRACE("Input file: %s", filePath); - BX_TRACE("Output file: %s", outFilePath); - - if (preprocessOnly) - { - bx::CrtFileWriter writer; - - if (0 != writer.open(outFilePath) ) - { - fprintf(stderr, "Unable to open output file '%s'.", outFilePath); - return EXIT_FAILURE; - } - - writer.write(preprocessor.m_preprocessed.c_str(), (int32_t)preprocessor.m_preprocessed.size() ); - writer.close(); - - return EXIT_SUCCESS; - } - - { - bx::CrtFileWriter* writer = NULL; - - if (NULL != bin2c) - { - writer = new Bin2cWriter(bin2c); - } - else - { - writer = new bx::CrtFileWriter; - } - - if (0 != writer->open(outFilePath) ) - { - fprintf(stderr, "Unable to open output file '%s'.", outFilePath); - return EXIT_FAILURE; - } - - bx::write(writer, BGFX_CHUNK_MAGIC_CSH); - bx::write(writer, outputHash); - - if (0 != glsl - || 0 != essl) - { - std::string code; - - if (essl) - { - bx::stringPrintf(code, "#version 310 es\n"); - } - else - { - bx::stringPrintf(code, "#version %d\n", glsl == 0 ? 430 : glsl); - } - - code += preprocessor.m_preprocessed; -#if 1 - bx::write(writer, uint16_t(0) ); - - uint32_t shaderSize = (uint32_t)code.size(); - bx::write(writer, shaderSize); - bx::write(writer, code.c_str(), shaderSize); - bx::write(writer, uint8_t(0) ); - - compiled = true; -#else - compiled = compileGLSLShader(cmdLine, essl, code, writer); -#endif // 0 - } - else - { - compiled = compileHLSLShader(cmdLine, d3d, preprocessor.m_preprocessed, writer); - } - - writer->close(); - delete writer; - } - - if (compiled) - { - if (depends) - { - std::string ofp = outFilePath; - ofp += ".d"; - bx::CrtFileWriter writer; - if (0 == writer.open(ofp.c_str() ) ) - { - writef(&writer, "%s : %s\n", outFilePath, preprocessor.m_depends.c_str() ); - writer.close(); - } - } - } + fprintf(stderr, "Unable to open output file '%s'.", outFilePath); + return EXIT_FAILURE; } - } - } - else // Vertex/Fragment - { - char* entry = strstr(input, "void main()"); - if (NULL == entry) - { - fprintf(stderr, "Shader entry point 'void main()' is not found.\n"); - } - else - { - if (0 != glsl - || 0 != essl - || 0 != metal) + + if ('f' == shaderType) { - if (120 == glsl - || 0 != essl) - { - preprocessor.writef( - "#define ivec2 vec2\n" - "#define ivec3 vec3\n" - "#define ivec4 vec4\n" - ); - } - - if (0 == essl) - { - // bgfx shadow2D/Proj behave like EXT_shadow_samplers - // not as GLSL language 1.2 specs shadow2D/Proj. - preprocessor.writef( - "#define shadow2D(_sampler, _coord) bgfxShadow2D(_sampler, _coord).x\n" - "#define shadow2DProj(_sampler, _coord) bgfxShadow2DProj(_sampler, _coord).x\n" - ); - } - - for (InOut::const_iterator it = shaderInputs.begin(), itEnd = shaderInputs.end(); it != itEnd; ++it) - { - VaryingMap::const_iterator varyingIt = varyingMap.find(*it); - if (varyingIt != varyingMap.end() ) - { - const Varying& var = varyingIt->second; - const char* name = var.m_name.c_str(); - - if (0 == strncmp(name, "a_", 2) - || 0 == strncmp(name, "i_", 2) ) - { - preprocessor.writef("attribute %s %s %s %s;\n" - , var.m_precision.c_str() - , var.m_interpolation.c_str() - , var.m_type.c_str() - , name - ); - } - else - { - preprocessor.writef("%s varying %s %s %s;\n" - , var.m_interpolation.c_str() - , var.m_precision.c_str() - , var.m_type.c_str() - , name - ); - } - } - } - - for (InOut::const_iterator it = shaderOutputs.begin(), itEnd = shaderOutputs.end(); it != itEnd; ++it) - { - VaryingMap::const_iterator varyingIt = varyingMap.find(*it); - if (varyingIt != varyingMap.end() ) - { - const Varying& var = varyingIt->second; - preprocessor.writef("%s varying %s %s;\n" - , var.m_interpolation.c_str() - , var.m_type.c_str() - , var.m_name.c_str() - ); - } - } + bx::write(writer, BGFX_CHUNK_MAGIC_FSH); + bx::write(writer, inputHash); + } + else if ('v' == shaderType) + { + bx::write(writer, BGFX_CHUNK_MAGIC_VSH); + bx::write(writer, outputHash); } else { - preprocessor.writef( - "#define lowp\n" - "#define mediump\n" - "#define highp\n" - "#define ivec2 int2\n" - "#define ivec3 int3\n" - "#define ivec4 int4\n" - "#define uvec2 uint2\n" - "#define uvec3 uint3\n" - "#define uvec4 uint4\n" - "#define vec2 float2\n" - "#define vec3 float3\n" - "#define vec4 float4\n" - "#define mat2 float2x2\n" - "#define mat3 float3x3\n" - "#define mat4 float4x4\n" - ); + bx::write(writer, BGFX_CHUNK_MAGIC_CSH); + bx::write(writer, outputHash); + } - if (hlsl < 4) + if (0 != glsl) + { + bx::write(writer, uint16_t(0) ); + + uint32_t shaderSize = (uint32_t)strlen(input); + bx::write(writer, shaderSize); + bx::write(writer, input, shaderSize); + bx::write(writer, uint8_t(0) ); + + compiled = true; + } + else + { + compiled = compileHLSLShader(cmdLine, d3d, input, writer); + } + + bx::close(writer); + delete writer; + } + else if ('c' == shaderType) // Compute + { + char* entry = strstr(input, "void main()"); + if (NULL == entry) + { + fprintf(stderr, "Shader entry point 'void main()' is not found.\n"); + } + else + { + if (0 != glsl + || 0 != essl + || 0 != metal) + { + } + else { preprocessor.writef( - "#define flat\n" - "#define smooth\n" - "#define noperspective\n" + "#define lowp\n" + "#define mediump\n" + "#define highp\n" + "#define ivec2 int2\n" + "#define ivec3 int3\n" + "#define ivec4 int4\n" + "#define uvec2 uint2\n" + "#define uvec3 uint3\n" + "#define uvec4 uint4\n" + "#define vec2 float2\n" + "#define vec3 float3\n" + "#define vec4 float4\n" + "#define mat2 float2x2\n" + "#define mat3 float3x3\n" + "#define mat4 float4x4\n" ); - } - entry[4] = '_'; - - if ('f' == shaderType) - { - const char* brace = strstr(entry, "{"); - if (NULL != brace) - { - strInsert(const_cast(brace+1), "\nvec4 bgfx_VoidFrag;\n"); - } - - const bool hasFragCoord = NULL != strstr(input, "gl_FragCoord") || hlsl > 3 || hlsl == 2; - const bool hasFragDepth = NULL != strstr(input, "gl_FragDepth"); - const bool hasFrontFacing = NULL != strstr(input, "gl_FrontFacing"); - const bool hasPrimitiveId = NULL != strstr(input, "gl_PrimitiveID"); - - bool hasFragData[8] = {}; - uint32_t numFragData = 0; - for (uint32_t ii = 0; ii < BX_COUNTOF(hasFragData); ++ii) - { - char temp[32]; - bx::snprintf(temp, BX_COUNTOF(temp), "gl_FragData[%d]", ii); - hasFragData[ii] = NULL != strstr(input, temp); - numFragData += hasFragData[ii]; - } - - if (0 == numFragData) - { - // GL errors when both gl_FragColor and gl_FragData is used. - // This will trigger the same error with HLSL compiler too. - preprocessor.writef("#define gl_FragColor gl_FragData_0_\n"); - } + entry[4] = '_'; preprocessor.writef("#define void_main()"); preprocessor.writef(" \\\n\tvoid main("); uint32_t arg = 0; - if (hasFragCoord) - { - preprocessor.writef(" \\\n\tvec4 gl_FragCoord : SV_POSITION"); - ++arg; - } + const bool hasLocalInvocationID = NULL != strstr(input, "gl_LocalInvocationID"); + const bool hasLocalInvocationIndex = NULL != strstr(input, "gl_LocalInvocationIndex"); + const bool hasGlobalInvocationID = NULL != strstr(input, "gl_GlobalInvocationID"); + const bool hasWorkGroupID = NULL != strstr(input, "gl_WorkGroupID"); - for (InOut::const_iterator it = shaderInputs.begin(), itEnd = shaderInputs.end(); it != itEnd; ++it) - { - VaryingMap::const_iterator varyingIt = varyingMap.find(*it); - if (varyingIt != varyingMap.end() ) - { - const Varying& var = varyingIt->second; - preprocessor.writef(" \\\n\t%s%s %s %s : %s" - , arg++ > 0 ? ", " : " " - , interpolationDx11(var.m_interpolation.c_str() ) - , var.m_type.c_str() - , var.m_name.c_str() - , var.m_semantics.c_str() - ); - } - } - - addFragData(preprocessor, input, 0, arg++ > 0); - - const uint32_t maxRT = d3d > 9 ? BX_COUNTOF(hasFragData) : 4; - - for (uint32_t ii = 1; ii < BX_COUNTOF(hasFragData); ++ii) - { - if (ii < maxRT) - { - if (hasFragData[ii]) - { - addFragData(preprocessor, input, ii, arg++ > 0); - } - } - else - { - voidFragData(input, ii); - } - } - - if (hasFragDepth) + if (hasLocalInvocationID) { preprocessor.writef( - " \\\n\t%sout float gl_FragDepth : SV_DEPTH" + " \\\n\t%sint3 gl_LocalInvocationID : SV_GroupThreadID" , arg++ > 0 ? ", " : " " ); } - if (hasFrontFacing - && hlsl >= 3) + if (hasLocalInvocationIndex) { preprocessor.writef( - " \\\n\t%sfloat __vface : VFACE" + " \\\n\t%sint gl_LocalInvocationIndex : SV_GroupIndex" , arg++ > 0 ? ", " : " " ); } - if (hasPrimitiveId) + if (hasGlobalInvocationID) { - if (d3d > 9) - { - preprocessor.writef( - " \\\n\t%suint gl_PrimitiveID : SV_PrimitiveID" - , arg++ > 0 ? ", " : " " - ); - } - else - { - fprintf(stderr, "PrimitiveID builtin is not supported by this D3D9 HLSL.\n"); - return EXIT_FAILURE; - } + preprocessor.writef( + " \\\n\t%sint3 gl_GlobalInvocationID : SV_DispatchThreadID" + , arg++ > 0 ? ", " : " " + ); + } + + if (hasWorkGroupID) + { + preprocessor.writef( + " \\\n\t%sint3 gl_WorkGroupID : SV_GroupID" + , arg++ > 0 ? ", " : " " + ); } preprocessor.writef( " \\\n\t)\n" ); + } - if (hasFrontFacing) + if (preprocessor.run(input) ) + { + BX_TRACE("Input file: %s", filePath); + BX_TRACE("Output file: %s", outFilePath); + + if (preprocessOnly) { - if (hlsl >= 3) + bx::CrtFileWriter writer; + + if (!bx::open(&writer, outFilePath) ) { - preprocessor.writef( - "#define gl_FrontFacing (__vface <= 0.0)\n" - ); + fprintf(stderr, "Unable to open output file '%s'.", outFilePath); + return EXIT_FAILURE; + } + + bx::write(&writer, preprocessor.m_preprocessed.c_str(), (int32_t)preprocessor.m_preprocessed.size() ); + bx::close(&writer); + + return EXIT_SUCCESS; + } + + { + bx::CrtFileWriter* writer = NULL; + + if (NULL != bin2c) + { + writer = new Bin2cWriter(bin2c); } else { - preprocessor.writef( - "#define gl_FrontFacing false\n" - ); + writer = new bx::CrtFileWriter; + } + + if (!bx::open(writer, outFilePath) ) + { + fprintf(stderr, "Unable to open output file '%s'.", outFilePath); + return EXIT_FAILURE; + } + + bx::write(writer, BGFX_CHUNK_MAGIC_CSH); + bx::write(writer, outputHash); + + if (0 != glsl + || 0 != essl) + { + std::string code; + + if (essl) + { + bx::stringPrintf(code, "#version 310 es\n"); + } + else + { + bx::stringPrintf(code, "#version %d\n", glsl == 0 ? 430 : glsl); + } + + code += preprocessor.m_preprocessed; + #if 1 + bx::write(writer, uint16_t(0) ); + + uint32_t shaderSize = (uint32_t)code.size(); + bx::write(writer, shaderSize); + bx::write(writer, code.c_str(), shaderSize); + bx::write(writer, uint8_t(0) ); + + compiled = true; + #else + compiled = compileGLSLShader(cmdLine, essl, code, writer); + #endif // 0 + } + else + { + compiled = compileHLSLShader(cmdLine, d3d, preprocessor.m_preprocessed, writer); + } + + bx::close(writer); + delete writer; + } + + if (compiled) + { + if (depends) + { + std::string ofp = outFilePath; + ofp += ".d"; + bx::CrtFileWriter writer; + if (bx::open(&writer, ofp.c_str() ) ) + { + writef(&writer, "%s : %s\n", outFilePath, preprocessor.m_depends.c_str() ); + bx::close(&writer); + } } } } - else if ('v' == shaderType) + } + } + else // Vertex/Fragment + { + char* entry = strstr(input, "void main()"); + if (NULL == entry) + { + fprintf(stderr, "Shader entry point 'void main()' is not found.\n"); + } + else + { + if (0 != glsl + || 0 != essl + || 0 != metal) { - const char* brace = strstr(entry, "{"); - if (NULL != brace) + if (120 == glsl + || 0 != essl) { - const char* end = bx::strmb(brace, '{', '}'); - if (NULL != end) - { - strInsert(const_cast(end), "__RETURN__;\n"); - } + preprocessor.writef( + "#define ivec2 vec2\n" + "#define ivec3 vec3\n" + "#define ivec4 vec4\n" + ); } - preprocessor.writef( - "struct Output\n" - "{\n" - "\tvec4 gl_Position : SV_POSITION;\n" - "#define gl_Position _varying_.gl_Position\n" - ); - for (InOut::const_iterator it = shaderOutputs.begin(), itEnd = shaderOutputs.end(); it != itEnd; ++it) + if (0 == essl) { - VaryingMap::const_iterator varyingIt = varyingMap.find(*it); - if (varyingIt != varyingMap.end() ) - { - const Varying& var = varyingIt->second; - preprocessor.writef("\t%s %s : %s;\n", var.m_type.c_str(), var.m_name.c_str(), var.m_semantics.c_str() ); - preprocessor.writef("#define %s _varying_.%s\n", var.m_name.c_str(), var.m_name.c_str() ); - } + // bgfx shadow2D/Proj behave like EXT_shadow_samplers + // not as GLSL language 1.2 specs shadow2D/Proj. + preprocessor.writef( + "#define shadow2D(_sampler, _coord) bgfxShadow2D(_sampler, _coord).x\n" + "#define shadow2DProj(_sampler, _coord) bgfxShadow2DProj(_sampler, _coord).x\n" + ); } - preprocessor.writef( - "};\n" - ); - preprocessor.writef("#define void_main() \\\n"); - preprocessor.writef("Output main("); - bool first = true; for (InOut::const_iterator it = shaderInputs.begin(), itEnd = shaderInputs.end(); it != itEnd; ++it) { VaryingMap::const_iterator varyingIt = varyingMap.find(*it); if (varyingIt != varyingMap.end() ) { const Varying& var = varyingIt->second; - preprocessor.writef("%s%s %s : %s\\\n", first ? "" : "\t, ", var.m_type.c_str(), var.m_name.c_str(), var.m_semantics.c_str() ); - first = false; + const char* name = var.m_name.c_str(); + + if (0 == strncmp(name, "a_", 2) + || 0 == strncmp(name, "i_", 2) ) + { + preprocessor.writef("attribute %s %s %s %s;\n" + , var.m_precision.c_str() + , var.m_interpolation.c_str() + , var.m_type.c_str() + , name + ); + } + else + { + preprocessor.writef("%s varying %s %s %s;\n" + , var.m_interpolation.c_str() + , var.m_precision.c_str() + , var.m_type.c_str() + , name + ); + } } } - preprocessor.writef( - ") \\\n" - "{ \\\n" - "\tOutput _varying_;" - ); for (InOut::const_iterator it = shaderOutputs.begin(), itEnd = shaderOutputs.end(); it != itEnd; ++it) { @@ -1597,218 +1392,450 @@ int main(int _argc, const char* _argv[]) if (varyingIt != varyingMap.end() ) { const Varying& var = varyingIt->second; - preprocessor.writef(" \\\n\t%s", var.m_name.c_str() ); - if (!var.m_init.empty() ) - { - preprocessor.writef(" = %s", var.m_init.c_str() ); - } - preprocessor.writef(";"); - } - } - - preprocessor.writef( - "\n#define __RETURN__ \\\n" - "\t} \\\n" - "\treturn _varying_" - ); - } - } - - if (preprocessor.run(input) ) - { - BX_TRACE("Input file: %s", filePath); - BX_TRACE("Output file: %s", outFilePath); - - if (preprocessOnly) - { - bx::CrtFileWriter writer; - - if (0 != writer.open(outFilePath) ) - { - fprintf(stderr, "Unable to open output file '%s'.", outFilePath); - return EXIT_FAILURE; - } - - if (0 != glsl) - { - if (NULL == profile) - { - writef(&writer - , "#ifdef GL_ES\n" - "precision highp float;\n" - "#endif // GL_ES\n\n" + preprocessor.writef("%s varying %s %s;\n" + , var.m_interpolation.c_str() + , var.m_type.c_str() + , var.m_name.c_str() ); } } - writer.write(preprocessor.m_preprocessed.c_str(), (int32_t)preprocessor.m_preprocessed.size() ); - writer.close(); - - return EXIT_SUCCESS; } - + else { - bx::CrtFileWriter* writer = NULL; + preprocessor.writef( + "#define lowp\n" + "#define mediump\n" + "#define highp\n" + "#define ivec2 int2\n" + "#define ivec3 int3\n" + "#define ivec4 int4\n" + "#define uvec2 uint2\n" + "#define uvec3 uint3\n" + "#define uvec4 uint4\n" + "#define vec2 float2\n" + "#define vec3 float3\n" + "#define vec4 float4\n" + "#define mat2 float2x2\n" + "#define mat3 float3x3\n" + "#define mat4 float4x4\n" + ); - if (NULL != bin2c) + if (hlsl < 4) { - writer = new Bin2cWriter(bin2c); - } - else - { - writer = new bx::CrtFileWriter; + preprocessor.writef( + "#define flat\n" + "#define smooth\n" + "#define noperspective\n" + ); } - if (0 != writer->open(outFilePath) ) - { - fprintf(stderr, "Unable to open output file '%s'.", outFilePath); - return EXIT_FAILURE; - } + entry[4] = '_'; if ('f' == shaderType) { - bx::write(writer, BGFX_CHUNK_MAGIC_FSH); - bx::write(writer, inputHash); - } - else if ('v' == shaderType) - { - bx::write(writer, BGFX_CHUNK_MAGIC_VSH); - bx::write(writer, outputHash); - } - else - { - bx::write(writer, BGFX_CHUNK_MAGIC_CSH); - bx::write(writer, outputHash); - } - - if (0 != glsl - || 0 != essl - || 0 != metal) - { - std::string code; - - bool hasTextureLod = NULL != bx::findIdentifierMatch(input, s_ARB_shader_texture_lod /*EXT_shader_texture_lod*/); - - if (0 == essl) + const char* brace = strstr(entry, "{"); + if (NULL != brace) { - const bool need130 = 120 == glsl - && bx::findIdentifierMatch(input, s_130) - ; + strInsert(const_cast(brace+1), "\nvec4 bgfx_VoidFrag;\n"); + } - if (0 != metal) + const bool hasFragCoord = NULL != strstr(input, "gl_FragCoord") || hlsl > 3 || hlsl == 2; + const bool hasFragDepth = NULL != strstr(input, "gl_FragDepth"); + const bool hasFrontFacing = NULL != strstr(input, "gl_FrontFacing"); + const bool hasPrimitiveId = NULL != strstr(input, "gl_PrimitiveID"); + + bool hasFragData[8] = {}; + uint32_t numFragData = 0; + for (uint32_t ii = 0; ii < BX_COUNTOF(hasFragData); ++ii) + { + char temp[32]; + bx::snprintf(temp, BX_COUNTOF(temp), "gl_FragData[%d]", ii); + hasFragData[ii] = NULL != strstr(input, temp); + numFragData += hasFragData[ii]; + } + + if (0 == numFragData) + { + // GL errors when both gl_FragColor and gl_FragData is used. + // This will trigger the same error with HLSL compiler too. + preprocessor.writef("#define gl_FragColor gl_FragData_0_\n"); + } + + preprocessor.writef("#define void_main()"); + preprocessor.writef(" \\\n\tvoid main("); + + uint32_t arg = 0; + + if (hasFragCoord) + { + preprocessor.writef(" \\\n\tvec4 gl_FragCoord : SV_POSITION"); + ++arg; + } + + for (InOut::const_iterator it = shaderInputs.begin(), itEnd = shaderInputs.end(); it != itEnd; ++it) + { + VaryingMap::const_iterator varyingIt = varyingMap.find(*it); + if (varyingIt != varyingMap.end() ) { - bx::stringPrintf(code, "#version 120\n"); + const Varying& var = varyingIt->second; + preprocessor.writef(" \\\n\t%s%s %s %s : %s" + , arg++ > 0 ? ", " : " " + , interpolationDx11(var.m_interpolation.c_str() ) + , var.m_type.c_str() + , var.m_name.c_str() + , var.m_semantics.c_str() + ); + } + } + + addFragData(preprocessor, input, 0, arg++ > 0); + + const uint32_t maxRT = d3d > 9 ? BX_COUNTOF(hasFragData) : 4; + + for (uint32_t ii = 1; ii < BX_COUNTOF(hasFragData); ++ii) + { + if (ii < maxRT) + { + if (hasFragData[ii]) + { + addFragData(preprocessor, input, ii, arg++ > 0); + } } else { - bx::stringPrintf(code, "#version %s\n", need130 ? "130" : profile); + voidFragData(input, ii); } + } - bx::stringPrintf(code - , "#define bgfxShadow2D shadow2D\n" - "#define bgfxShadow2DProj shadow2DProj\n" + if (hasFragDepth) + { + preprocessor.writef( + " \\\n\t%sout float gl_FragDepth : SV_DEPTH" + , arg++ > 0 ? ", " : " " ); + } - if (hasTextureLod - && 130 > glsl) + if (hasFrontFacing + && hlsl >= 3) + { + preprocessor.writef( + " \\\n\t%sfloat __vface : VFACE" + , arg++ > 0 ? ", " : " " + ); + } + + if (hasPrimitiveId) + { + if (d3d > 9) { - bx::stringPrintf(code - , "#extension GL_ARB_shader_texture_lod : enable\n" + preprocessor.writef( + " \\\n\t%suint gl_PrimitiveID : SV_PrimitiveID" + , arg++ > 0 ? ", " : " " ); } + else + { + fprintf(stderr, "PrimitiveID builtin is not supported by this D3D9 HLSL.\n"); + return EXIT_FAILURE; + } + } + + preprocessor.writef( + " \\\n\t)\n" + ); + + if (hasFrontFacing) + { + if (hlsl >= 3) + { + preprocessor.writef( + "#define gl_FrontFacing (__vface <= 0.0)\n" + ); + } + else + { + preprocessor.writef( + "#define gl_FrontFacing false\n" + ); + } + } + } + else if ('v' == shaderType) + { + const char* brace = strstr(entry, "{"); + if (NULL != brace) + { + const char* end = bx::strmb(brace, '{', '}'); + if (NULL != end) + { + strInsert(const_cast(end), "__RETURN__;\n"); + } + } + + preprocessor.writef( + "struct Output\n" + "{\n" + "\tvec4 gl_Position : SV_POSITION;\n" + "#define gl_Position _varying_.gl_Position\n" + ); + for (InOut::const_iterator it = shaderOutputs.begin(), itEnd = shaderOutputs.end(); it != itEnd; ++it) + { + VaryingMap::const_iterator varyingIt = varyingMap.find(*it); + if (varyingIt != varyingMap.end() ) + { + const Varying& var = varyingIt->second; + preprocessor.writef("\t%s %s : %s;\n", var.m_type.c_str(), var.m_name.c_str(), var.m_semantics.c_str() ); + preprocessor.writef("#define %s _varying_.%s\n", var.m_name.c_str(), var.m_name.c_str() ); + } + } + preprocessor.writef( + "};\n" + ); + + preprocessor.writef("#define void_main() \\\n"); + preprocessor.writef("Output main("); + bool first = true; + for (InOut::const_iterator it = shaderInputs.begin(), itEnd = shaderInputs.end(); it != itEnd; ++it) + { + VaryingMap::const_iterator varyingIt = varyingMap.find(*it); + if (varyingIt != varyingMap.end() ) + { + const Varying& var = varyingIt->second; + preprocessor.writef("%s%s %s : %s\\\n", first ? "" : "\t, ", var.m_type.c_str(), var.m_name.c_str(), var.m_semantics.c_str() ); + first = false; + } + } + preprocessor.writef( + ") \\\n" + "{ \\\n" + "\tOutput _varying_;" + ); + + for (InOut::const_iterator it = shaderOutputs.begin(), itEnd = shaderOutputs.end(); it != itEnd; ++it) + { + VaryingMap::const_iterator varyingIt = varyingMap.find(*it); + if (varyingIt != varyingMap.end() ) + { + const Varying& var = varyingIt->second; + preprocessor.writef(" \\\n\t%s", var.m_name.c_str() ); + if (!var.m_init.empty() ) + { + preprocessor.writef(" = %s", var.m_init.c_str() ); + } + preprocessor.writef(";"); + } + } + + preprocessor.writef( + "\n#define __RETURN__ \\\n" + "\t} \\\n" + "\treturn _varying_" + ); + } + } + + if (preprocessor.run(input) ) + { + BX_TRACE("Input file: %s", filePath); + BX_TRACE("Output file: %s", outFilePath); + + if (preprocessOnly) + { + bx::CrtFileWriter writer; + + if (!bx::open(&writer, outFilePath) ) + { + fprintf(stderr, "Unable to open output file '%s'.", outFilePath); + return EXIT_FAILURE; + } + + if (0 != glsl) + { + if (NULL == profile) + { + writef(&writer + , "#ifdef GL_ES\n" + "precision highp float;\n" + "#endif // GL_ES\n\n" + ); + } + } + bx::write(&writer, preprocessor.m_preprocessed.c_str(), (int32_t)preprocessor.m_preprocessed.size() ); + bx::close(&writer); + + return EXIT_SUCCESS; + } + + { + bx::CrtFileWriter* writer = NULL; + + if (NULL != bin2c) + { + writer = new Bin2cWriter(bin2c); } else { - // Pretend that all extensions are available. - // This will be stripped later. - if (hasTextureLod) - { - bx::stringPrintf(code - , "#extension GL_EXT_shader_texture_lod : enable\n" - "#define texture2DLod texture2DLodEXT\n" - "#define texture2DProjLod texture2DProjLodEXT\n" - "#define textureCubeLod textureCubeLodEXT\n" -// "#define texture2DGrad texture2DGradEXT\n" -// "#define texture2DProjGrad texture2DProjGradEXT\n" -// "#define textureCubeGrad textureCubeGradEXT\n" - ); - } - - if (NULL != bx::findIdentifierMatch(input, s_OES_standard_derivatives) ) - { - bx::stringPrintf(code, "#extension GL_OES_standard_derivatives : enable\n"); - } - - if (NULL != bx::findIdentifierMatch(input, s_OES_texture_3D) ) - { - bx::stringPrintf(code, "#extension GL_OES_texture_3D : enable\n"); - } - - if (NULL != bx::findIdentifierMatch(input, s_EXT_shadow_samplers) ) - { - bx::stringPrintf(code - , "#extension GL_EXT_shadow_samplers : enable\n" - "#define shadow2D shadow2DEXT\n" - "#define shadow2DProj shadow2DProjEXT\n" - ); - } - - if (NULL != bx::findIdentifierMatch(input, "gl_FragDepth") ) - { - bx::stringPrintf(code - , "#extension GL_EXT_frag_depth : enable\n" - "#define gl_FragDepth gl_FragDepthEXT\n" - ); - } + writer = new bx::CrtFileWriter; } - code += preprocessor.m_preprocessed; - compiled = compileGLSLShader(cmdLine - , metal ? BX_MAKEFOURCC('M', 'T', 'L', 0) : essl - , code - , writer - ); - } - else - { - compiled = compileHLSLShader(cmdLine - , d3d - , preprocessor.m_preprocessed - , writer - ); - } - - writer->close(); - delete writer; - } - - if (compiled) - { - if (depends) - { - std::string ofp = outFilePath; - ofp += ".d"; - bx::CrtFileWriter writer; - if (0 == writer.open(ofp.c_str() ) ) + if (!bx::open(writer, outFilePath) ) { - writef(&writer, "%s : %s\n", outFilePath, preprocessor.m_depends.c_str() ); - writer.close(); + fprintf(stderr, "Unable to open output file '%s'.", outFilePath); + return EXIT_FAILURE; + } + + if ('f' == shaderType) + { + bx::write(writer, BGFX_CHUNK_MAGIC_FSH); + bx::write(writer, inputHash); + } + else if ('v' == shaderType) + { + bx::write(writer, BGFX_CHUNK_MAGIC_VSH); + bx::write(writer, outputHash); + } + else + { + bx::write(writer, BGFX_CHUNK_MAGIC_CSH); + bx::write(writer, outputHash); + } + + if (0 != glsl + || 0 != essl + || 0 != metal) + { + std::string code; + + bool hasTextureLod = NULL != bx::findIdentifierMatch(input, s_ARB_shader_texture_lod /*EXT_shader_texture_lod*/); + + if (0 == essl) + { + const bool need130 = 120 == glsl + && bx::findIdentifierMatch(input, s_130) + ; + + if (0 != metal) + { + bx::stringPrintf(code, "#version 120\n"); + } + else + { + bx::stringPrintf(code, "#version %s\n", need130 ? "130" : profile); + } + + bx::stringPrintf(code + , "#define bgfxShadow2D shadow2D\n" + "#define bgfxShadow2DProj shadow2DProj\n" + ); + + if (hasTextureLod + && 130 > glsl) + { + bx::stringPrintf(code + , "#extension GL_ARB_shader_texture_lod : enable\n" + ); + } + } + else + { + // Pretend that all extensions are available. + // This will be stripped later. + if (hasTextureLod) + { + bx::stringPrintf(code + , "#extension GL_EXT_shader_texture_lod : enable\n" + "#define texture2DLod texture2DLodEXT\n" + "#define texture2DProjLod texture2DProjLodEXT\n" + "#define textureCubeLod textureCubeLodEXT\n" + // "#define texture2DGrad texture2DGradEXT\n" + // "#define texture2DProjGrad texture2DProjGradEXT\n" + // "#define textureCubeGrad textureCubeGradEXT\n" + ); + } + + if (NULL != bx::findIdentifierMatch(input, s_OES_standard_derivatives) ) + { + bx::stringPrintf(code, "#extension GL_OES_standard_derivatives : enable\n"); + } + + if (NULL != bx::findIdentifierMatch(input, s_OES_texture_3D) ) + { + bx::stringPrintf(code, "#extension GL_OES_texture_3D : enable\n"); + } + + if (NULL != bx::findIdentifierMatch(input, s_EXT_shadow_samplers) ) + { + bx::stringPrintf(code + , "#extension GL_EXT_shadow_samplers : enable\n" + "#define shadow2D shadow2DEXT\n" + "#define shadow2DProj shadow2DProjEXT\n" + ); + } + + if (NULL != bx::findIdentifierMatch(input, "gl_FragDepth") ) + { + bx::stringPrintf(code + , "#extension GL_EXT_frag_depth : enable\n" + "#define gl_FragDepth gl_FragDepthEXT\n" + ); + } + } + + code += preprocessor.m_preprocessed; + compiled = compileGLSLShader(cmdLine + , metal ? BX_MAKEFOURCC('M', 'T', 'L', 0) : essl + , code + , writer + ); + } + else + { + compiled = compileHLSLShader(cmdLine + , d3d + , preprocessor.m_preprocessed + , writer + ); + } + + bx::close(writer); + delete writer; + } + + if (compiled) + { + if (depends) + { + std::string ofp = outFilePath; + ofp += ".d"; + bx::CrtFileWriter writer; + if (bx::open(&writer, ofp.c_str() ) ) + { + writef(&writer, "%s : %s\n", outFilePath, preprocessor.m_depends.c_str() ); + bx::close(&writer); + } } } } } } + + delete [] data; } - delete [] data; + if (compiled) + { + return EXIT_SUCCESS; + } + + remove(outFilePath); + + fprintf(stderr, "Failed to build shader.\n"); + return EXIT_FAILURE; } - if (compiled) - { - return EXIT_SUCCESS; - } +} // namespace bgfx - remove(outFilePath); - - fprintf(stderr, "Failed to build shader.\n"); - return EXIT_FAILURE; +int main(int _argc, const char* _argv[]) +{ + return bgfx::compileShader(_argc, _argv); } diff --git a/3rdparty/bgfx/tools/shaderc/shaderc.h b/3rdparty/bgfx/tools/shaderc/shaderc.h index b7818ff1867..29bf450e474 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc.h +++ b/3rdparty/bgfx/tools/shaderc/shaderc.h @@ -6,9 +6,14 @@ #ifndef SHADERC_H_HEADER_GUARD #define SHADERC_H_HEADER_GUARD +namespace bgfx +{ + extern bool g_verbose; +} + #define _BX_TRACE(_format, ...) \ BX_MACRO_BLOCK_BEGIN \ - if (g_verbose) \ + if (bgfx::g_verbose) \ { \ fprintf(stderr, BX_FILE_LINE_LITERAL "" _format "\n", ##__VA_ARGS__); \ } \ @@ -39,8 +44,6 @@ # define SHADERC_CONFIG_HLSL BX_PLATFORM_WINDOWS #endif // SHADERC_CONFIG_HLSL -extern bool g_verbose; - #include #include #include @@ -61,83 +64,74 @@ extern bool g_verbose; #include #include "../../src/vertexdecl.h" -class LineReader +namespace bgfx { -public: - LineReader(const char* _str) - : m_str(_str) - , m_pos(0) - , m_size((uint32_t)strlen(_str)) + extern bool g_verbose; + + class LineReader { - } + public: + LineReader(const char* _str) + : m_str(_str) + , m_pos(0) + , m_size((uint32_t)strlen(_str)) + { + } - std::string getLine() - { - const char* str = &m_str[m_pos]; - skipLine(); + std::string getLine() + { + const char* str = &m_str[m_pos]; + skipLine(); - const char* eol = &m_str[m_pos]; + const char* eol = &m_str[m_pos]; - std::string tmp; - tmp.assign(str, eol - str); - return tmp; - } + std::string tmp; + tmp.assign(str, eol - str); + return tmp; + } - bool isEof() const - { - return m_str[m_pos] == '\0'; - } + bool isEof() const + { + return m_str[m_pos] == '\0'; + } - void skipLine() - { - const char* str = &m_str[m_pos]; - const char* nl = bx::strnl(str); - m_pos += (uint32_t)(nl - str); - } + void skipLine() + { + const char* str = &m_str[m_pos]; + const char* nl = bx::strnl(str); + m_pos += (uint32_t)(nl - str); + } - const char* m_str; - uint32_t m_pos; - uint32_t m_size; -}; - -struct UniformType -{ - enum Enum - { - Int1, - End, - - Vec4, - Mat3, - Mat4, - - Count + const char* m_str; + uint32_t m_pos; + uint32_t m_size; }; -}; -#define BGFX_UNIFORM_FRAGMENTBIT UINT8_C(0x10) -#define BGFX_UNIFORM_SAMPLERBIT UINT8_C(0x20) + #define BGFX_UNIFORM_FRAGMENTBIT UINT8_C(0x10) + #define BGFX_UNIFORM_SAMPLERBIT UINT8_C(0x20) -const char* getUniformTypeName(UniformType::Enum _enum); -UniformType::Enum nameToUniformTypeEnum(const char* _name); + const char* getUniformTypeName(UniformType::Enum _enum); + UniformType::Enum nameToUniformTypeEnum(const char* _name); -struct Uniform -{ - std::string name; - UniformType::Enum type; - uint8_t num; - uint16_t regIndex; - uint16_t regCount; -}; + struct Uniform + { + std::string name; + UniformType::Enum type; + uint8_t num; + uint16_t regIndex; + uint16_t regCount; + }; -typedef std::vector UniformArray; + typedef std::vector UniformArray; -void printCode(const char* _code, int32_t _line = 0, int32_t _start = 0, int32_t _end = INT32_MAX); -void strReplace(char* _str, const char* _find, const char* _replace); -int32_t writef(bx::WriterI* _writer, const char* _format, ...); -void writeFile(const char* _filePath, const void* _data, int32_t _size); + void printCode(const char* _code, int32_t _line = 0, int32_t _start = 0, int32_t _end = INT32_MAX); + void strReplace(char* _str, const char* _find, const char* _replace); + int32_t writef(bx::WriterI* _writer, const char* _format, ...); + void writeFile(const char* _filePath, const void* _data, int32_t _size); -bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _d3d, const std::string& _code, bx::WriterI* _writer, bool firstPass = true); -bool compileGLSLShader(bx::CommandLine& _cmdLine, uint32_t _gles, const std::string& _code, bx::WriterI* _writer); + bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _d3d, const std::string& _code, bx::WriterI* _writer, bool firstPass = true); + bool compileGLSLShader(bx::CommandLine& _cmdLine, uint32_t _gles, const std::string& _code, bx::WriterI* _writer); + +} // namespace bgfx #endif // SHADERC_H_HEADER_GUARD diff --git a/3rdparty/bgfx/tools/shaderc/shaderc_glsl.cpp b/3rdparty/bgfx/tools/shaderc/shaderc_glsl.cpp index 674b19d16fd..0a4ce15d937 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc_glsl.cpp +++ b/3rdparty/bgfx/tools/shaderc/shaderc_glsl.cpp @@ -6,207 +6,211 @@ #include "shaderc.h" #include "glsl_optimizer.h" -bool compileGLSLShader(bx::CommandLine& _cmdLine, uint32_t _gles, const std::string& _code, bx::WriterI* _writer) +namespace bgfx { - char ch = tolower(_cmdLine.findOption('\0', "type")[0]); - const glslopt_shader_type type = ch == 'f' - ? kGlslOptShaderFragment - : (ch == 'c' ? kGlslOptShaderCompute : kGlslOptShaderVertex); - - glslopt_target target = kGlslTargetOpenGL; - switch (_gles) + bool compileGLSLShader(bx::CommandLine& _cmdLine, uint32_t _gles, const std::string& _code, bx::WriterI* _writer) { - case BX_MAKEFOURCC('M', 'T', 'L', 0): - target = kGlslTargetMetal; - break; + char ch = tolower(_cmdLine.findOption('\0', "type")[0]); + const glslopt_shader_type type = ch == 'f' + ? kGlslOptShaderFragment + : (ch == 'c' ? kGlslOptShaderCompute : kGlslOptShaderVertex); - case 2: - target = kGlslTargetOpenGLES20; - break; - - case 3: - target = kGlslTargetOpenGLES30; - break; - - default: - target = kGlslTargetOpenGL; - break; - } - - glslopt_ctx* ctx = glslopt_initialize(target); - - glslopt_shader* shader = glslopt_optimize(ctx, type, _code.c_str(), 0); - - if (!glslopt_get_status(shader) ) - { - const char* log = glslopt_get_log(shader); - int32_t source = 0; - int32_t line = 0; - int32_t column = 0; - int32_t start = 0; - int32_t end = INT32_MAX; - - if (3 == sscanf(log, "%u:%u(%u):", &source, &line, &column) - && 0 != line) + glslopt_target target = kGlslTargetOpenGL; + switch (_gles) { - start = bx::uint32_imax(1, line-10); - end = start + 20; + case BX_MAKEFOURCC('M', 'T', 'L', 0): + target = kGlslTargetMetal; + break; + + case 2: + target = kGlslTargetOpenGLES20; + break; + + case 3: + target = kGlslTargetOpenGLES30; + break; + + default: + target = kGlslTargetOpenGL; + break; } - printCode(_code.c_str(), line, start, end); - fprintf(stderr, "Error: %s\n", log); - glslopt_cleanup(ctx); - return false; - } + glslopt_ctx* ctx = glslopt_initialize(target); - const char* optimizedShader = glslopt_get_output(shader); + glslopt_shader* shader = glslopt_optimize(ctx, type, _code.c_str(), 0); - // Trim all directives. - while ('#' == *optimizedShader) - { - optimizedShader = bx::strnl(optimizedShader); - } - - if (0 != _gles) - { - char* code = const_cast(optimizedShader); - strReplace(code, "gl_FragDepthEXT", "gl_FragDepth"); - - strReplace(code, "texture2DLodEXT", "texture2DLod"); - strReplace(code, "texture2DProjLodEXT", "texture2DProjLod"); - strReplace(code, "textureCubeLodEXT", "textureCubeLod"); - strReplace(code, "texture2DGradEXT", "texture2DGrad"); - strReplace(code, "texture2DProjGradEXT", "texture2DProjGrad"); - strReplace(code, "textureCubeGradEXT", "textureCubeGrad"); - - strReplace(code, "shadow2DEXT", "shadow2D"); - strReplace(code, "shadow2DProjEXT", "shadow2DProj"); - } - - UniformArray uniforms; - - { - const char* parse = optimizedShader; - - while (NULL != parse - && *parse != '\0') + if (!glslopt_get_status(shader) ) { - parse = bx::strws(parse); - const char* eol = strchr(parse, ';'); - if (NULL != eol) + const char* log = glslopt_get_log(shader); + int32_t source = 0; + int32_t line = 0; + int32_t column = 0; + int32_t start = 0; + int32_t end = INT32_MAX; + + if (3 == sscanf(log, "%u:%u(%u):", &source, &line, &column) + && 0 != line) { - const char* qualifier = parse; - parse = bx::strws(bx::strword(parse) ); + start = bx::uint32_imax(1, line-10); + end = start + 20; + } - if (0 == strncmp(qualifier, "attribute", 9) - || 0 == strncmp(qualifier, "varying", 7) ) + printCode(_code.c_str(), line, start, end); + fprintf(stderr, "Error: %s\n", log); + glslopt_cleanup(ctx); + return false; + } + + const char* optimizedShader = glslopt_get_output(shader); + + // Trim all directives. + while ('#' == *optimizedShader) + { + optimizedShader = bx::strnl(optimizedShader); + } + + if (0 != _gles) + { + char* code = const_cast(optimizedShader); + strReplace(code, "gl_FragDepthEXT", "gl_FragDepth"); + + strReplace(code, "texture2DLodEXT", "texture2DLod"); + strReplace(code, "texture2DProjLodEXT", "texture2DProjLod"); + strReplace(code, "textureCubeLodEXT", "textureCubeLod"); + strReplace(code, "texture2DGradEXT", "texture2DGrad"); + strReplace(code, "texture2DProjGradEXT", "texture2DProjGrad"); + strReplace(code, "textureCubeGradEXT", "textureCubeGrad"); + + strReplace(code, "shadow2DEXT", "shadow2D"); + strReplace(code, "shadow2DProjEXT", "shadow2DProj"); + } + + UniformArray uniforms; + + { + const char* parse = optimizedShader; + + while (NULL != parse + && *parse != '\0') + { + parse = bx::strws(parse); + const char* eol = strchr(parse, ';'); + if (NULL != eol) { - // skip attributes and varyings. + const char* qualifier = parse; + parse = bx::strws(bx::strword(parse) ); + + if (0 == strncmp(qualifier, "attribute", 9) + || 0 == strncmp(qualifier, "varying", 7) ) + { + // skip attributes and varyings. + parse = eol + 1; + continue; + } + + if (0 != strncmp(qualifier, "uniform", 7) ) + { + // end if there is no uniform keyword. + parse = NULL; + continue; + } + + const char* precision = NULL; + const char* typen = parse; + + if (0 == strncmp(typen, "lowp", 4) + || 0 == strncmp(typen, "mediump", 7) + || 0 == strncmp(typen, "highp", 5) ) + { + precision = typen; + typen = parse = bx::strws(bx::strword(parse) ); + } + + BX_UNUSED(precision); + + char uniformType[256]; + parse = bx::strword(parse); + + if (0 == strncmp(typen, "sampler", 7) ) + { + strcpy(uniformType, "int"); + } + else + { + bx::strlcpy(uniformType, typen, parse-typen+1); + } + + const char* name = parse = bx::strws(parse); + + char uniformName[256]; + uint8_t num = 1; + const char* array = bx::strnstr(name, "[", eol-parse); + if (NULL != array) + { + bx::strlcpy(uniformName, name, array-name+1); + + char arraySize[32]; + const char* end = bx::strnstr(array, "]", eol-array); + bx::strlcpy(arraySize, array+1, end-array); + num = atoi(arraySize); + } + else + { + bx::strlcpy(uniformName, name, eol-name+1); + } + + Uniform un; + un.type = nameToUniformTypeEnum(uniformType); + + if (UniformType::Count != un.type) + { + BX_TRACE("name: %s (type %d, num %d)", uniformName, un.type, num); + + un.name = uniformName; + un.num = num; + un.regIndex = 0; + un.regCount = num; + uniforms.push_back(un); + } + parse = eol + 1; - continue; } - - if (0 != strncmp(qualifier, "uniform", 7) ) - { - // end if there is no uniform keyword. - parse = NULL; - continue; - } - - const char* precision = NULL; - const char* typen = parse; - - if (0 == strncmp(typen, "lowp", 4) - || 0 == strncmp(typen, "mediump", 7) - || 0 == strncmp(typen, "highp", 5) ) - { - precision = typen; - typen = parse = bx::strws(bx::strword(parse) ); - } - - BX_UNUSED(precision); - - char uniformType[256]; - parse = bx::strword(parse); - - if (0 == strncmp(typen, "sampler", 7) ) - { - strcpy(uniformType, "int"); - } - else - { - bx::strlcpy(uniformType, typen, parse-typen+1); - } - - const char* name = parse = bx::strws(parse); - - char uniformName[256]; - uint8_t num = 1; - const char* array = bx::strnstr(name, "[", eol-parse); - if (NULL != array) - { - bx::strlcpy(uniformName, name, array-name+1); - - char arraySize[32]; - const char* end = bx::strnstr(array, "]", eol-array); - bx::strlcpy(arraySize, array+1, end-array); - num = atoi(arraySize); - } - else - { - bx::strlcpy(uniformName, name, eol-name+1); - } - - Uniform un; - un.type = nameToUniformTypeEnum(uniformType); - - if (UniformType::Count != un.type) - { - BX_TRACE("name: %s (type %d, num %d)", uniformName, un.type, num); - - un.name = uniformName; - un.num = num; - un.regIndex = 0; - un.regCount = num; - uniforms.push_back(un); - } - - parse = eol + 1; } } + + uint16_t count = (uint16_t)uniforms.size(); + bx::write(_writer, count); + + for (UniformArray::const_iterator it = uniforms.begin(); it != uniforms.end(); ++it) + { + const Uniform& un = *it; + uint8_t nameSize = (uint8_t)un.name.size(); + bx::write(_writer, nameSize); + bx::write(_writer, un.name.c_str(), nameSize); + uint8_t uniformType = un.type; + bx::write(_writer, uniformType); + bx::write(_writer, un.num); + bx::write(_writer, un.regIndex); + bx::write(_writer, un.regCount); + + BX_TRACE("%s, %s, %d, %d, %d" + , un.name.c_str() + , getUniformTypeName(un.type) + , un.num + , un.regIndex + , un.regCount + ); + } + + uint32_t shaderSize = (uint32_t)strlen(optimizedShader); + bx::write(_writer, shaderSize); + bx::write(_writer, optimizedShader, shaderSize); + uint8_t nul = 0; + bx::write(_writer, nul); + + glslopt_cleanup(ctx); + + return true; } - uint16_t count = (uint16_t)uniforms.size(); - bx::write(_writer, count); - - for (UniformArray::const_iterator it = uniforms.begin(); it != uniforms.end(); ++it) - { - const Uniform& un = *it; - uint8_t nameSize = (uint8_t)un.name.size(); - bx::write(_writer, nameSize); - bx::write(_writer, un.name.c_str(), nameSize); - uint8_t uniformType = un.type; - bx::write(_writer, uniformType); - bx::write(_writer, un.num); - bx::write(_writer, un.regIndex); - bx::write(_writer, un.regCount); - - BX_TRACE("%s, %s, %d, %d, %d" - , un.name.c_str() - , getUniformTypeName(un.type) - , un.num - , un.regIndex - , un.regCount - ); - } - - uint32_t shaderSize = (uint32_t)strlen(optimizedShader); - bx::write(_writer, shaderSize); - bx::write(_writer, optimizedShader, shaderSize); - uint8_t nul = 0; - bx::write(_writer, nul); - - glslopt_cleanup(ctx); - - return true; -} +} // namespace bgfx diff --git a/3rdparty/bgfx/tools/shaderc/shaderc_hlsl.cpp b/3rdparty/bgfx/tools/shaderc/shaderc_hlsl.cpp index cdac5edd7b3..8f861047ded 100644 --- a/3rdparty/bgfx/tools/shaderc/shaderc_hlsl.cpp +++ b/3rdparty/bgfx/tools/shaderc/shaderc_hlsl.cpp @@ -7,677 +7,796 @@ #if SHADERC_CONFIG_HLSL -#define INITGUID +#if defined(__MINGW32__) +# define __REQUIRED_RPCNDR_H_VERSION__ 475 +# define __in +# define __out +#endif // defined(__MINGW32__) + #include #include +#include #ifndef D3D_SVF_USED # define D3D_SVF_USED 2 #endif // D3D_SVF_USED -struct CTHeader +namespace bgfx { - uint32_t Size; - uint32_t Creator; - uint32_t Version; - uint32_t Constants; - uint32_t ConstantInfo; - uint32_t Flags; - uint32_t Target; -}; + typedef HRESULT(WINAPI* PFN_D3D_COMPILE)(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData + , _In_ SIZE_T SrcDataSize + , _In_opt_ LPCSTR pSourceName + , _In_reads_opt_(_Inexpressible_(pDefines->Name != NULL) ) CONST D3D_SHADER_MACRO* pDefines + , _In_opt_ ID3DInclude* pInclude + , _In_opt_ LPCSTR pEntrypoint + , _In_ LPCSTR pTarget + , _In_ UINT Flags1 + , _In_ UINT Flags2 + , _Out_ ID3DBlob** ppCode + , _Always_(_Outptr_opt_result_maybenull_) ID3DBlob** ppErrorMsgs + ); -struct CTInfo -{ - uint32_t Name; - uint16_t RegisterSet; - uint16_t RegisterIndex; - uint16_t RegisterCount; - uint16_t Reserved; - uint32_t TypeInfo; - uint32_t DefaultValue; -}; + typedef HRESULT(WINAPI* PFN_D3D_DISASSEMBLE)(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData + , _In_ SIZE_T SrcDataSize + , _In_ UINT Flags + , _In_opt_ LPCSTR szComments + , _Out_ ID3DBlob** ppDisassembly + ); -struct CTType -{ - uint16_t Class; - uint16_t Type; - uint16_t Rows; - uint16_t Columns; - uint16_t Elements; - uint16_t StructMembers; - uint32_t StructMemberInfo; -}; + typedef HRESULT(WINAPI* PFN_D3D_REFLECT)(_In_reads_bytes_(SrcDataSize) LPCVOID pSrcData + , _In_ SIZE_T SrcDataSize + , _In_ REFIID pInterface + , _Out_ void** ppReflector + ); -struct RemapInputSemantic -{ - bgfx::Attrib::Enum m_attr; - const char* m_name; - uint8_t m_index; -}; + typedef HRESULT(WINAPI* PFN_D3D_STRIP_SHADER)(_In_reads_bytes_(BytecodeLength) LPCVOID pShaderBytecode + , _In_ SIZE_T BytecodeLength + , _In_ UINT uStripFlags + , _Out_ ID3DBlob** ppStrippedBlob + ); -static const RemapInputSemantic s_remapInputSemantic[bgfx::Attrib::Count+1] = -{ - { bgfx::Attrib::Position, "POSITION", 0 }, - { bgfx::Attrib::Normal, "NORMAL", 0 }, - { bgfx::Attrib::Tangent, "TANGENT", 0 }, - { bgfx::Attrib::Bitangent, "BITANGENT", 0 }, - { bgfx::Attrib::Color0, "COLOR", 0 }, - { bgfx::Attrib::Color1, "COLOR", 1 }, - { bgfx::Attrib::Indices, "BLENDINDICES", 0 }, - { bgfx::Attrib::Weight, "BLENDWEIGHT", 0 }, - { bgfx::Attrib::TexCoord0, "TEXCOORD", 0 }, - { bgfx::Attrib::TexCoord1, "TEXCOORD", 1 }, - { bgfx::Attrib::TexCoord2, "TEXCOORD", 2 }, - { bgfx::Attrib::TexCoord3, "TEXCOORD", 3 }, - { bgfx::Attrib::TexCoord4, "TEXCOORD", 4 }, - { bgfx::Attrib::TexCoord5, "TEXCOORD", 5 }, - { bgfx::Attrib::TexCoord6, "TEXCOORD", 6 }, - { bgfx::Attrib::TexCoord7, "TEXCOORD", 7 }, - { bgfx::Attrib::Count, "", 0 }, -}; + PFN_D3D_COMPILE D3DCompile; + PFN_D3D_DISASSEMBLE D3DDisassemble; + PFN_D3D_REFLECT D3DReflect; + PFN_D3D_STRIP_SHADER D3DStripShader; -const RemapInputSemantic& findInputSemantic(const char* _name, uint8_t _index) -{ - for (uint32_t ii = 0; ii < bgfx::Attrib::Count; ++ii) + struct D3DCompiler { - const RemapInputSemantic& ris = s_remapInputSemantic[ii]; - if (0 == strcmp(ris.m_name, _name) - && ris.m_index == _index) - { - return ris; - } - } + const char* fileName; + const GUID IID_ID3D11ShaderReflection; + }; - return s_remapInputSemantic[bgfx::Attrib::Count]; -} + static const D3DCompiler s_d3dcompiler[] = + { // BK - the only different in interface is GetRequiresFlags at the end + // of IID_ID3D11ShaderReflection47 (which is not used anyway). + { "D3DCompiler_47.dll", { 0x8d536ca1, 0x0cca, 0x4956, { 0xa8, 0x37, 0x78, 0x69, 0x63, 0x75, 0x55, 0x84 } } }, + { "D3DCompiler_46.dll", { 0x0a233719, 0x3960, 0x4578, { 0x9d, 0x7c, 0x20, 0x3b, 0x8b, 0x1d, 0x9c, 0xc1 } } }, + { "D3DCompiler_45.dll", { 0x0a233719, 0x3960, 0x4578, { 0x9d, 0x7c, 0x20, 0x3b, 0x8b, 0x1d, 0x9c, 0xc1 } } }, + { "D3DCompiler_44.dll", { 0x0a233719, 0x3960, 0x4578, { 0x9d, 0x7c, 0x20, 0x3b, 0x8b, 0x1d, 0x9c, 0xc1 } } }, + { "D3DCompiler_43.dll", { 0x0a233719, 0x3960, 0x4578, { 0x9d, 0x7c, 0x20, 0x3b, 0x8b, 0x1d, 0x9c, 0xc1 } } }, + }; -struct UniformRemap -{ - UniformType::Enum id; - D3D_SHADER_VARIABLE_CLASS paramClass; - D3D_SHADER_VARIABLE_TYPE paramType; - uint8_t columns; - uint8_t rows; -}; + static const D3DCompiler* s_compiler; + static void* s_d3dcompilerdll; -static const UniformRemap s_uniformRemap[] = -{ - { UniformType::Int1, D3D_SVC_SCALAR, D3D_SVT_INT, 0, 0 }, - { UniformType::Vec4, D3D_SVC_VECTOR, D3D_SVT_FLOAT, 0, 0 }, - { UniformType::Mat3, D3D_SVC_MATRIX_COLUMNS, D3D_SVT_FLOAT, 3, 3 }, - { UniformType::Mat4, D3D_SVC_MATRIX_COLUMNS, D3D_SVT_FLOAT, 4, 4 }, - { UniformType::Int1, D3D_SVC_OBJECT, D3D_SVT_SAMPLER, 0, 0 }, - { UniformType::Int1, D3D_SVC_OBJECT, D3D_SVT_SAMPLER2D, 0, 0 }, - { UniformType::Int1, D3D_SVC_OBJECT, D3D_SVT_SAMPLER3D, 0, 0 }, - { UniformType::Int1, D3D_SVC_OBJECT, D3D_SVT_SAMPLERCUBE, 0, 0 }, -}; - -UniformType::Enum findUniformType(const D3D11_SHADER_TYPE_DESC& constDesc) -{ - for (uint32_t ii = 0; ii < BX_COUNTOF(s_uniformRemap); ++ii) + const D3DCompiler* load() { - const UniformRemap& remap = s_uniformRemap[ii]; - - if (remap.paramClass == constDesc.Class - && remap.paramType == constDesc.Type) + for (uint32_t ii = 0; ii < BX_COUNTOF(s_d3dcompiler); ++ii) { - if (D3D_SVC_MATRIX_COLUMNS != constDesc.Class) + const D3DCompiler* compiler = &s_d3dcompiler[ii]; + s_d3dcompilerdll = bx::dlopen(compiler->fileName); + if (NULL == s_d3dcompilerdll) { - return remap.id; + continue; } - if (remap.columns == constDesc.Columns - && remap.rows == constDesc.Rows) + D3DCompile = (PFN_D3D_COMPILE )bx::dlsym(s_d3dcompilerdll, "D3DCompile"); + D3DDisassemble = (PFN_D3D_DISASSEMBLE )bx::dlsym(s_d3dcompilerdll, "D3DDisassemble"); + D3DReflect = (PFN_D3D_REFLECT )bx::dlsym(s_d3dcompilerdll, "D3DReflect"); + D3DStripShader = (PFN_D3D_STRIP_SHADER)bx::dlsym(s_d3dcompilerdll, "D3DStripShader"); + + if (NULL == D3DCompile + || NULL == D3DDisassemble + || NULL == D3DReflect + || NULL == D3DStripShader) { - return remap.id; + bx::dlclose(s_d3dcompilerdll); + continue; } - } - } - return UniformType::Count; -} - -static uint32_t s_optimizationLevelDx11[4] = -{ - D3DCOMPILE_OPTIMIZATION_LEVEL0, - D3DCOMPILE_OPTIMIZATION_LEVEL1, - D3DCOMPILE_OPTIMIZATION_LEVEL2, - D3DCOMPILE_OPTIMIZATION_LEVEL3, -}; - -typedef std::vector UniformNameList; - -static bool isSampler(D3D_SHADER_VARIABLE_TYPE _svt) -{ - switch (_svt) - { - case D3D_SVT_SAMPLER: - case D3D_SVT_SAMPLER1D: - case D3D_SVT_SAMPLER2D: - case D3D_SVT_SAMPLER3D: - case D3D_SVT_SAMPLERCUBE: - return true; - - default: - break; - } - - return false; -} - -bool getReflectionDataDx9(ID3DBlob* _code, UniformArray& _uniforms) -{ - // see reference for magic values: https://msdn.microsoft.com/en-us/library/ff552891(VS.85).aspx - const uint32_t D3DSIO_COMMENT = 0x0000FFFE; - const uint32_t D3DSIO_END = 0x0000FFFF; - const uint32_t D3DSI_OPCODE_MASK = 0x0000FFFF; - const uint32_t D3DSI_COMMENTSIZE_MASK = 0x7FFF0000; - const uint32_t CTAB_CONSTANT = MAKEFOURCC('C','T','A','B'); - - // parse the shader blob for the constant table - const size_t codeSize = _code->GetBufferSize(); - const uint32_t* ptr = (const uint32_t*)_code->GetBufferPointer(); - const uint32_t* end = (const uint32_t*)( (const uint8_t*)ptr + codeSize); - const CTHeader* header = NULL; - - ptr++; // first byte is shader type / version; skip it since we already know - - while (ptr < end && *ptr != D3DSIO_END) - { - uint32_t cur = *ptr++; - if ( (cur & D3DSI_OPCODE_MASK) != D3DSIO_COMMENT) - { - continue; + BX_TRACE("Loaded %s compiler.", compiler->fileName); + return compiler; } - // try to find CTAB comment block - uint32_t commentSize = (cur & D3DSI_COMMENTSIZE_MASK) >> 16; - uint32_t fourcc = *ptr; - if (fourcc == CTAB_CONSTANT) + fprintf(stderr, "Error: Unable to open D3DCompiler_*.dll shader compiler.\n"); + return NULL; + } + + void unload() + { + bx::dlclose(s_d3dcompilerdll); + } + + struct CTHeader + { + uint32_t Size; + uint32_t Creator; + uint32_t Version; + uint32_t Constants; + uint32_t ConstantInfo; + uint32_t Flags; + uint32_t Target; + }; + + struct CTInfo + { + uint32_t Name; + uint16_t RegisterSet; + uint16_t RegisterIndex; + uint16_t RegisterCount; + uint16_t Reserved; + uint32_t TypeInfo; + uint32_t DefaultValue; + }; + + struct CTType + { + uint16_t Class; + uint16_t Type; + uint16_t Rows; + uint16_t Columns; + uint16_t Elements; + uint16_t StructMembers; + uint32_t StructMemberInfo; + }; + + struct RemapInputSemantic + { + bgfx::Attrib::Enum m_attr; + const char* m_name; + uint8_t m_index; + }; + + static const RemapInputSemantic s_remapInputSemantic[bgfx::Attrib::Count + 1] = + { + { bgfx::Attrib::Position, "POSITION", 0 }, + { bgfx::Attrib::Normal, "NORMAL", 0 }, + { bgfx::Attrib::Tangent, "TANGENT", 0 }, + { bgfx::Attrib::Bitangent, "BITANGENT", 0 }, + { bgfx::Attrib::Color0, "COLOR", 0 }, + { bgfx::Attrib::Color1, "COLOR", 1 }, + { bgfx::Attrib::Indices, "BLENDINDICES", 0 }, + { bgfx::Attrib::Weight, "BLENDWEIGHT", 0 }, + { bgfx::Attrib::TexCoord0, "TEXCOORD", 0 }, + { bgfx::Attrib::TexCoord1, "TEXCOORD", 1 }, + { bgfx::Attrib::TexCoord2, "TEXCOORD", 2 }, + { bgfx::Attrib::TexCoord3, "TEXCOORD", 3 }, + { bgfx::Attrib::TexCoord4, "TEXCOORD", 4 }, + { bgfx::Attrib::TexCoord5, "TEXCOORD", 5 }, + { bgfx::Attrib::TexCoord6, "TEXCOORD", 6 }, + { bgfx::Attrib::TexCoord7, "TEXCOORD", 7 }, + { bgfx::Attrib::Count, "", 0 }, + }; + + const RemapInputSemantic& findInputSemantic(const char* _name, uint8_t _index) + { + for (uint32_t ii = 0; ii < bgfx::Attrib::Count; ++ii) { - // found the constant table data - header = (const CTHeader*)(ptr + 1); - uint32_t tableSize = (commentSize - 1) * 4; - if (tableSize < sizeof(CTHeader) || header->Size != sizeof(CTHeader) ) + const RemapInputSemantic& ris = s_remapInputSemantic[ii]; + if (0 == strcmp(ris.m_name, _name) + && ris.m_index == _index) { - fprintf(stderr, "Error: Invalid constant table data\n"); - return false; + return ris; } + } + + return s_remapInputSemantic[bgfx::Attrib::Count]; + } + + struct UniformRemap + { + UniformType::Enum id; + D3D_SHADER_VARIABLE_CLASS paramClass; + D3D_SHADER_VARIABLE_TYPE paramType; + uint8_t columns; + uint8_t rows; + }; + + static const UniformRemap s_uniformRemap[] = + { + { UniformType::Int1, D3D_SVC_SCALAR, D3D_SVT_INT, 0, 0 }, + { UniformType::Vec4, D3D_SVC_VECTOR, D3D_SVT_FLOAT, 0, 0 }, + { UniformType::Mat3, D3D_SVC_MATRIX_COLUMNS, D3D_SVT_FLOAT, 3, 3 }, + { UniformType::Mat4, D3D_SVC_MATRIX_COLUMNS, D3D_SVT_FLOAT, 4, 4 }, + { UniformType::Int1, D3D_SVC_OBJECT, D3D_SVT_SAMPLER, 0, 0 }, + { UniformType::Int1, D3D_SVC_OBJECT, D3D_SVT_SAMPLER2D, 0, 0 }, + { UniformType::Int1, D3D_SVC_OBJECT, D3D_SVT_SAMPLER3D, 0, 0 }, + { UniformType::Int1, D3D_SVC_OBJECT, D3D_SVT_SAMPLERCUBE, 0, 0 }, + }; + + UniformType::Enum findUniformType(const D3D11_SHADER_TYPE_DESC& constDesc) + { + for (uint32_t ii = 0; ii < BX_COUNTOF(s_uniformRemap); ++ii) + { + const UniformRemap& remap = s_uniformRemap[ii]; + + if (remap.paramClass == constDesc.Class + && remap.paramType == constDesc.Type) + { + if (D3D_SVC_MATRIX_COLUMNS != constDesc.Class) + { + return remap.id; + } + + if (remap.columns == constDesc.Columns + && remap.rows == constDesc.Rows) + { + return remap.id; + } + } + } + + return UniformType::Count; + } + + static uint32_t s_optimizationLevelD3D11[4] = + { + D3DCOMPILE_OPTIMIZATION_LEVEL0, + D3DCOMPILE_OPTIMIZATION_LEVEL1, + D3DCOMPILE_OPTIMIZATION_LEVEL2, + D3DCOMPILE_OPTIMIZATION_LEVEL3, + }; + + typedef std::vector UniformNameList; + + static bool isSampler(D3D_SHADER_VARIABLE_TYPE _svt) + { + switch (_svt) + { + case D3D_SVT_SAMPLER: + case D3D_SVT_SAMPLER1D: + case D3D_SVT_SAMPLER2D: + case D3D_SVT_SAMPLER3D: + case D3D_SVT_SAMPLERCUBE: + return true; + + default: break; } - // this is a different kind of comment section, so skip over it - ptr += commentSize - 1; - } - - if (!header) - { - fprintf(stderr, "Error: Could not find constant table data\n"); return false; } - const uint8_t* headerBytePtr = (const uint8_t*)header; - const char* creator = (const char*)(headerBytePtr + header->Creator); - - BX_TRACE("Creator: %s 0x%08x", creator, header->Version); - BX_TRACE("Num constants: %d", header->Constants); - BX_TRACE("# cl ty RxC S By Name"); - - const CTInfo* ctInfoArray = (const CTInfo*)(headerBytePtr + header->ConstantInfo); - for (uint32_t ii = 0; ii < header->Constants; ++ii) + bool getReflectionDataD3D9(ID3DBlob* _code, UniformArray& _uniforms) { - const CTInfo& ctInfo = ctInfoArray[ii]; - const CTType& ctType = *(const CTType*)(headerBytePtr + ctInfo.TypeInfo); - const char* name = (const char*)(headerBytePtr + ctInfo.Name); + // see reference for magic values: https://msdn.microsoft.com/en-us/library/ff552891(VS.85).aspx + const uint32_t D3DSIO_COMMENT = 0x0000FFFE; + const uint32_t D3DSIO_END = 0x0000FFFF; + const uint32_t D3DSI_OPCODE_MASK = 0x0000FFFF; + const uint32_t D3DSI_COMMENTSIZE_MASK = 0x7FFF0000; + const uint32_t CTAB_CONSTANT = MAKEFOURCC('C', 'T', 'A', 'B'); - BX_TRACE("%3d %2d %2d [%dx%d] %d %s[%d] c%d (%d)" - , ii - , ctType.Class - , ctType.Type - , ctType.Rows - , ctType.Columns - , ctType.StructMembers - , name - , ctType.Elements - , ctInfo.RegisterIndex - , ctInfo.RegisterCount - ); + // parse the shader blob for the constant table + const size_t codeSize = _code->GetBufferSize(); + const uint32_t* ptr = (const uint32_t*)_code->GetBufferPointer(); + const uint32_t* end = (const uint32_t*)( (const uint8_t*)ptr + codeSize); + const CTHeader* header = NULL; - D3D11_SHADER_TYPE_DESC desc; - desc.Class = (D3D_SHADER_VARIABLE_CLASS)ctType.Class; - desc.Type = (D3D_SHADER_VARIABLE_TYPE)ctType.Type; - desc.Rows = ctType.Rows; - desc.Columns = ctType.Columns; + ptr++; // first byte is shader type / version; skip it since we already know - UniformType::Enum type = findUniformType(desc); - if (UniformType::Count != type) + while (ptr < end && *ptr != D3DSIO_END) { - Uniform un; - un.name = '$' == name[0] ? name + 1 : name; - un.type = isSampler(desc.Type) - ? UniformType::Enum(BGFX_UNIFORM_SAMPLERBIT | type) - : type - ; - un.num = (uint8_t)ctType.Elements; - un.regIndex = ctInfo.RegisterIndex; - un.regCount = ctInfo.RegisterCount; - - _uniforms.push_back(un); - } - } - - return true; -} - -bool getReflectionDataDx11(ID3DBlob* _code, bool _vshader, UniformArray& _uniforms, uint8_t& _numAttrs, uint16_t* _attrs, uint16_t& _size, UniformNameList& unusedUniforms) -{ - ID3D11ShaderReflection* reflect = NULL; - HRESULT hr = D3DReflect(_code->GetBufferPointer() - , _code->GetBufferSize() - , IID_ID3D11ShaderReflection - , (void**)&reflect - ); - if (FAILED(hr) ) - { - fprintf(stderr, "Error: 0x%08x\n", (uint32_t)hr); - return false; - } - - D3D11_SHADER_DESC desc; - hr = reflect->GetDesc(&desc); - if (FAILED(hr) ) - { - fprintf(stderr, BX_FILE_LINE_LITERAL "Error: 0x%08x\n", (uint32_t)hr); - return false; - } - - BX_TRACE("Creator: %s 0x%08x", desc.Creator, desc.Version); - BX_TRACE("Num constant buffers: %d", desc.ConstantBuffers); - - BX_TRACE("Input:"); - - if (_vshader) // Only care about input semantic on vertex shaders - { - for (uint32_t ii = 0; ii < desc.InputParameters; ++ii) - { - D3D11_SIGNATURE_PARAMETER_DESC spd; - reflect->GetInputParameterDesc(ii, &spd); - BX_TRACE("\t%2d: %s%d, vt %d, ct %d, mask %x, reg %d" - , ii - , spd.SemanticName - , spd.SemanticIndex - , spd.SystemValueType - , spd.ComponentType - , spd.Mask - , spd.Register - ); - - const RemapInputSemantic& ris = findInputSemantic(spd.SemanticName, spd.SemanticIndex); - if (ris.m_attr != bgfx::Attrib::Count) + uint32_t cur = *ptr++; + if ( (cur & D3DSI_OPCODE_MASK) != D3DSIO_COMMENT) { - _attrs[_numAttrs] = bgfx::attribToId(ris.m_attr); - ++_numAttrs; + continue; } - } - } - BX_TRACE("Output:"); - for (uint32_t ii = 0; ii < desc.OutputParameters; ++ii) - { - D3D11_SIGNATURE_PARAMETER_DESC spd; - reflect->GetOutputParameterDesc(ii, &spd); - BX_TRACE("\t%2d: %s%d, %d, %d", ii, spd.SemanticName, spd.SemanticIndex, spd.SystemValueType, spd.ComponentType); - } - - for (uint32_t ii = 0, num = bx::uint32_min(1, desc.ConstantBuffers); ii < num; ++ii) - { - ID3D11ShaderReflectionConstantBuffer* cbuffer = reflect->GetConstantBufferByIndex(ii); - D3D11_SHADER_BUFFER_DESC bufferDesc; - hr = cbuffer->GetDesc(&bufferDesc); - - _size = (uint16_t)bufferDesc.Size; - - if (SUCCEEDED(hr) ) - { - BX_TRACE("%s, %d, vars %d, size %d" - , bufferDesc.Name - , bufferDesc.Type - , bufferDesc.Variables - , bufferDesc.Size - ); - - for (uint32_t jj = 0; jj < bufferDesc.Variables; ++jj) + // try to find CTAB comment block + uint32_t commentSize = (cur & D3DSI_COMMENTSIZE_MASK) >> 16; + uint32_t fourcc = *ptr; + if (fourcc == CTAB_CONSTANT) { - ID3D11ShaderReflectionVariable* var = cbuffer->GetVariableByIndex(jj); - ID3D11ShaderReflectionType* type = var->GetType(); - D3D11_SHADER_VARIABLE_DESC varDesc; - hr = var->GetDesc(&varDesc); - if (SUCCEEDED(hr) ) + // found the constant table data + header = (const CTHeader*)(ptr + 1); + uint32_t tableSize = (commentSize - 1) * 4; + if (tableSize < sizeof(CTHeader) || header->Size != sizeof(CTHeader) ) { - D3D11_SHADER_TYPE_DESC constDesc; - hr = type->GetDesc(&constDesc); - if (SUCCEEDED(hr) ) - { - UniformType::Enum uniformType = findUniformType(constDesc); - - if (UniformType::Count != uniformType - && 0 != (varDesc.uFlags & D3D_SVF_USED) ) - { - Uniform un; - un.name = varDesc.Name; - un.type = uniformType; - un.num = constDesc.Elements; - un.regIndex = varDesc.StartOffset; - un.regCount = BX_ALIGN_16(varDesc.Size) / 16; - _uniforms.push_back(un); - - BX_TRACE("\t%s, %d, size %d, flags 0x%08x, %d (used)" - , varDesc.Name - , varDesc.StartOffset - , varDesc.Size - , varDesc.uFlags - , uniformType - ); - } - else - { - if (0 == (varDesc.uFlags & D3D_SVF_USED) ) - { - unusedUniforms.push_back(varDesc.Name); - } - - BX_TRACE("\t%s, unknown type", varDesc.Name); - } - } + fprintf(stderr, "Error: Invalid constant table data\n"); + return false; } + break; + } + + // this is a different kind of comment section, so skip over it + ptr += commentSize - 1; + } + + if (!header) + { + fprintf(stderr, "Error: Could not find constant table data\n"); + return false; + } + + const uint8_t* headerBytePtr = (const uint8_t*)header; + const char* creator = (const char*)(headerBytePtr + header->Creator); + + BX_TRACE("Creator: %s 0x%08x", creator, header->Version); + BX_TRACE("Num constants: %d", header->Constants); + BX_TRACE("# cl ty RxC S By Name"); + + const CTInfo* ctInfoArray = (const CTInfo*)(headerBytePtr + header->ConstantInfo); + for (uint32_t ii = 0; ii < header->Constants; ++ii) + { + const CTInfo& ctInfo = ctInfoArray[ii]; + const CTType& ctType = *(const CTType*)(headerBytePtr + ctInfo.TypeInfo); + const char* name = (const char*)(headerBytePtr + ctInfo.Name); + + BX_TRACE("%3d %2d %2d [%dx%d] %d %s[%d] c%d (%d)" + , ii + , ctType.Class + , ctType.Type + , ctType.Rows + , ctType.Columns + , ctType.StructMembers + , name + , ctType.Elements + , ctInfo.RegisterIndex + , ctInfo.RegisterCount + ); + + D3D11_SHADER_TYPE_DESC desc; + desc.Class = (D3D_SHADER_VARIABLE_CLASS)ctType.Class; + desc.Type = (D3D_SHADER_VARIABLE_TYPE)ctType.Type; + desc.Rows = ctType.Rows; + desc.Columns = ctType.Columns; + + UniformType::Enum type = findUniformType(desc); + if (UniformType::Count != type) + { + Uniform un; + un.name = '$' == name[0] ? name + 1 : name; + un.type = isSampler(desc.Type) + ? UniformType::Enum(BGFX_UNIFORM_SAMPLERBIT | type) + : type + ; + un.num = (uint8_t)ctType.Elements; + un.regIndex = ctInfo.RegisterIndex; + un.regCount = ctInfo.RegisterCount; + + _uniforms.push_back(un); } } + + return true; } - BX_TRACE("Bound:"); - for (uint32_t ii = 0; ii < desc.BoundResources; ++ii) + bool getReflectionDataD3D11(ID3DBlob* _code, bool _vshader, UniformArray& _uniforms, uint8_t& _numAttrs, uint16_t* _attrs, uint16_t& _size, UniformNameList& unusedUniforms) { - D3D11_SHADER_INPUT_BIND_DESC bindDesc; - - hr = reflect->GetResourceBindingDesc(ii, &bindDesc); - if (SUCCEEDED(hr) ) + ID3D11ShaderReflection* reflect = NULL; + HRESULT hr = D3DReflect(_code->GetBufferPointer() + , _code->GetBufferSize() + , s_compiler->IID_ID3D11ShaderReflection + , (void**)&reflect + ); + if (FAILED(hr) ) { - if (D3D_SIT_SAMPLER == bindDesc.Type) + fprintf(stderr, "Error: D3DReflect failed 0x%08x\n", (uint32_t)hr); + return false; + } + + D3D11_SHADER_DESC desc; + hr = reflect->GetDesc(&desc); + if (FAILED(hr) ) + { + fprintf(stderr, "Error: ID3D11ShaderReflection::GetDesc failed 0x%08x\n", (uint32_t)hr); + return false; + } + + BX_TRACE("Creator: %s 0x%08x", desc.Creator, desc.Version); + BX_TRACE("Num constant buffers: %d", desc.ConstantBuffers); + + BX_TRACE("Input:"); + + if (_vshader) // Only care about input semantic on vertex shaders + { + for (uint32_t ii = 0; ii < desc.InputParameters; ++ii) { - BX_TRACE("\t%s, %d, %d, %d" - , bindDesc.Name - , bindDesc.Type - , bindDesc.BindPoint - , bindDesc.BindCount + D3D11_SIGNATURE_PARAMETER_DESC spd; + reflect->GetInputParameterDesc(ii, &spd); + BX_TRACE("\t%2d: %s%d, vt %d, ct %d, mask %x, reg %d" + , ii + , spd.SemanticName + , spd.SemanticIndex + , spd.SystemValueType + , spd.ComponentType + , spd.Mask + , spd.Register ); - const char * end = strstr(bindDesc.Name, "Sampler"); - if (NULL != end) + const RemapInputSemantic& ris = findInputSemantic(spd.SemanticName, spd.SemanticIndex); + if (ris.m_attr != bgfx::Attrib::Count) { - Uniform un; - un.name.assign(bindDesc.Name, (end - bindDesc.Name) ); - un.type = UniformType::Enum(BGFX_UNIFORM_SAMPLERBIT | UniformType::Int1); - un.num = 1; - un.regIndex = bindDesc.BindPoint; - un.regCount = bindDesc.BindCount; - _uniforms.push_back(un); + _attrs[_numAttrs] = bgfx::attribToId(ris.m_attr); + ++_numAttrs; } } } - } - if (NULL != reflect) - { - reflect->Release(); - } - - return true; -} - -bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _d3d, const std::string& _code, bx::WriterI* _writer, bool _firstPass) -{ - BX_TRACE("DX11"); - - const char* profile = _cmdLine.findOption('p', "profile"); - if (NULL == profile) - { - fprintf(stderr, "Shader profile must be specified.\n"); - return false; - } - - bool debug = _cmdLine.hasArg('\0', "debug"); - - uint32_t flags = D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY; - flags |= debug ? D3DCOMPILE_DEBUG : 0; - flags |= _cmdLine.hasArg('\0', "avoid-flow-control") ? D3DCOMPILE_AVOID_FLOW_CONTROL : 0; - flags |= _cmdLine.hasArg('\0', "no-preshader") ? D3DCOMPILE_NO_PRESHADER : 0; - flags |= _cmdLine.hasArg('\0', "partial-precision") ? D3DCOMPILE_PARTIAL_PRECISION : 0; - flags |= _cmdLine.hasArg('\0', "prefer-flow-control") ? D3DCOMPILE_PREFER_FLOW_CONTROL : 0; - flags |= _cmdLine.hasArg('\0', "backwards-compatibility") ? D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY : 0; - - bool werror = _cmdLine.hasArg('\0', "Werror"); - - if (werror) - { - flags |= D3DCOMPILE_WARNINGS_ARE_ERRORS; - } - - uint32_t optimization = 3; - if (_cmdLine.hasArg(optimization, 'O') ) - { - optimization = bx::uint32_min(optimization, BX_COUNTOF(s_optimizationLevelDx11)-1); - flags |= s_optimizationLevelDx11[optimization]; - } - else - { - flags |= D3DCOMPILE_SKIP_OPTIMIZATION; - } - - BX_TRACE("Profile: %s", profile); - BX_TRACE("Flags: 0x%08x", flags); - - ID3DBlob* code; - ID3DBlob* errorMsg; - - // Output preprocessed shader so that HLSL can be debugged via GPA - // or PIX. Compiling through memory won't embed preprocessed shader - // file path. - std::string hlslfp; - - if (debug) - { - hlslfp = _cmdLine.findOption('o'); - hlslfp += ".hlsl"; - writeFile(hlslfp.c_str(), _code.c_str(), (int32_t)_code.size() ); - } - - HRESULT hr = D3DCompile(_code.c_str() - , _code.size() - , hlslfp.c_str() - , NULL - , NULL - , "main" - , profile - , flags - , 0 - , &code - , &errorMsg - ); - if (FAILED(hr) - || (werror && NULL != errorMsg) ) - { - const char* log = (char*)errorMsg->GetBufferPointer(); - - int32_t line = 0; - int32_t column = 0; - int32_t start = 0; - int32_t end = INT32_MAX; - - if (2 == sscanf(log, "(%u,%u):", &line, &column) - && 0 != line) + BX_TRACE("Output:"); + for (uint32_t ii = 0; ii < desc.OutputParameters; ++ii) { - start = bx::uint32_imax(1, line-10); - end = start + 20; + D3D11_SIGNATURE_PARAMETER_DESC spd; + reflect->GetOutputParameterDesc(ii, &spd); + BX_TRACE("\t%2d: %s%d, %d, %d", ii, spd.SemanticName, spd.SemanticIndex, spd.SystemValueType, spd.ComponentType); } - printCode(_code.c_str(), line, start, end); - fprintf(stderr, "Error: 0x%08x %s\n", (uint32_t)hr, log); - errorMsg->Release(); - return false; - } - - UniformArray uniforms; - uint8_t numAttrs = 0; - uint16_t attrs[bgfx::Attrib::Count]; - uint16_t size = 0; - - if (_d3d == 9) - { - if (!getReflectionDataDx9(code, uniforms) ) + for (uint32_t ii = 0, num = bx::uint32_min(1, desc.ConstantBuffers); ii < num; ++ii) { - return false; - } - } - else - { - UniformNameList unusedUniforms; - if (!getReflectionDataDx11(code, profile[0] == 'v', uniforms, numAttrs, attrs, size, unusedUniforms) ) - { - return false; - } + ID3D11ShaderReflectionConstantBuffer* cbuffer = reflect->GetConstantBufferByIndex(ii); + D3D11_SHADER_BUFFER_DESC bufferDesc; + hr = cbuffer->GetDesc(&bufferDesc); - if (_firstPass - && unusedUniforms.size() > 0) - { - const size_t strLength = strlen("uniform"); + _size = (uint16_t)bufferDesc.Size; - // first time through, we just find unused uniforms and get rid of them - std::string output; - LineReader reader(_code.c_str() ); - while (!reader.isEof() ) + if (SUCCEEDED(hr) ) { - std::string line = reader.getLine(); - for (UniformNameList::iterator it = unusedUniforms.begin(), itEnd = unusedUniforms.end(); it != itEnd; ++it) - { - size_t index = line.find("uniform "); - if (index == std::string::npos) - { - continue; - } + BX_TRACE("%s, %d, vars %d, size %d" + , bufferDesc.Name + , bufferDesc.Type + , bufferDesc.Variables + , bufferDesc.Size + ); - // matching lines like: uniform u_name; - // we want to replace "uniform" with "static" so that it's no longer - // included in the uniform blob that the application must upload - // we can't just remove them, because unused functions might still reference - // them and cause a compile error when they're gone - if (!!bx::findIdentifierMatch(line.c_str(), it->c_str() ) ) + for (uint32_t jj = 0; jj < bufferDesc.Variables; ++jj) + { + ID3D11ShaderReflectionVariable* var = cbuffer->GetVariableByIndex(jj); + ID3D11ShaderReflectionType* type = var->GetType(); + D3D11_SHADER_VARIABLE_DESC varDesc; + hr = var->GetDesc(&varDesc); + if (SUCCEEDED(hr) ) { - line = line.replace(index, strLength, "static"); - unusedUniforms.erase(it); - break; + D3D11_SHADER_TYPE_DESC constDesc; + hr = type->GetDesc(&constDesc); + if (SUCCEEDED(hr) ) + { + UniformType::Enum uniformType = findUniformType(constDesc); + + if (UniformType::Count != uniformType + && 0 != (varDesc.uFlags & D3D_SVF_USED) ) + { + Uniform un; + un.name = varDesc.Name; + un.type = uniformType; + un.num = constDesc.Elements; + un.regIndex = varDesc.StartOffset; + un.regCount = BX_ALIGN_16(varDesc.Size) / 16; + _uniforms.push_back(un); + + BX_TRACE("\t%s, %d, size %d, flags 0x%08x, %d (used)" + , varDesc.Name + , varDesc.StartOffset + , varDesc.Size + , varDesc.uFlags + , uniformType + ); + } + else + { + if (0 == (varDesc.uFlags & D3D_SVF_USED) ) + { + unusedUniforms.push_back(varDesc.Name); + } + + BX_TRACE("\t%s, unknown type", varDesc.Name); + } + } } } + } + } - output += line; + BX_TRACE("Bound:"); + for (uint32_t ii = 0; ii < desc.BoundResources; ++ii) + { + D3D11_SHADER_INPUT_BIND_DESC bindDesc; + + hr = reflect->GetResourceBindingDesc(ii, &bindDesc); + if (SUCCEEDED(hr) ) + { + if (D3D_SIT_SAMPLER == bindDesc.Type) + { + BX_TRACE("\t%s, %d, %d, %d" + , bindDesc.Name + , bindDesc.Type + , bindDesc.BindPoint + , bindDesc.BindCount + ); + + const char * end = strstr(bindDesc.Name, "Sampler"); + if (NULL != end) + { + Uniform un; + un.name.assign(bindDesc.Name, (end - bindDesc.Name) ); + un.type = UniformType::Enum(BGFX_UNIFORM_SAMPLERBIT | UniformType::Int1); + un.num = 1; + un.regIndex = bindDesc.BindPoint; + un.regCount = bindDesc.BindCount; + _uniforms.push_back(un); + } + } + } + } + + if (NULL != reflect) + { + reflect->Release(); + } + + return true; + } + + bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _d3d, const std::string& _code, bx::WriterI* _writer, bool _firstPass) + { + const char* profile = _cmdLine.findOption('p', "profile"); + if (NULL == profile) + { + fprintf(stderr, "Error: Shader profile must be specified.\n"); + return false; + } + + s_compiler = load(); + + bool result = false; + bool debug = _cmdLine.hasArg('\0', "debug"); + + uint32_t flags = D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY; + flags |= debug ? D3DCOMPILE_DEBUG : 0; + flags |= _cmdLine.hasArg('\0', "avoid-flow-control") ? D3DCOMPILE_AVOID_FLOW_CONTROL : 0; + flags |= _cmdLine.hasArg('\0', "no-preshader") ? D3DCOMPILE_NO_PRESHADER : 0; + flags |= _cmdLine.hasArg('\0', "partial-precision") ? D3DCOMPILE_PARTIAL_PRECISION : 0; + flags |= _cmdLine.hasArg('\0', "prefer-flow-control") ? D3DCOMPILE_PREFER_FLOW_CONTROL : 0; + flags |= _cmdLine.hasArg('\0', "backwards-compatibility") ? D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY : 0; + + bool werror = _cmdLine.hasArg('\0', "Werror"); + + if (werror) + { + flags |= D3DCOMPILE_WARNINGS_ARE_ERRORS; + } + + uint32_t optimization = 3; + if (_cmdLine.hasArg(optimization, 'O') ) + { + optimization = bx::uint32_min(optimization, BX_COUNTOF(s_optimizationLevelD3D11) - 1); + flags |= s_optimizationLevelD3D11[optimization]; + } + else + { + flags |= D3DCOMPILE_SKIP_OPTIMIZATION; + } + + BX_TRACE("Profile: %s", profile); + BX_TRACE("Flags: 0x%08x", flags); + + ID3DBlob* code; + ID3DBlob* errorMsg; + + // Output preprocessed shader so that HLSL can be debugged via GPA + // or PIX. Compiling through memory won't embed preprocessed shader + // file path. + std::string hlslfp; + + if (debug) + { + hlslfp = _cmdLine.findOption('o'); + hlslfp += ".hlsl"; + writeFile(hlslfp.c_str(), _code.c_str(), (int32_t)_code.size() ); + } + + HRESULT hr = D3DCompile(_code.c_str() + , _code.size() + , hlslfp.c_str() + , NULL + , NULL + , "main" + , profile + , flags + , 0 + , &code + , &errorMsg + ); + if (FAILED(hr) + || (werror && NULL != errorMsg) ) + { + const char* log = (char*)errorMsg->GetBufferPointer(); + + int32_t line = 0; + int32_t column = 0; + int32_t start = 0; + int32_t end = INT32_MAX; + + if (2 == sscanf(log, "(%u,%u):", &line, &column) + && 0 != line) + { + start = bx::uint32_imax(1, line - 10); + end = start + 20; } - // recompile with the unused uniforms converted to statics - return compileHLSLShader(_cmdLine, _d3d, output.c_str(), _writer, false); + printCode(_code.c_str(), line, start, end); + fprintf(stderr, "Error: D3DCompile failed 0x%08x %s\n", (uint32_t)hr, log); + errorMsg->Release(); + return false; } - } - uint16_t count = (uint16_t)uniforms.size(); - bx::write(_writer, count); + UniformArray uniforms; + uint8_t numAttrs = 0; + uint16_t attrs[bgfx::Attrib::Count]; + uint16_t size = 0; - uint32_t fragmentBit = profile[0] == 'p' ? BGFX_UNIFORM_FRAGMENTBIT : 0; - for (UniformArray::const_iterator it = uniforms.begin(); it != uniforms.end(); ++it) - { - const Uniform& un = *it; - uint8_t nameSize = (uint8_t)un.name.size(); - bx::write(_writer, nameSize); - bx::write(_writer, un.name.c_str(), nameSize); - uint8_t type = un.type|fragmentBit; - bx::write(_writer, type); - bx::write(_writer, un.num); - bx::write(_writer, un.regIndex); - bx::write(_writer, un.regCount); - - BX_TRACE("%s, %s, %d, %d, %d" - , un.name.c_str() - , getUniformTypeName(un.type) - , un.num - , un.regIndex - , un.regCount - ); - } - - { - ID3DBlob* stripped; - hr = D3DStripShader(code->GetBufferPointer() - , code->GetBufferSize() - , D3DCOMPILER_STRIP_REFLECTION_DATA - | D3DCOMPILER_STRIP_TEST_BLOBS - , &stripped - ); - - if (SUCCEEDED(hr) ) + if (_d3d == 9) { - code->Release(); - code = stripped; + if (!getReflectionDataD3D9(code, uniforms) ) + { + fprintf(stderr, "Error: Unable to get D3D9 reflection data.\n"); + goto error; + } } - } - - uint16_t shaderSize = (uint16_t)code->GetBufferSize(); - bx::write(_writer, shaderSize); - bx::write(_writer, code->GetBufferPointer(), shaderSize); - uint8_t nul = 0; - bx::write(_writer, nul); - - if (_d3d > 9) - { - bx::write(_writer, numAttrs); - bx::write(_writer, attrs, numAttrs*sizeof(uint16_t) ); - - bx::write(_writer, size); - } - - if (_cmdLine.hasArg('\0', "disasm") ) - { - ID3DBlob* disasm; - D3DDisassemble(code->GetBufferPointer() - , code->GetBufferSize() - , 0 - , NULL - , &disasm - ); - - if (NULL != disasm) + else { - std::string disasmfp = _cmdLine.findOption('o'); - disasmfp += ".disasm"; + UniformNameList unusedUniforms; + if (!getReflectionDataD3D11(code, profile[0] == 'v', uniforms, numAttrs, attrs, size, unusedUniforms) ) + { + fprintf(stderr, "Unable to get D3D11 reflection data.\n"); + goto error; + } - writeFile(disasmfp.c_str(), disasm->GetBufferPointer(), (uint32_t)disasm->GetBufferSize() ); - disasm->Release(); + if (_firstPass + && unusedUniforms.size() > 0) + { + const size_t strLength = strlen("uniform"); + + // first time through, we just find unused uniforms and get rid of them + std::string output; + LineReader reader(_code.c_str() ); + while (!reader.isEof() ) + { + std::string line = reader.getLine(); + for (UniformNameList::iterator it = unusedUniforms.begin(), itEnd = unusedUniforms.end(); it != itEnd; ++it) + { + size_t index = line.find("uniform "); + if (index == std::string::npos) + { + continue; + } + + // matching lines like: uniform u_name; + // we want to replace "uniform" with "static" so that it's no longer + // included in the uniform blob that the application must upload + // we can't just remove them, because unused functions might still reference + // them and cause a compile error when they're gone + if (!!bx::findIdentifierMatch(line.c_str(), it->c_str() ) ) + { + line = line.replace(index, strLength, "static"); + unusedUniforms.erase(it); + break; + } + } + + output += line; + } + + // recompile with the unused uniforms converted to statics + return compileHLSLShader(_cmdLine, _d3d, output.c_str(), _writer, false); + } } + + { + uint16_t count = (uint16_t)uniforms.size(); + bx::write(_writer, count); + + uint32_t fragmentBit = profile[0] == 'p' ? BGFX_UNIFORM_FRAGMENTBIT : 0; + for (UniformArray::const_iterator it = uniforms.begin(); it != uniforms.end(); ++it) + { + const Uniform& un = *it; + uint8_t nameSize = (uint8_t)un.name.size(); + bx::write(_writer, nameSize); + bx::write(_writer, un.name.c_str(), nameSize); + uint8_t type = un.type | fragmentBit; + bx::write(_writer, type); + bx::write(_writer, un.num); + bx::write(_writer, un.regIndex); + bx::write(_writer, un.regCount); + + BX_TRACE("%s, %s, %d, %d, %d" + , un.name.c_str() + , getUniformTypeName(un.type) + , un.num + , un.regIndex + , un.regCount + ); + } + } + + { + ID3DBlob* stripped; + hr = D3DStripShader(code->GetBufferPointer() + , code->GetBufferSize() + , D3DCOMPILER_STRIP_REFLECTION_DATA + | D3DCOMPILER_STRIP_TEST_BLOBS + , &stripped + ); + + if (SUCCEEDED(hr) ) + { + code->Release(); + code = stripped; + } + } + + { + uint16_t shaderSize = (uint16_t)code->GetBufferSize(); + bx::write(_writer, shaderSize); + bx::write(_writer, code->GetBufferPointer(), shaderSize); + uint8_t nul = 0; + bx::write(_writer, nul); + } + + if (_d3d > 9) + { + bx::write(_writer, numAttrs); + bx::write(_writer, attrs, numAttrs*sizeof(uint16_t) ); + + bx::write(_writer, size); + } + + if (_cmdLine.hasArg('\0', "disasm") ) + { + ID3DBlob* disasm; + D3DDisassemble(code->GetBufferPointer() + , code->GetBufferSize() + , 0 + , NULL + , &disasm + ); + + if (NULL != disasm) + { + std::string disasmfp = _cmdLine.findOption('o'); + disasmfp += ".disasm"; + + writeFile(disasmfp.c_str(), disasm->GetBufferPointer(), (uint32_t)disasm->GetBufferSize() ); + disasm->Release(); + } + } + + if (NULL != errorMsg) + { + errorMsg->Release(); + } + + result = true; + + error: + code->Release(); + unload(); + return result; } - if (NULL != errorMsg) - { - errorMsg->Release(); - } - - code->Release(); - - return true; -} +} // namespace bgfx #else -bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _d3d, const std::string& _code, bx::WriterI* _writer, bool _firstPass) +namespace bgfx { - BX_UNUSED(_cmdLine, _d3d, _code, _writer, _firstPass); - fprintf(stderr, "HLSL compiler is not supported on this platform.\n"); - return false; -} + + bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _d3d, const std::string& _code, bx::WriterI* _writer, bool _firstPass) + { + BX_UNUSED(_cmdLine, _d3d, _code, _writer, _firstPass); + fprintf(stderr, "HLSL compiler is not supported on this platform.\n"); + return false; + } + +} // namespace bgfx #endif // SHADERC_CONFIG_HLSL diff --git a/3rdparty/bgfx/tools/texturec/texturec.cpp b/3rdparty/bgfx/tools/texturec/texturec.cpp index 7c66cdd310c..81bccfeb6f6 100644 --- a/3rdparty/bgfx/tools/texturec/texturec.cpp +++ b/3rdparty/bgfx/tools/texturec/texturec.cpp @@ -13,9 +13,11 @@ #include "image.h" #include #include +#include #include #include #include +#include #define STB_IMAGE_IMPLEMENTATION #include @@ -54,7 +56,7 @@ namespace bgfx ::free(mem); } - void imageEncodeFromRgba8(uint8_t* _dst, const uint8_t* _src, uint32_t _width, uint32_t _height, uint8_t _format) + bool imageEncodeFromRgba8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint8_t _format) { TextureFormat::Enum format = TextureFormat::Enum(_format); @@ -65,32 +67,52 @@ namespace bgfx case TextureFormat::BC3: case TextureFormat::BC4: case TextureFormat::BC5: - squish::CompressImage(_src, _width, _height, _dst + squish::CompressImage( (const uint8_t*)_src, _width, _height, _dst , format == TextureFormat::BC2 ? squish::kDxt3 : format == TextureFormat::BC3 ? squish::kDxt5 : format == TextureFormat::BC4 ? squish::kBc4 : format == TextureFormat::BC5 ? squish::kBc5 : squish::kDxt1 ); - break; + return true; case TextureFormat::BC6H: - nvtt::compressBC6H(_src, _width, _height, 4, _dst); - break; + nvtt::compressBC6H( (const uint8_t*)_src, _width, _height, 4, _dst); + return true; case TextureFormat::BC7: - nvtt::compressBC7(_src, _width, _height, 4, _dst); - break; + nvtt::compressBC7( (const uint8_t*)_src, _width, _height, 4, _dst); + return true; case TextureFormat::ETC1: - etc1_encode_image(_src, _width, _height, 4, _width*4, _dst); - break; + etc1_encode_image( (const uint8_t*)_src, _width, _height, 4, _width*4, (uint8_t*)_dst); + return true; case TextureFormat::ETC2: - case TextureFormat::ETC2A: - case TextureFormat::ETC2A1: - case TextureFormat::PTC12: - break; + { + const uint32_t blockWidth = (_width +3)/4; + const uint32_t blockHeight = (_height+3)/4; + const uint32_t pitch = _width*4; + const uint8_t* src = (const uint8_t*)_src; + uint64_t* dst = (uint64_t*)_dst; + for (uint32_t yy = 0; yy < blockHeight; ++yy) + { + for (uint32_t xx = 0; xx < blockWidth; ++xx) + { + uint8_t block[4*4*4]; + const uint8_t* ptr = &src[(yy*pitch+xx*4)*4]; + + for (uint32_t ii = 0; ii < 16; ++ii) + { // BGRx + memcpy(&block[ii*4], &ptr[(ii%4)*pitch + (ii&~3)], 4); + bx::xchg(block[ii*4+0], block[ii*4+2]); + } + + *dst++ = ProcessRGB_ETC2(block); + } + } + } + return true; case TextureFormat::PTC14: { @@ -98,14 +120,11 @@ namespace bgfx RgbBitmap bmp; bmp.width = _width; bmp.height = _height; - bmp.data = const_cast(_src); + bmp.data = (uint8_t*)const_cast(_src); PvrTcEncoder::EncodeRgb4Bpp(_dst, bmp); bmp.data = NULL; } - break; - - case TextureFormat::PTC12A: - break; + return true; case TextureFormat::PTC14A: { @@ -113,27 +132,186 @@ namespace bgfx RgbaBitmap bmp; bmp.width = _width; bmp.height = _height; - bmp.data = const_cast(_src); + bmp.data = (uint8_t*)const_cast(_src); PvrTcEncoder::EncodeRgba4Bpp(_dst, bmp); bmp.data = NULL; } - break; - - case TextureFormat::PTC22: - case TextureFormat::PTC24: - break; + return true; case TextureFormat::BGRA8: imageSwizzleBgra8(_width, _height, _width*4, _src, _dst); - break; + return true; case TextureFormat::RGBA8: memcpy(_dst, _src, _width*_height*4); - break; + return true; default: - break; + return imageConvert(_dst, format, _src, TextureFormat::RGBA8, _width, _height); } + + return false; + } + + bool imageEncodeFromRgba32f(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint8_t _format) + { + TextureFormat::Enum format = TextureFormat::Enum(_format); + + const uint8_t* src = (const uint8_t*)_src; + + switch (format) + { + case TextureFormat::RGBA8: + { + uint8_t* dst = (uint8_t*)_dst; + for (uint32_t yy = 0; yy < _height; ++yy) + { + for (uint32_t xx = 0; xx < _width; ++xx) + { + const uint32_t offset = yy*_width + xx; + const float* input = (const float*)&src[offset * 16]; + uint8_t* output = &dst[offset * 4]; + output[0] = uint8_t(input[0]*255.0f + 0.5f); + output[1] = uint8_t(input[1]*255.0f + 0.5f); + output[2] = uint8_t(input[2]*255.0f + 0.5f); + output[3] = uint8_t(input[3]*255.0f + 0.5f); + } + } + } + return true; + + case TextureFormat::BC5: + { + uint8_t* temp = (uint8_t*)BX_ALLOC(_allocator, _width*_height*4); + for (uint32_t yy = 0; yy < _height; ++yy) + { + for (uint32_t xx = 0; xx < _width; ++xx) + { + const uint32_t offset = yy*_width + xx; + const float* input = (const float*)&src[offset * 16]; + uint8_t* output = &temp[offset * 4]; + output[0] = uint8_t(input[0]*255.0f + 0.5f); + output[1] = uint8_t(input[1]*255.0f + 0.5f); + output[2] = uint8_t(input[2]*255.0f + 0.5f); + output[3] = uint8_t(input[3]*255.0f + 0.5f); + } + } + + imageEncodeFromRgba8(_dst, temp, _width, _height, _format); + BX_FREE(_allocator, temp); + } + return true; + + default: + return imageConvert(_dst, format, _src, TextureFormat::RGBA32F, _width, _height); + } + + return false; + } + + void imageRgba32f11to01(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src) + { + const uint8_t* src = (const uint8_t*)_src; + uint8_t* dst = (uint8_t*)_dst; + + for (uint32_t yy = 0; yy < _height; ++yy) + { + for (uint32_t xx = 0; xx < _width; ++xx) + { + const uint32_t offset = yy*_pitch + xx * 16; + const float* input = (const float*)&src[offset]; + float* output = (float*)&dst[offset]; + output[0] = input[0]*0.5f + 0.5f; + output[1] = input[1]*0.5f + 0.5f; + output[2] = input[2]*0.5f + 0.5f; + output[3] = input[3]*0.5f + 0.5f; + } + } + } + + static void edtaa3(bx::AllocatorI* _allocator, double* _dst, uint32_t _width, uint32_t _height, double* _src) + { + const uint32_t numPixels = _width*_height; + + short* xdist = (short *)BX_ALLOC(_allocator, numPixels*sizeof(short) ); + short* ydist = (short *)BX_ALLOC(_allocator, numPixels*sizeof(short) ); + double* gx = (double*)BX_ALLOC(_allocator, numPixels*sizeof(double) ); + double* gy = (double*)BX_ALLOC(_allocator, numPixels*sizeof(double) ); + + ::computegradient(_src, _width, _height, gx, gy); + ::edtaa3(_src, gx, gy, _width, _height, xdist, ydist, _dst); + + for (uint32_t ii = 0; ii < numPixels; ++ii) + { + if (_dst[ii] < 0.0) + { + _dst[ii] = 0.0; + } + } + + BX_FREE(_allocator, xdist); + BX_FREE(_allocator, ydist); + BX_FREE(_allocator, gx); + BX_FREE(_allocator, gy); + } + + inline double min(double _a, double _b) + { + return _a > _b ? _b : _a; + } + + inline double max(double _a, double _b) + { + return _a > _b ? _a : _b; + } + + inline double clamp(double _val, double _min, double _max) + { + return max(min(_val, _max), _min); + } + + void imageMakeDist(bx::AllocatorI* _allocator, void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, float _edge, const void* _src) + { + const uint32_t numPixels = _width*_height; + + double* imgIn = (double*)BX_ALLOC(_allocator, numPixels*sizeof(double) ); + double* outside = (double*)BX_ALLOC(_allocator, numPixels*sizeof(double) ); + double* inside = (double*)BX_ALLOC(_allocator, numPixels*sizeof(double) ); + + for (uint32_t yy = 0; yy < _height; ++yy) + { + const uint8_t* src = (const uint8_t*)_src + yy*_pitch; + double* dst = &imgIn[yy*_width]; + for (uint32_t xx = 0; xx < _width; ++xx) + { + dst[xx] = double(src[xx])/255.0; + } + } + + edtaa3(_allocator, outside, _width, _height, imgIn); + + for (uint32_t ii = 0; ii < numPixels; ++ii) + { + imgIn[ii] = 1.0 - imgIn[ii]; + } + + edtaa3(_allocator, inside, _width, _height, imgIn); + + BX_FREE(_allocator, imgIn); + + uint8_t* dst = (uint8_t*)_dst; + + double edgeOffset = _edge*0.5; + double invEdge = 1.0/_edge; + + for (uint32_t ii = 0; ii < numPixels; ++ii) + { + double dist = clamp( ( (outside[ii] - inside[ii])+edgeOffset) * invEdge, 0.0, 1.0); + dst[ii] = 255-uint8_t(dist * 255.0); + } + + BX_FREE(_allocator, inside); + BX_FREE(_allocator, outside); } } // namespace bgfx @@ -168,6 +346,8 @@ void help(const char* _error = NULL) " -o Output file path (file will be written in KTX format).\n" " -t Output format type (BC1/2/3/4/5, ETC1, PVR14, etc.).\n" " -m, --mips Generate mip-maps.\n" + " -n, --normalmap Input texture is normal map.\n" + " --sdf Compute SDF texture.\n" "\n" "For additional information, see https://github.com/bkaradzic/bgfx\n" @@ -198,14 +378,23 @@ int main(int _argc, const char* _argv[]) return EXIT_FAILURE; } + bool sdf = false; + double edge = 16.0; + const char* edgeOpt = cmdLine.findOption("sdf"); + if (NULL != edgeOpt) + { + sdf = true; + edge = atof(edgeOpt); + } + BX_UNUSED(sdf, edge); + bx::CrtFileReader reader; - if (0 != bx::open(&reader, inputFileName) ) + if (!bx::open(&reader, inputFileName) ) { help("Failed to open input file."); return EXIT_FAILURE; } - const bool mips = cmdLine.hasArg('m', "mips"); const char* type = cmdLine.findOption('t'); bgfx::TextureFormat::Enum format = bgfx::TextureFormat::BGRA8; @@ -220,6 +409,9 @@ int main(int _argc, const char* _argv[]) } } + const bool mips = cmdLine.hasArg('m', "mips"); + const bool normalMap = cmdLine.hasArg('n', "normalmap"); + uint32_t size = (uint32_t)bx::getSize(&reader); const bgfx::Memory* mem = bgfx::alloc(size); bx::read(&reader, mem->data, mem->size); @@ -271,46 +463,99 @@ int main(int _argc, const char* _argv[]) ImageMip mip; if (imageGetRawData(imageContainer, 0, 0, mem->data, mem->size, mip) ) { - uint32_t size = imageGetSize(TextureFormat::RGBA8, mip.m_width, mip.m_height); - uint8_t* rgba = (uint8_t*)BX_ALLOC(&allocator, size); - - imageDecodeToRgba8(rgba - , mip.m_data - , mip.m_width - , mip.m_height - , mip.m_width*mip.m_bpp/8 - , mip.m_format - ); - uint8_t numMips = mips ? imageGetNumMips(format, mip.m_width, mip.m_height) : 1 ; - imageContainer.m_size = imageGetSize(format, mip.m_width, mip.m_height, 0, false, numMips); - imageContainer.m_format = format; - output = alloc(imageContainer.m_size); - imageEncodeFromRgba8(output->data, rgba, mip.m_width, mip.m_height, format); + void* temp = NULL; - for (uint8_t lod = 1; lod < numMips; ++lod) + if (normalMap) { - ImageMip mip1; - imageGetRawData(imageContainer, 0, lod, output->data, output->size, mip1); - uint8_t* data = const_cast(mip1.m_data); + uint32_t size = imageGetSize(TextureFormat::RGBA32F, mip.m_width, mip.m_height); + temp = BX_ALLOC(&allocator, size); + float* rgba = (float*)temp; + float* rgbaDst = (float*)BX_ALLOC(&allocator, size); - uint32_t width = bx::uint32_max(1, mip.m_width >>lod); - uint32_t height = bx::uint32_max(1, mip.m_height>>lod); - imageRgba8Downsample2x2(width, height, width*4, rgba, rgba); - imageEncodeFromRgba8(data, rgba, mip.m_width, mip.m_height, format); + imageDecodeToRgba32f(&allocator + , rgba + , mip.m_data + , mip.m_width + , mip.m_height + , mip.m_width*mip.m_bpp/8 + , mip.m_format + ); + + if (TextureFormat::BC5 != mip.m_format) + { + for (uint32_t yy = 0; yy < mip.m_height; ++yy) + { + for (uint32_t xx = 0; xx < mip.m_width; ++xx) + { + const uint32_t offset = (yy*mip.m_width + xx) * 4; + float* inout = &rgba[offset]; + inout[0] = inout[0] * 2.0f/255.0f - 1.0f; + inout[1] = inout[1] * 2.0f/255.0f - 1.0f; + inout[2] = inout[2] * 2.0f/255.0f - 1.0f; + inout[3] = inout[3] * 2.0f/255.0f - 1.0f; + } + } + } + + output = imageAlloc(imageContainer, format, mip.m_width, mip.m_height, 0, false, mips); + + imageRgba32f11to01(rgbaDst, mip.m_width, mip.m_height, mip.m_width*16, rgba); + imageEncodeFromRgba32f(&allocator, output->data, rgbaDst, mip.m_width, mip.m_height, format); + + for (uint8_t lod = 1; lod < numMips; ++lod) + { + imageRgba32fDownsample2x2NormalMap(mip.m_width, mip.m_height, mip.m_width*16, rgba, rgba); + imageRgba32f11to01(rgbaDst, mip.m_width, mip.m_height, mip.m_width*16, rgba); + + ImageMip dstMip; + imageGetRawData(imageContainer, 0, lod, output->data, output->size, dstMip); + uint8_t* data = const_cast(dstMip.m_data); + imageEncodeFromRgba32f(&allocator, data, rgbaDst, dstMip.m_width, dstMip.m_height, format); + } + + BX_FREE(&allocator, rgbaDst); + } + else + { + uint32_t size = imageGetSize(TextureFormat::RGBA8, mip.m_width, mip.m_height); + temp = BX_ALLOC(&allocator, size); + uint8_t* rgba = (uint8_t*)temp; + + imageDecodeToRgba8(rgba + , mip.m_data + , mip.m_width + , mip.m_height + , mip.m_width*mip.m_bpp/8 + , mip.m_format + ); + + output = imageAlloc(imageContainer, format, mip.m_width, mip.m_height, 0, false, mips); + + imageEncodeFromRgba8(output->data, rgba, mip.m_width, mip.m_height, format); + + for (uint8_t lod = 1; lod < numMips; ++lod) + { + imageRgba8Downsample2x2(mip.m_width, mip.m_height, mip.m_width*4, rgba, rgba); + + ImageMip dstMip; + imageGetRawData(imageContainer, 0, lod, output->data, output->size, dstMip); + uint8_t* data = const_cast(dstMip.m_data); + imageEncodeFromRgba8(data, rgba, dstMip.m_width, dstMip.m_height, format); + } } - BX_FREE(&allocator, rgba); + BX_FREE(&allocator, temp); } if (NULL != output) { bx::CrtFileWriter writer; - if (0 == bx::open(&writer, outputFileName) ) + if (bx::open(&writer, outputFileName) ) { if (NULL != bx::stristr(outputFileName, ".ktx") ) { @@ -319,8 +564,13 @@ int main(int _argc, const char* _argv[]) bx::close(&writer); } + else + { + help("Failed to open output file."); + return EXIT_FAILURE; + } - release(output); + imageFree(output); } } diff --git a/3rdparty/bx/.appveyor.yml b/3rdparty/bx/.appveyor.yml new file mode 100644 index 00000000000..286a3c9cc3b --- /dev/null +++ b/3rdparty/bx/.appveyor.yml @@ -0,0 +1,21 @@ +shallow_clone: true + +os: + - Visual Studio 2015 + +environment: + matrix: + - TOOLSET: vs2010 + - TOOLSET: vs2012 + - TOOLSET: vs2013 + - TOOLSET: vs2015 + +configuration: + - Debug + - Release + +install: + tools\bin\windows\genie %TOOLSET% + +build: + project: .build/projects/$(TOOLSET)/bx.sln diff --git a/3rdparty/bx/.travis.yml b/3rdparty/bx/.travis.yml new file mode 100644 index 00000000000..7b8e2d62283 --- /dev/null +++ b/3rdparty/bx/.travis.yml @@ -0,0 +1,20 @@ +language: cpp +matrix: + include: + - compiler: gcc + os: linux + - compiler: clang + os: osx + +script: + make test + +branches: + only: + - master + +notifications: + email: false + +osx_image: + xcode61 diff --git a/3rdparty/bx/README.md b/3rdparty/bx/README.md index c864c84fbab..88cb1bf55ac 100644 --- a/3rdparty/bx/README.md +++ b/3rdparty/bx/README.md @@ -3,6 +3,9 @@ bx Base library. +[![Build Status](https://travis-ci.org/bkaradzic/bx.svg?branch=master)](https://travis-ci.org/bkaradzic/bx) +[![Build status](https://ci.appveyor.com/api/projects/status/edras3mltmoy31g5?svg=true)](https://ci.appveyor.com/project/bkaradzic/bx) + Contact ------- diff --git a/3rdparty/bx/include/bx/bx.h b/3rdparty/bx/include/bx/bx.h index 7ada4b2b970..80e9b765e10 100644 --- a/3rdparty/bx/include/bx/bx.h +++ b/3rdparty/bx/include/bx/bx.h @@ -8,6 +8,7 @@ #include // uint32_t #include // size_t +#include // memcpy #include "config.h" #include "macros.h" @@ -52,6 +53,32 @@ namespace bx return 0 == (un.addr & (_align-1) ); } + /// Scatter/gather memcpy. + inline void memCopy(void* _dst, const void* _src, uint32_t _size, uint32_t _num, uint32_t _srcPitch, uint32_t _dstPitch) + { + const uint8_t* src = (const uint8_t*)_src; + uint8_t* dst = (uint8_t*)_dst; + + for (uint32_t ii = 0; ii < _num; ++ii) + { + memcpy(dst, src, _size); + src += _srcPitch; + dst += _dstPitch; + } + } + + /// + inline void gather(void* _dst, const void* _src, uint32_t _size, uint32_t _num, uint32_t _srcPitch) + { + memCopy(_dst, _src, _size, _num, _srcPitch, _size); + } + + /// + inline void scatter(void* _dst, const void* _src, uint32_t _size, uint32_t _num, uint32_t _dstPitch) + { + memCopy(_dst, _src, _size, _num, _size, _dstPitch); + } + } // namespace bx // Annoying C++0x stuff.. diff --git a/3rdparty/bx/include/bx/config.h b/3rdparty/bx/include/bx/config.h index 3837193e19a..6b8cfe45a7f 100644 --- a/3rdparty/bx/include/bx/config.h +++ b/3rdparty/bx/include/bx/config.h @@ -30,6 +30,7 @@ || BX_PLATFORM_OSX \ || BX_PLATFORM_QNX \ || BX_PLATFORM_RPI \ + || BX_PLATFORM_STEAMLINK \ || BX_PLATFORM_WINDOWS \ || BX_PLATFORM_WINRT \ ? 1 : 0) diff --git a/3rdparty/bx/include/bx/error.h b/3rdparty/bx/include/bx/error.h new file mode 100644 index 00000000000..d98a111f5af --- /dev/null +++ b/3rdparty/bx/include/bx/error.h @@ -0,0 +1,111 @@ +/* + * Copyright 2010-2016 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bx#license-bsd-2-clause + */ + +#ifndef BX_ERROR_H_HEADER_GUARD +#define BX_ERROR_H_HEADER_GUARD + +#include "bx.h" + +#define BX_ERROR_SET(_ptr, _result, _msg) \ + BX_MACRO_BLOCK_BEGIN \ + BX_TRACE("Error %d: %s", _result.code, "" _msg); \ + _ptr->setError(_result, "" _msg); \ + BX_MACRO_BLOCK_END + +#define BX_ERROR_USE_TEMP_WHEN_NULL(_ptr) \ + const bx::Error tmpError; /* It should not be used directly! */ \ + _ptr = NULL == _ptr ? const_cast(&tmpError) : _ptr + +#define BX_ERROR_SCOPE(_ptr) \ + BX_ERROR_USE_TEMP_WHEN_NULL(_ptr); \ + bx::ErrorScope bxErrorScope(const_cast(&tmpError) ) + +#define BX_ERROR_RESULT(_err, _code) \ + BX_STATIC_ASSERT(_code != 0, "ErrorCode 0 is reserved!"); \ + static const bx::ErrorResult _err = { _code } + +namespace bx +{ + /// + struct ErrorResult + { + uint32_t code; + }; + + /// + class Error + { + BX_CLASS(Error + , NO_COPY + , NO_ASSIGNMENT + ); + + public: + Error() + : m_code(0) + { + } + + void setError(ErrorResult _errorResult, const char* _msg) + { + BX_CHECK(0 != _errorResult.code, "Invalid ErrorResult passed to setError!"); + + if (!isOk() ) + { + return; + } + + m_code = _errorResult.code; + m_msg = _msg; + } + + bool isOk() const + { + return 0 == m_code; + } + + ErrorResult get() const + { + ErrorResult result = { m_code }; + return result; + } + + bool operator==(ErrorResult _rhs) const + { + return _rhs.code == m_code; + } + + private: + const char* m_msg; + uint32_t m_code; + }; + + /// + class ErrorScope + { + BX_CLASS(ErrorScope + , NO_COPY + , NO_ASSIGNMENT + ); + + public: + ErrorScope(Error* _err) + : m_err(_err) + { + BX_CHECK(NULL != _err, "_err can't be NULL"); + } + + ~ErrorScope() + { + BX_CHECK(m_err->isOk(), "Error: %d", m_err->get().code); + } + + private: + Error* m_err; + }; + +} // namespace bx + +#endif // BX_ERROR_H_HEADER_GUARD diff --git a/3rdparty/bx/include/bx/fpumath.h b/3rdparty/bx/include/bx/fpumath.h index 0763f5bcb5f..b76da2f9a31 100644 --- a/3rdparty/bx/include/bx/fpumath.h +++ b/3rdparty/bx/include/bx/fpumath.h @@ -29,9 +29,19 @@ namespace bx return _rad * 180.0f / pi; } + inline float ffloor(float _f) + { + return floorf(_f); + } + + inline float fceil(float _f) + { + return ceilf(_f); + } + inline float fround(float _f) { - return floorf(_f + 0.5f); + return ffloor(_f + 0.5f); } inline float fmin(float _a, float _b) @@ -705,14 +715,14 @@ namespace bx mtxProjRh(_result, _fovy, _aspect, _near, _far, _oglNdc); } - inline void mtxOrtho(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset = 0.0f) + inline void mtxOrtho(float* _result, float _left, float _right, float _bottom, float _top, float _near, float _far, float _offset = 0.0f, bool _oglNdc = false) { const float aa = 2.0f/(_right - _left); const float bb = 2.0f/(_top - _bottom); - const float cc = 1.0f/(_far - _near); + const float cc = (_oglNdc ? 2.0f : 1.0f) / (_far - _near); const float dd = (_left + _right)/(_left - _right); const float ee = (_top + _bottom)/(_bottom - _top); - const float ff = _near / (_near - _far); + const float ff = _oglNdc ? (_near + _far)/(_near - _far) : _near/(_near - _far); memset(_result, 0, sizeof(float)*16); _result[ 0] = aa; diff --git a/3rdparty/bx/include/bx/handlealloc.h b/3rdparty/bx/include/bx/handlealloc.h index d947256a9e2..7b10209ab2d 100644 --- a/3rdparty/bx/include/bx/handlealloc.h +++ b/3rdparty/bx/include/bx/handlealloc.h @@ -253,7 +253,7 @@ namespace bx } private: - void insertBefore(int16_t _before, uint16_t _handle) + void insertBefore(uint16_t _before, uint16_t _handle) { Link& curr = m_links[_handle]; curr.m_next = _before; diff --git a/3rdparty/bx/include/bx/os.h b/3rdparty/bx/include/bx/os.h index 50fca7f0fbe..074ec0e513c 100644 --- a/3rdparty/bx/include/bx/os.h +++ b/3rdparty/bx/include/bx/os.h @@ -20,16 +20,17 @@ || BX_PLATFORM_NACL \ || BX_PLATFORM_OSX \ || BX_PLATFORM_PS4 \ - || BX_PLATFORM_RPI - + || BX_PLATFORM_RPI \ + || BX_PLATFORM_STEAMLINK # include // sched_yield # if BX_PLATFORM_BSD \ || BX_PLATFORM_IOS \ || BX_PLATFORM_NACL \ || BX_PLATFORM_OSX \ - || BX_PLATFORM_PS4 + || BX_PLATFORM_PS4 \ + || BX_PLATFORM_STEAMLINK # include // mach_port_t -# endif // BX_PLATFORM_IOS || BX_PLATFORM_OSX || BX_PLATFORM_NACL +# endif // BX_PLATFORM_* # if BX_PLATFORM_NACL # include // nanosleep @@ -42,7 +43,9 @@ # if BX_PLATFORM_ANDROID # include // mallinfo -# elif BX_PLATFORM_LINUX || BX_PLATFORM_RPI +# elif BX_PLATFORM_LINUX \ + || BX_PLATFORM_RPI \ + || BX_PLATFORM_STEAMLINK # include // syscall # include # elif BX_PLATFORM_OSX @@ -99,7 +102,7 @@ namespace bx { #if BX_PLATFORM_WINDOWS return ::GetCurrentThreadId(); -#elif BX_PLATFORM_LINUX || BX_PLATFORM_RPI +#elif BX_PLATFORM_LINUX || BX_PLATFORM_RPI || BX_PLATFORM_STEAMLINK return (pid_t)::syscall(SYS_gettid); #elif BX_PLATFORM_IOS || BX_PLATFORM_OSX return (mach_port_t)::pthread_mach_thread_np(pthread_self() ); diff --git a/3rdparty/bx/include/bx/platform.h b/3rdparty/bx/include/bx/platform.h index c41ae0d11be..3f245d5dff9 100644 --- a/3rdparty/bx/include/bx/platform.h +++ b/3rdparty/bx/include/bx/platform.h @@ -22,6 +22,7 @@ #define BX_PLATFORM_PS4 0 #define BX_PLATFORM_QNX 0 #define BX_PLATFORM_RPI 0 +#define BX_PLATFORM_STEAMLINK 0 #define BX_PLATFORM_WINDOWS 0 #define BX_PLATFORM_WINRT 0 #define BX_PLATFORM_XBOX360 0 @@ -152,20 +153,24 @@ # undef BX_PLATFORM_WINRT # define BX_PLATFORM_WINRT 1 # endif -#elif defined(__VCCOREVER__) -// RaspberryPi compiler defines __linux__ -# undef BX_PLATFORM_RPI -# define BX_PLATFORM_RPI 1 -#elif defined(__native_client__) -// NaCl compiler defines __linux__ -# include -# undef BX_PLATFORM_NACL -# define BX_PLATFORM_NACL PPAPI_RELEASE #elif defined(__ANDROID__) // Android compiler defines __linux__ # include # undef BX_PLATFORM_ANDROID # define BX_PLATFORM_ANDROID __ANDROID_API__ +#elif defined(__native_client__) +// NaCl compiler defines __linux__ +# include +# undef BX_PLATFORM_NACL +# define BX_PLATFORM_NACL PPAPI_RELEASE +#elif defined(__STEAMLINK__) +// SteamLink compiler defines __linux__ +# undef BX_PLATFORM_STEAMLINK +# define BX_PLATFORM_STEAMLINK 1 +#elif defined(__VCCOREVER__) +// RaspberryPi compiler defines __linux__ +# undef BX_PLATFORM_RPI +# define BX_PLATFORM_RPI 1 #elif defined(__linux__) # undef BX_PLATFORM_LINUX # define BX_PLATFORM_LINUX 1 @@ -204,6 +209,7 @@ || BX_PLATFORM_NACL \ || BX_PLATFORM_OSX \ || BX_PLATFORM_QNX \ + || BX_PLATFORM_STEAMLINK \ || BX_PLATFORM_PS4 \ || BX_PLATFORM_RPI \ ) @@ -223,15 +229,15 @@ BX_STRINGIZE(__clang_minor__) "." \ BX_STRINGIZE(__clang_patchlevel__) #elif BX_COMPILER_MSVC -# if BX_COMPILER_MSVC >= 1900 +# if BX_COMPILER_MSVC >= 1900 // Visual Studio 2015 # define BX_COMPILER_NAME "MSVC 14.0" -# elif BX_COMPILER_MSVC >= 1800 +# elif BX_COMPILER_MSVC >= 1800 // Visual Studio 2013 # define BX_COMPILER_NAME "MSVC 12.0" -# elif BX_COMPILER_MSVC >= 1700 +# elif BX_COMPILER_MSVC >= 1700 // Visual Studio 2012 # define BX_COMPILER_NAME "MSVC 11.0" -# elif BX_COMPILER_MSVC >= 1600 +# elif BX_COMPILER_MSVC >= 1600 // Visual Studio 2010 # define BX_COMPILER_NAME "MSVC 10.0" -# elif BX_COMPILER_MSVC >= 1500 +# elif BX_COMPILER_MSVC >= 1500 // Visual Studio 2008 # define BX_COMPILER_NAME "MSVC 9.0" # else # define BX_COMPILER_NAME "MSVC" @@ -263,6 +269,8 @@ # define BX_PLATFORM_NAME "QNX" #elif BX_PLATFORM_RPI # define BX_PLATFORM_NAME "RaspberryPi" +#elif BX_PLATFORM_STEAMLINK +# define BX_PLATFORM_NAME "SteamLink" #elif BX_PLATFORM_WINDOWS # define BX_PLATFORM_NAME "Windows" #elif BX_PLATFORM_WINRT diff --git a/3rdparty/bx/include/bx/readerwriter.h b/3rdparty/bx/include/bx/readerwriter.h index c673eed388a..ef8c810a870 100644 --- a/3rdparty/bx/include/bx/readerwriter.h +++ b/3rdparty/bx/include/bx/readerwriter.h @@ -12,6 +12,7 @@ #include "bx.h" #include "allocator.h" +#include "error.h" #include "uint32_t.h" #if BX_COMPILER_MSVC_COMPATIBLE @@ -22,6 +23,10 @@ # define ftello64 ftello #endif // BX_ +BX_ERROR_RESULT(BX_ERROR_READERWRITER_OPEN, BX_MAKEFOURCC('R', 'W', 0, 1) ); +BX_ERROR_RESULT(BX_ERROR_READERWRITER_READ, BX_MAKEFOURCC('R', 'W', 0, 2) ); +BX_ERROR_RESULT(BX_ERROR_READERWRITER_WRITE, BX_MAKEFOURCC('R', 'W', 0, 3) ); + namespace bx { struct Whence @@ -37,7 +42,7 @@ namespace bx struct BX_NO_VTABLE ReaderI { virtual ~ReaderI() = 0; - virtual int32_t read(void* _data, int32_t _size) = 0; + virtual int32_t read(void* _data, int32_t _size, Error* _err) = 0; }; inline ReaderI::~ReaderI() @@ -47,7 +52,7 @@ namespace bx struct BX_NO_VTABLE WriterI { virtual ~WriterI() = 0; - virtual int32_t write(const void* _data, int32_t _size) = 0; + virtual int32_t write(const void* _data, int32_t _size, Error* _err) = 0; }; inline WriterI::~WriterI() @@ -65,40 +70,46 @@ namespace bx } /// Read data. - inline int32_t read(ReaderI* _reader, void* _data, int32_t _size) + inline int32_t read(ReaderI* _reader, void* _data, int32_t _size, Error* _err = NULL) { - return _reader->read(_data, _size); + BX_ERROR_SCOPE(_err); + return _reader->read(_data, _size, _err); } /// Write value. template - inline int32_t read(ReaderI* _reader, Ty& _value) + inline int32_t read(ReaderI* _reader, Ty& _value, Error* _err = NULL) { + BX_ERROR_SCOPE(_err); BX_STATIC_ASSERT(BX_TYPE_IS_POD(Ty) ); - return _reader->read(&_value, sizeof(Ty) ); + return _reader->read(&_value, sizeof(Ty), _err); } /// Read value and converts it to host endianess. _fromLittleEndian specifies /// underlying stream endianess. template - inline int32_t readHE(ReaderI* _reader, Ty& _value, bool _fromLittleEndian) + inline int32_t readHE(ReaderI* _reader, Ty& _value, bool _fromLittleEndian, Error* _err = NULL) { + BX_ERROR_SCOPE(_err); BX_STATIC_ASSERT(BX_TYPE_IS_POD(Ty) ); Ty value; - int32_t result = _reader->read(&value, sizeof(Ty) ); + int32_t result = _reader->read(&value, sizeof(Ty), _err); _value = toHostEndian(value, _fromLittleEndian); return result; } /// Write data. - inline int32_t write(WriterI* _writer, const void* _data, int32_t _size) + inline int32_t write(WriterI* _writer, const void* _data, int32_t _size, Error* _err = NULL) { - return _writer->write(_data, _size); + BX_ERROR_SCOPE(_err); + return _writer->write(_data, _size, _err); } /// Write repeat the same value. - inline int32_t writeRep(WriterI* _writer, uint8_t _byte, int32_t _size) + inline int32_t writeRep(WriterI* _writer, uint8_t _byte, int32_t _size, Error* _err = NULL) { + BX_ERROR_SCOPE(_err); + const uint32_t tmp0 = uint32_sels(64 - _size, 64, _size); const uint32_t tmp1 = uint32_sels(256 - _size, 256, tmp0); const uint32_t blockSize = uint32_sels(1024 - _size, 1024, tmp1); @@ -108,7 +119,7 @@ namespace bx int32_t size = 0; while (0 < _size) { - int32_t bytes = write(_writer, temp, uint32_min(blockSize, _size) ); + int32_t bytes = write(_writer, temp, uint32_min(blockSize, _size), _err); size += bytes; _size -= bytes; } @@ -118,29 +129,32 @@ namespace bx /// Write value. template - inline int32_t write(WriterI* _writer, const Ty& _value) + inline int32_t write(WriterI* _writer, const Ty& _value, Error* _err = NULL) { + BX_ERROR_SCOPE(_err); BX_STATIC_ASSERT(BX_TYPE_IS_POD(Ty) ); - return _writer->write(&_value, sizeof(Ty) ); + return _writer->write(&_value, sizeof(Ty), _err); } /// Write value as little endian. template - inline int32_t writeLE(WriterI* _writer, const Ty& _value) + inline int32_t writeLE(WriterI* _writer, const Ty& _value, Error* _err = NULL) { + BX_ERROR_SCOPE(_err); BX_STATIC_ASSERT(BX_TYPE_IS_POD(Ty) ); Ty value = toLittleEndian(_value); - int32_t result = _writer->write(&value, sizeof(Ty) ); + int32_t result = _writer->write(&value, sizeof(Ty), _err); return result; } /// Write value as big endian. template - inline int32_t writeBE(WriterI* _writer, const Ty& _value) + inline int32_t writeBE(WriterI* _writer, const Ty& _value, Error* _err = NULL) { + BX_ERROR_SCOPE(_err); BX_STATIC_ASSERT(BX_TYPE_IS_POD(Ty) ); Ty value = toBigEndian(_value); - int32_t result = _writer->write(&value, sizeof(Ty) ); + int32_t result = _writer->write(&value, sizeof(Ty), _err); return result; } @@ -198,34 +212,36 @@ namespace bx struct BX_NO_VTABLE FileReaderI : public ReaderSeekerI { - virtual int32_t open(const char* _filePath) = 0; - virtual int32_t close() = 0; + virtual bool open(const char* _filePath, Error* _err) = 0; + virtual void close() = 0; }; struct BX_NO_VTABLE FileWriterI : public WriterSeekerI { - virtual int32_t open(const char* _filePath, bool _append = false) = 0; - virtual int32_t close() = 0; + virtual bool open(const char* _filePath, bool _append, Error* _err) = 0; + virtual void close() = 0; }; - inline int32_t open(FileReaderI* _reader, const char* _filePath) + inline bool open(FileReaderI* _reader, const char* _filePath, Error* _err = NULL) { - return _reader->open(_filePath); + BX_ERROR_USE_TEMP_WHEN_NULL(_err); + return _reader->open(_filePath, _err); } - inline int32_t close(FileReaderI* _reader) + inline void close(FileReaderI* _reader) { - return _reader->close(); + _reader->close(); } - inline int32_t open(FileWriterI* _writer, const char* _filePath, bool _append = false) + inline bool open(FileWriterI* _writer, const char* _filePath, bool _append = false, Error* _err = NULL) { - return _writer->open(_filePath, _append); + BX_ERROR_USE_TEMP_WHEN_NULL(_err); + return _writer->open(_filePath, _append, _err); } - inline int32_t close(FileWriterI* _writer) + inline void close(FileWriterI* _writer) { - return _writer->close(); + _writer->close(); } struct BX_NO_VTABLE MemoryBlockI @@ -332,8 +348,10 @@ namespace bx return m_pos; } - virtual int32_t write(const void* /*_data*/, int32_t _size) BX_OVERRIDE + virtual int32_t write(const void* /*_data*/, int32_t _size, Error* _err) BX_OVERRIDE { + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + int32_t morecore = int32_t(m_pos - m_top) + _size; if (0 < morecore) @@ -344,6 +362,10 @@ namespace bx int64_t reminder = m_top-m_pos; int32_t size = uint32_min(_size, int32_t(reminder > INT32_MAX ? INT32_MAX : reminder) ); m_pos += size; + if (size != _size) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_WRITE, "SizerWriter: write truncated."); + } return size; } @@ -386,12 +408,18 @@ namespace bx return m_pos; } - virtual int32_t read(void* _data, int32_t _size) BX_OVERRIDE + virtual int32_t read(void* _data, int32_t _size, Error* _err) BX_OVERRIDE { + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + int64_t reminder = m_top-m_pos; int32_t size = uint32_min(_size, int32_t(reminder > INT32_MAX ? INT32_MAX : reminder) ); memcpy(_data, &m_data[m_pos], size); m_pos += size; + if (size != _size) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_READ, "MemoryReader: read truncated."); + } return size; } @@ -452,8 +480,10 @@ namespace bx return m_pos; } - virtual int32_t write(const void* _data, int32_t _size) BX_OVERRIDE + virtual int32_t write(const void* _data, int32_t _size, Error* _err) BX_OVERRIDE { + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + int32_t morecore = int32_t(m_pos - m_size) + _size; if (0 < morecore) @@ -468,6 +498,10 @@ namespace bx memcpy(&m_data[m_pos], _data, size); m_pos += size; m_top = int64_max(m_top, m_pos); + if (size != _size) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_WRITE, "MemoryWriter: write truncated."); + } return size; } @@ -509,16 +543,23 @@ namespace bx { } - virtual int32_t open(const char* _filePath) BX_OVERRIDE + virtual bool open(const char* _filePath, Error* _err) BX_OVERRIDE { + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + m_file = fopen(_filePath, "rb"); - return NULL == m_file; + if (NULL == m_file) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_OPEN, "CrtFileReader: Failed to open file."); + return false; + } + + return true; } - virtual int32_t close() BX_OVERRIDE + virtual void close() BX_OVERRIDE { fclose(m_file); - return 0; } virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) BX_OVERRIDE @@ -527,9 +568,18 @@ namespace bx return ftello64(m_file); } - virtual int32_t read(void* _data, int32_t _size) BX_OVERRIDE + virtual int32_t read(void* _data, int32_t _size, Error* _err) BX_OVERRIDE { - return (int32_t)fread(_data, 1, _size, m_file); + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + + int32_t size = (int32_t)fread(_data, 1, _size, m_file); + if (size != _size) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_READ, "CrtFileReader: read failed."); + return size >= 0 ? size : 0; + } + + return size; } private: @@ -548,24 +598,22 @@ namespace bx { } - virtual int32_t open(const char* _filePath, bool _append = false) BX_OVERRIDE + virtual bool open(const char* _filePath, bool _append, Error* _err) BX_OVERRIDE { - if (_append) + m_file = fopen(_filePath, _append ? "ab" : "wb"); + + if (NULL == m_file) { - m_file = fopen(_filePath, "ab"); - } - else - { - m_file = fopen(_filePath, "wb"); + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_OPEN, "CrtFileWriter: Failed to open file."); + return false; } - return NULL == m_file; + return true; } - virtual int32_t close() BX_OVERRIDE + virtual void close() BX_OVERRIDE { fclose(m_file); - return 0; } virtual int64_t seek(int64_t _offset = 0, Whence::Enum _whence = Whence::Current) BX_OVERRIDE @@ -574,9 +622,18 @@ namespace bx return ftello64(m_file); } - virtual int32_t write(const void* _data, int32_t _size) BX_OVERRIDE + virtual int32_t write(const void* _data, int32_t _size, Error* _err) BX_OVERRIDE { - return (int32_t)fwrite(_data, 1, _size, m_file); + BX_CHECK(NULL != _err, "Reader/Writer interface calling functions must handle errors."); + + int32_t size = (int32_t)fwrite(_data, 1, _size, m_file); + if (size != _size) + { + BX_ERROR_SET(_err, BX_ERROR_READERWRITER_WRITE, "CrtFileWriter: write failed."); + return size >= 0 ? size : 0; + } + + return size; } private: diff --git a/3rdparty/bx/makefile b/3rdparty/bx/makefile index 5f3455bdbff..685479b05d8 100644 --- a/3rdparty/bx/makefile +++ b/3rdparty/bx/makefile @@ -220,3 +220,8 @@ tools/bin/$(OS)/bin2c$(EXE): .build/$(BUILD_OUTPUT_DIR)/bin/bin2cRelease$(EXE) $(SILENT) cp $(<) $(@) tools: tools/bin/$(OS)/bin2c$(EXE) + +.build/$(BUILD_OUTPUT_DIR)/bin/bx.testRelease$(EXE): .build/projects/$(BUILD_PROJECT_DIR) + $(SILENT) make -C .build/projects/$(BUILD_PROJECT_DIR) bx.test config=$(BUILD_TOOLS_CONFIG) + +test: .build/$(BUILD_OUTPUT_DIR)/bin/bx.testRelease$(EXE) diff --git a/3rdparty/bx/scripts/genie.lua b/3rdparty/bx/scripts/genie.lua index 2399a70ce3d..580e3d66157 100644 --- a/3rdparty/bx/scripts/genie.lua +++ b/3rdparty/bx/scripts/genie.lua @@ -58,17 +58,18 @@ project "bx.test" path.join(BX_DIR, "tests/**.H"), } - configuration { "vs*" } + configuration { "vs* or mingw*" } + links { + "psapi", + } configuration { "android*" } - kind "ConsoleApp" targetextension ".so" linkoptions { "-shared", } configuration { "nacl or nacl-arm" } - kind "ConsoleApp" targetextension ".nexe" links { "ppapi", @@ -76,7 +77,6 @@ project "bx.test" } configuration { "pnacl" } - kind "ConsoleApp" targetextension ".pexe" links { "ppapi", diff --git a/3rdparty/bx/scripts/toolchain.lua b/3rdparty/bx/scripts/toolchain.lua index 4b616c24c2a..ad3a3e647e1 100644 --- a/3rdparty/bx/scripts/toolchain.lua +++ b/3rdparty/bx/scripts/toolchain.lua @@ -13,29 +13,30 @@ function toolchain(_buildDir, _libDir) value = "GCC", description = "Choose GCC flavor", allowed = { - { "android-arm", "Android - ARM" }, - { "android-mips", "Android - MIPS" }, - { "android-x86", "Android - x86" }, - { "asmjs", "Emscripten/asm.js" }, - { "freebsd", "FreeBSD" }, - { "linux-gcc", "Linux (GCC compiler)" }, - { "linux-gcc-5", "Linux (GCC-5 compiler)" }, - { "linux-clang", "Linux (Clang compiler)" }, - { "linux-mips-gcc", "Linux (MIPS, GCC compiler)" }, - { "linux-arm-gcc", "Linux (ARM, GCC compiler)" }, - { "ios-arm", "iOS - ARM" }, - { "ios-simulator", "iOS - Simulator" }, - { "tvos-arm64", "tvOS - ARM64" }, - { "tvos-simulator", "tvOS - Simulator" }, - { "mingw-gcc", "MinGW" }, - { "mingw-clang", "MinGW (clang compiler)" }, - { "nacl", "Native Client" }, - { "nacl-arm", "Native Client - ARM" }, - { "osx", "OSX" }, - { "pnacl", "Native Client - PNaCl" }, - { "ps4", "PS4" }, - { "qnx-arm", "QNX/Blackberry - ARM" }, - { "rpi", "RaspberryPi" }, + { "android-arm", "Android - ARM" }, + { "android-mips", "Android - MIPS" }, + { "android-x86", "Android - x86" }, + { "asmjs", "Emscripten/asm.js" }, + { "freebsd", "FreeBSD" }, + { "linux-gcc", "Linux (GCC compiler)" }, + { "linux-gcc-5", "Linux (GCC-5 compiler)" }, + { "linux-clang", "Linux (Clang compiler)" }, + { "linux-mips-gcc", "Linux (MIPS, GCC compiler)" }, + { "linux-arm-gcc", "Linux (ARM, GCC compiler)" }, + { "linux-steamlink", "Steam Link" }, + { "ios-arm", "iOS - ARM" }, + { "ios-simulator", "iOS - Simulator" }, + { "tvos-arm64", "tvOS - ARM64" }, + { "tvos-simulator", "tvOS - Simulator" }, + { "mingw-gcc", "MinGW" }, + { "mingw-clang", "MinGW (clang compiler)" }, + { "nacl", "Native Client" }, + { "nacl-arm", "Native Client - ARM" }, + { "osx", "OSX" }, + { "pnacl", "Native Client - PNaCl" }, + { "ps4", "PS4" }, + { "qnx-arm", "QNX/Blackberry - ARM" }, + { "rpi", "RaspberryPi" }, }, } @@ -86,6 +87,11 @@ function toolchain(_buildDir, _libDir) description = "Set tvOS target version (default: 9.0).", } + newoption { + trigger = "with-dynamic-runtime", + description = "Dynamically link with the runtime rather than statically", + } + -- Avoid error when invoking genie --help. if (_ACTION == nil) then return false end @@ -157,7 +163,7 @@ function toolchain(_buildDir, _libDir) elseif "asmjs" == _OPTIONS["gcc"] then if not os.getenv("EMSCRIPTEN") then - print("Set EMSCRIPTEN enviroment variables.") + print("Set EMSCRIPTEN enviroment variable.") end premake.gcc.cc = "$(EMSCRIPTEN)/emcc" @@ -214,6 +220,16 @@ function toolchain(_buildDir, _libDir) elseif "linux-arm-gcc" == _OPTIONS["gcc"] then location (path.join(_buildDir, "projects", _ACTION .. "-linux-arm-gcc")) + elseif "linux-steamlink" == _OPTIONS["gcc"] then + if not os.getenv("MARVELL_SDK_PATH") then + print("Set MARVELL_SDK_PATH enviroment variable.") + end + + premake.gcc.cc = "$(MARVELL_SDK_PATH)/toolchain/bin/armv7a-cros-linux-gnueabi-gcc" + premake.gcc.cxx = "$(MARVELL_SDK_PATH)/toolchain/bin/armv7a-cros-linux-gnueabi-g++" + premake.gcc.ar = "$(MARVELL_SDK_PATH)/toolchain/bin/armv7a-cros-linux-gnueabi-ar" + location (path.join(_buildDir, "projects", _ACTION .. "-linux-steamlink")) + elseif "mingw-gcc" == _OPTIONS["gcc"] then premake.gcc.cc = "$(MINGW)/bin/x86_64-w64-mingw32-gcc" premake.gcc.cxx = "$(MINGW)/bin/x86_64-w64-mingw32-g++" @@ -231,7 +247,7 @@ function toolchain(_buildDir, _libDir) elseif "nacl" == _OPTIONS["gcc"] then if not os.getenv("NACL_SDK_ROOT") then - print("Set NACL_SDK_ROOT enviroment variables.") + print("Set NACL_SDK_ROOT enviroment variable.") end naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_x86_newlib/bin/x86_64-nacl-" @@ -249,7 +265,7 @@ function toolchain(_buildDir, _libDir) elseif "nacl-arm" == _OPTIONS["gcc"] then if not os.getenv("NACL_SDK_ROOT") then - print("Set NACL_SDK_ROOT enviroment variables.") + print("Set NACL_SDK_ROOT enviroment variable.") end naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_arm_newlib/bin/arm-nacl-" @@ -277,7 +293,7 @@ function toolchain(_buildDir, _libDir) elseif "pnacl" == _OPTIONS["gcc"] then if not os.getenv("NACL_SDK_ROOT") then - print("Set NACL_SDK_ROOT enviroment variables.") + print("Set NACL_SDK_ROOT enviroment variable.") end naclToolchain = "$(NACL_SDK_ROOT)/toolchain/win_pnacl/bin/pnacl-" @@ -295,7 +311,7 @@ function toolchain(_buildDir, _libDir) elseif "ps4" == _OPTIONS["gcc"] then if not os.getenv("PS4_SDK_ROOT") then - print("Set PS4_SDK_ROOT enviroment variables.") + print("Set PS4_SDK_ROOT enviroment variable.") end ps4Toolchain = "$(PS4_SDK_ROOT)/host_tools/bin/orbis-" @@ -308,7 +324,7 @@ function toolchain(_buildDir, _libDir) elseif "qnx-arm" == _OPTIONS["gcc"] then if not os.getenv("QNX_HOST") then - print("Set QNX_HOST enviroment variables.") + print("Set QNX_HOST enviroment variable.") end premake.gcc.cc = "$(QNX_HOST)/usr/bin/arm-unknown-nto-qnx8.0.0eabi-gcc" @@ -376,8 +392,11 @@ function toolchain(_buildDir, _libDir) end end + if not _OPTIONS["with-dynamic-runtime"] then + flags { "StaticRuntime" } + end + flags { - "StaticRuntime", "NoPCH", "NativeWChar", "NoRTTI", @@ -686,6 +705,30 @@ function toolchain(_buildDir, _libDir) "-Wl,-z,now", } + configuration { "linux-steamlink" } + targetdir (path.join(_buildDir, "steamlink/bin")) + objdir (path.join(_buildDir, "steamlink/obj")) + libdirs { path.join(_libDir, "lib/steamlink") } + includedirs { path.join(bxDir, "include/compat/linux") } + defines { + "__STEAMLINK__=1", -- There is no special prefedined compiler symbol to detect SteamLink, faking it. + } + buildoptions { + "-std=c++0x", + "-Wfatal-errors", + "-Wunused-value", + "-Wundef", + "-pthread", + "-marm", + "-mfloat-abi=hard", + "--sysroot=$(MARVELL_SDK_PATH)/rootfs", + } + linkoptions { + "-static-libgcc", + "-static-libstdc++", + "--sysroot=$(MARVELL_SDK_PATH)/rootfs", + } + configuration { "android-arm" } targetdir (path.join(_buildDir, "android-arm/bin")) objdir (path.join(_buildDir, "android-arm/obj")) diff --git a/3rdparty/bx/tools/bin/darwin/genie b/3rdparty/bx/tools/bin/darwin/genie index f7df27427355bf20ba772d431be7a3f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7 +23,7 @@ public: { } - virtual int32_t write(const void* _data, int32_t _size) BX_OVERRIDE + virtual int32_t write(const void* _data, int32_t _size, bx::Error* /*_err*/ = NULL) BX_OVERRIDE { const char* data = (const char*)_data; m_buffer.insert(m_buffer.end(), data, data+_size); @@ -148,14 +148,14 @@ int main(int _argc, const char* _argv[]) size_t size = 0; bx::CrtFileReader fr; - if (0 == bx::open(&fr, filePath) ) + if (bx::open(&fr, filePath) ) { size = (size_t)bx::getSize(&fr); data = malloc(size); bx::read(&fr, data, size); bx::CrtFileWriter fw; - if (0 == bx::open(&fw, outFilePath) ) + if (bx::open(&fw, outFilePath) ) { Bin2cWriter writer(&fw, name); bx::write(&writer, data, size);