summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Branimir Karadzic <branimirkaradzic@gmail.com>2015-11-01 20:30:24 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2015-11-01 20:30:24 +0100
commit5664971d3bf57ad7e1a7a3138f788f714c0d7d74 (patch)
treef64fdaa35a890c4c7052f5fd173b3d0d3668a4ed
parent99c12e17c40fecb16e1ef0dc2fae0d45a86def59 (diff)
update to latest BGFX and BX
-rw-r--r--3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp201
-rw-r--r--3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h6
-rw-r--r--3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp21
-rw-r--r--3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp14
-rw-r--r--3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h40
-rw-r--r--3rdparty/bgfx/README.md8
-rw-r--r--3rdparty/bgfx/examples/01-cubes/cubes.cpp6
-rw-r--r--3rdparty/bgfx/examples/02-metaballs/fs_metaballs.bin.h51
-rw-r--r--3rdparty/bgfx/examples/02-metaballs/metaballs.cpp8
-rw-r--r--3rdparty/bgfx/examples/02-metaballs/vs_metaballs.bin.h36
-rw-r--r--3rdparty/bgfx/examples/03-raymarch/raymarch.cpp6
-rw-r--r--3rdparty/bgfx/examples/04-mesh/mesh.cpp6
-rw-r--r--3rdparty/bgfx/examples/05-instancing/instancing.cpp6
-rw-r--r--3rdparty/bgfx/examples/06-bump/bump.cpp6
-rw-r--r--3rdparty/bgfx/examples/07-callback/callback.cpp11
-rw-r--r--3rdparty/bgfx/examples/08-update/update.cpp663
-rw-r--r--3rdparty/bgfx/examples/09-hdr/hdr.cpp52
-rw-r--r--3rdparty/bgfx/examples/10-font/font.cpp9
-rw-r--r--3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp7
-rw-r--r--3rdparty/bgfx/examples/12-lod/fs_tree.sc10
-rw-r--r--3rdparty/bgfx/examples/12-lod/lod.cpp452
-rw-r--r--3rdparty/bgfx/examples/13-stencil/fs_stencil_texture_lightning.sc4
-rw-r--r--3rdparty/bgfx/examples/13-stencil/stencil.cpp6
-rw-r--r--3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp6
-rw-r--r--3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sh6
-rw-r--r--3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp6
-rw-r--r--3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh8
-rw-r--r--3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh60
-rw-r--r--3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_texture.sc6
-rw-r--r--3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur.sc10
-rw-r--r--3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur_vsm.sc11
-rw-r--r--3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_texture.sc4
-rw-r--r--3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth.sc4
-rw-r--r--3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth_vsm.sc4
-rw-r--r--3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur.sc10
-rw-r--r--3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur_vsm.sc11
-rw-r--r--3rdparty/bgfx/examples/16-shadowmaps/shadowmaps.cpp46
-rw-r--r--3rdparty/bgfx/examples/17-drawstress/drawstress.cpp12
-rw-r--r--3rdparty/bgfx/examples/17-drawstress/fs_drawstress.bin.h14
-rw-r--r--3rdparty/bgfx/examples/17-drawstress/vs_drawstress.bin.h25
-rw-r--r--3rdparty/bgfx/examples/18-ibl/ibl.cpp6
-rw-r--r--3rdparty/bgfx/examples/19-oit/fs_oit_wb_blit.sc8
-rw-r--r--3rdparty/bgfx/examples/19-oit/fs_oit_wb_separate_blit.sc8
-rw-r--r--3rdparty/bgfx/examples/19-oit/oit.cpp6
-rw-r--r--3rdparty/bgfx/examples/20-nanovg/nanovg.cpp8
-rw-r--r--3rdparty/bgfx/examples/21-deferred/deferred.cpp18
-rw-r--r--3rdparty/bgfx/examples/22-windows/windows.cpp6
-rw-r--r--3rdparty/bgfx/examples/23-vectordisplay/main.cpp6
-rw-r--r--3rdparty/bgfx/examples/24-nbody/nbody.cpp6
-rw-r--r--3rdparty/bgfx/examples/common/bgfx_utils.cpp59
-rw-r--r--3rdparty/bgfx/examples/common/bgfx_utils.h8
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry.cpp14
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_osx.mm2
-rw-r--r--3rdparty/bgfx/examples/common/entry/entry_x11.cpp4
-rw-r--r--3rdparty/bgfx/examples/common/font/fs_font_basic.bin.h47
-rw-r--r--3rdparty/bgfx/examples/common/font/fs_font_distance_field.bin.h84
-rw-r--r--3rdparty/bgfx/examples/common/font/fs_font_distance_field_subpixel.bin.h102
-rw-r--r--3rdparty/bgfx/examples/common/font/vs_font_basic.bin.h27
-rw-r--r--3rdparty/bgfx/examples/common/font/vs_font_distance_field.bin.h27
-rw-r--r--3rdparty/bgfx/examples/common/font/vs_font_distance_field_subpixel.bin.h27
-rw-r--r--3rdparty/bgfx/examples/common/imgui/fs_imgui_color.bin.h14
-rw-r--r--3rdparty/bgfx/examples/common/imgui/fs_imgui_cubemap.bin.h26
-rw-r--r--3rdparty/bgfx/examples/common/imgui/fs_imgui_image.bin.h26
-rw-r--r--3rdparty/bgfx/examples/common/imgui/fs_imgui_image_swizz.bin.h28
-rw-r--r--3rdparty/bgfx/examples/common/imgui/fs_imgui_latlong.bin.h46
-rw-r--r--3rdparty/bgfx/examples/common/imgui/fs_imgui_texture.bin.h22
-rw-r--r--3rdparty/bgfx/examples/common/imgui/fs_ocornut_imgui.bin.h17
-rw-r--r--3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp4
-rw-r--r--3rdparty/bgfx/examples/common/imgui/vs_imgui_color.bin.h26
-rw-r--r--3rdparty/bgfx/examples/common/imgui/vs_imgui_cubemap.bin.h25
-rw-r--r--3rdparty/bgfx/examples/common/imgui/vs_imgui_image.bin.h26
-rw-r--r--3rdparty/bgfx/examples/common/imgui/vs_imgui_latlong.bin.h25
-rw-r--r--3rdparty/bgfx/examples/common/imgui/vs_imgui_texture.bin.h30
-rw-r--r--3rdparty/bgfx/examples/common/imgui/vs_ocornut_imgui.bin.h33
-rw-r--r--3rdparty/bgfx/examples/common/nanovg/fs_nanovg_fill.bin.h132
-rw-r--r--3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp2
-rw-r--r--3rdparty/bgfx/examples/common/nanovg/vs_nanovg_fill.bin.h35
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/bunny.binbin974323 -> 974323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/bunny_decimated.binbin191471 -> 191471 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/bunny_patched.binbin975611 -> 975611 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/column.binbin55507 -> 55507 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/cube.binbin930 -> 930 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/hollowcube.binbin24144 -> 24144 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/platform.binbin1607 -> 1607 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/tree.binbin100714 -> 100714 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_1.binbin63365 -> 63365 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_2.binbin25719 -> 25719 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_1.binbin36659 -> 36659 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_2.binbin27123 -> 27123 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_1.binbin16061 -> 16061 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_2.binbin10899 -> 10899 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_blit.binbin520 -> 520 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_separate_blit.binbin520 -> 520 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_particle.binbin603 -> 603 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm.binbin3573 -> 3573 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_csm.binbin6510 -> 6534 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear.binbin3545 -> 3545 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_csm.binbin6398 -> 6422 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_omni.binbin5203 -> 5203 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_omni.binbin5231 -> 5231 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard.binbin3457 -> 3457 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_csm.binbin6046 -> 6070 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear.binbin3429 -> 3429 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_csm.binbin5934 -> 5958 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_omni.binbin5087 -> 5087 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_omni.binbin5115 -> 5115 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf.binbin11918 -> 11918 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_csm.binbin39963 -> 40071 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear.binbin10842 -> 10850 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_csm.binbin35579 -> 35715 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_omni.binbin12436 -> 12436 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_omni.binbin13524 -> 13524 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm.binbin3749 -> 3717 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_csm.binbin7214 -> 7206 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear.binbin3721 -> 3689 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_csm.binbin7102 -> 7094 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_omni.binbin5379 -> 5347 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_omni.binbin5407 -> 5375 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_texture.binbin623 -> 623 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur.binbin1823 -> 1823 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur_vsm.binbin2183 -> 2183 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_texture.binbin325 -> 325 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth.binbin499 -> 499 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth_vsm.binbin499 -> 499 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur.binbin1823 -> 1823 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur_vsm.binbin2183 -> 2183 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh.binbin4815 -> 4815 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh_pd.binbin5631 -> 5631 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_stencil_texture_lightning.binbin2480 -> 2480 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx11/fs_tree.binbin1385 -> 1413 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_bump.binbin2274 -> 2278 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_callback.binbin553 -> 557 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_cubes.binbin137 -> 141 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_combine.binbin618 -> 622 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug.binbin218 -> 222 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug_line.binbin137 -> 141 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_geom.binbin696 -> 700 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_light.binbin1088 -> 1092 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_blur.binbin618 -> 622 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_bright.binbin1656 -> 1664 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lum.binbin1469 -> 1473 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lumavg.binbin1793 -> 1797 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_mesh.binbin1433 -> 1381 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_skybox.binbin525 -> 529 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_tonemap.binbin1673 -> 1677 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.binbin1661 -> 1661 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_skybox.binbin556 -> 560 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_instancing.binbin137 -> 141 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_mesh.binbin1278 -> 1206 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit.binbin183 -> 187 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb.binbin459 -> 463 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_blit.binbin429 -> 433 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate.binbin431 -> 435 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.binbin429 -> 433 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_particle.binbin404 -> 408 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_raymarching.binbin47438 -> 47442 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_black.binbin149 -> 153 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm.binbin2722 -> 2730 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_csm.binbin4503 -> 4511 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear.binbin2718 -> 2726 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_csm.binbin4467 -> 4475 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_omni.binbin3772 -> 3776 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_omni.binbin3776 -> 3780 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard.binbin2682 -> 2690 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_csm.binbin4371 -> 4379 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear.binbin2678 -> 2686 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_csm.binbin4415 -> 4423 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_omni.binbin3744 -> 3748 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_omni.binbin3728 -> 3732 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf.binbin7587 -> 7591 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_csm.binbin24492 -> 24496 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear.binbin7263 -> 7267 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_csm.binbin22312 -> 22316 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_omni.binbin7961 -> 7965 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_omni.binbin8665 -> 8669 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm.binbin2802 -> 2810 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_csm.binbin4887 -> 4895 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear.binbin2786 -> 2794 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_csm.binbin4823 -> 4831 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_omni.binbin3872 -> 3876 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_omni.binbin3888 -> 3892 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.binbin572 -> 576 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur.binbin960 -> 964 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.binbin1152 -> 1156 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth.binbin269 -> 273 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.binbin221 -> 225 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.binbin333 -> 337 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm_linear.binbin261 -> 265 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_texture.binbin218 -> 222 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth.binbin380 -> 384 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.binbin384 -> 388 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur.binbin960 -> 964 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.binbin1152 -> 1156 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_lightning.binbin1910 -> 1914 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.binbin572 -> 576 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.binbin149 -> 153 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.binbin227 -> 231 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex1.binbin201 -> 205 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.binbin201 -> 205 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.binbin149 -> 153 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.binbin227 -> 231 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex1.binbin201 -> 205 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.binbin201 -> 205 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svside.binbin277 -> 281 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.binbin149 -> 153 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.binbin227 -> 231 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidetex.binbin374 -> 378 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture.binbin218 -> 222 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture_lightning.binbin2061 -> 2065 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh.binbin2464 -> 2468 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh_pd.binbin3300 -> 3304 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow.binbin149 -> 153 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow_pd.binbin269 -> 273 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_black.binbin149 -> 153 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_lightning.binbin1976 -> 1980 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_texture.binbin572 -> 576 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture.binbin218 -> 222 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture_lightning.binbin2169 -> 2173 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_tree.binbin1002 -> 1022 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update.binbin217 -> 221 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_3d.binbin427 -> 431 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_cmp.binbin262 -> 266 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blit.binbin325 -> 329 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blur.binbin813 -> 817 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_fb.binbin337 -> 341 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump.binbin1089 -> 1093 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump_instanced.binbin1083 -> 1087 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_callback.binbin461 -> 465 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_cubes.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_combine.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug_line.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_geom.binbin1089 -> 1093 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_light.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_blur.binbin665 -> 669 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_bright.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lum.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lumavg.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_mesh.binbin577 -> 581 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_skybox.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_tonemap.binbin653 -> 657 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_mesh.binbin672 -> 676 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.binbin443 -> 447 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_instancing.binbin474 -> 478 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_mesh.binbin982 -> 986 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit.binbin553 -> 557 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit_blit.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_particle.binbin682 -> 686 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_raymarching.binbin355 -> 359 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color.binbin283 -> 287 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning.binbin802 -> 806 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_csm.binbin1451 -> 1455 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear.binbin818 -> 822 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_csm.binbin1515 -> 1519 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_omni.binbin1462 -> 1466 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_omni.binbin1398 -> 1402 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_depth.binbin283 -> 287 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_hblur.binbin754 -> 758 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth_linear.binbin351 -> 355 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture_lightning.binbin577 -> 581 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_vblur.binbin754 -> 758 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_lightning.binbin541 -> 545 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_texture.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svback.binbin437 -> 441 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svfront.binbin283 -> 287 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svside.binbin545 -> 549 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture_lightning.binbin577 -> 581 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_mesh.binbin738 -> 742 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow.binbin283 -> 287 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow_pd.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color.binbin283 -> 287 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_lightning.binbin541 -> 545 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_texture.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture_lightning.binbin577 -> 581 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_tree.binbin629 -> 633 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_update.binbin319 -> 323 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/dx9/vs_vectordisplay_fb.binbin355 -> 359 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb.binbin373 -> 371 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_blit.binbin411 -> 411 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate.binbin320 -> 318 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate_blit.binbin411 -> 411 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm.binbin4213 -> 4207 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_csm.binbin10222 -> 10204 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear.binbin4257 -> 4251 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_csm.binbin10442 -> 10424 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_omni.binbin7587 -> 7581 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_omni.binbin7541 -> 7535 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard.binbin4085 -> 4079 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_csm.binbin9678 -> 9660 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear.binbin4117 -> 4111 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_csm.binbin9814 -> 9796 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_omni.binbin7448 -> 7442 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_omni.binbin7414 -> 7408 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf.binbin15736 -> 15670 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_csm.binbin63472 -> 63214 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear.binbin15787 -> 15721 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_csm.binbin63918 -> 63660 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_omni.binbin19328 -> 19262 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_omni.binbin19273 -> 19207 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm.binbin4635 -> 4633 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_csm.binbin12152 -> 12150 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear.binbin4679 -> 4677 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_csm.binbin12372 -> 12370 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_omni.binbin8011 -> 8009 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_omni.binbin7965 -> 7963 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_texture.binbin687 -> 687 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur.binbin1746 -> 1708 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur_vsm.binbin2744 -> 2744 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth.binbin302 -> 300 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth_linear.binbin254 -> 252 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_texture.binbin211 -> 211 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth.binbin421 -> 417 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth_vsm.binbin394 -> 394 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur.binbin1746 -> 1708 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur_vsm.binbin2744 -> 2744 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh.binbin8399 -> 8399 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh_pd.binbin8652 -> 8588 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow_pd.binbin302 -> 300 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_stencil_texture_lightning.binbin2486 -> 2486 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/gles/fs_tree.binbin1303 -> 1312 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb.binbin355 -> 353 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_blit.binbin395 -> 395 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate.binbin302 -> 300 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate_blit.binbin395 -> 395 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm.binbin3976 -> 3970 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_csm.binbin9840 -> 9822 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear.binbin4020 -> 4014 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_csm.binbin10060 -> 10042 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_omni.binbin7231 -> 7225 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_omni.binbin7185 -> 7179 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard.binbin3854 -> 3848 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_csm.binbin9320 -> 9302 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear.binbin3886 -> 3880 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_csm.binbin9456 -> 9438 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_omni.binbin7098 -> 7092 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_omni.binbin7064 -> 7058 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf.binbin15123 -> 15057 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_csm.binbin61633 -> 61375 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear.binbin15168 -> 15102 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_csm.binbin62055 -> 61797 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_omni.binbin18584 -> 18518 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_omni.binbin18535 -> 18469 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm.binbin4373 -> 4371 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_csm.binbin11670 -> 11668 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear.binbin4417 -> 4415 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_csm.binbin11890 -> 11888 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_omni.binbin7630 -> 7628 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_omni.binbin7584 -> 7582 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_texture.binbin602 -> 602 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur.binbin1619 -> 1581 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur_vsm.binbin2557 -> 2557 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth.binbin290 -> 288 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth_linear.binbin242 -> 240 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_texture.binbin160 -> 160 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth.binbin356 -> 352 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth_vsm.binbin329 -> 329 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur.binbin1619 -> 1581 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur_vsm.binbin2557 -> 2557 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh.binbin7916 -> 7916 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh_pd.binbin8286 -> 8222 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow_pd.binbin290 -> 288 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_stencil_texture_lightning.binbin2308 -> 2308 bytes
-rw-r--r--3rdparty/bgfx/examples/runtime/shaders/glsl/fs_tree.binbin1181 -> 1190 bytes
-rw-r--r--3rdparty/bgfx/include/bgfx/bgfx.h144
-rw-r--r--3rdparty/bgfx/include/bgfx/bgfxdefines.h28
-rw-r--r--3rdparty/bgfx/include/bgfx/c99/bgfx.h7
-rw-r--r--3rdparty/bgfx/scripts/bgfx.lua11
-rw-r--r--3rdparty/bgfx/src/bgfx.cpp206
-rw-r--r--3rdparty/bgfx/src/bgfx_p.h139
-rw-r--r--3rdparty/bgfx/src/config.h5
-rw-r--r--3rdparty/bgfx/src/glimports.h11
-rw-r--r--3rdparty/bgfx/src/renderer_d3d11.cpp278
-rw-r--r--3rdparty/bgfx/src/renderer_d3d11.h3
-rw-r--r--3rdparty/bgfx/src/renderer_d3d12.cpp226
-rw-r--r--3rdparty/bgfx/src/renderer_d3d12.h7
-rw-r--r--3rdparty/bgfx/src/renderer_d3d9.cpp498
-rw-r--r--3rdparty/bgfx/src/renderer_d3d9.h25
-rw-r--r--3rdparty/bgfx/src/renderer_gl.cpp143
-rw-r--r--3rdparty/bgfx/src/renderer_mtl.h5
-rw-r--r--3rdparty/bgfx/src/renderer_mtl.mm153
-rw-r--r--3rdparty/bgfx/src/renderer_null.cpp4
-rw-r--r--3rdparty/bgfx/src/shader_dxbc.cpp19
-rw-r--r--3rdparty/bgfx/tools/shaderc/shaderc.cpp17
-rw-r--r--3rdparty/bx/include/bx/radixsort.h126
-rw-r--r--3rdparty/bx/include/compat/msvc/pre1600/stdint.h17
-rw-r--r--3rdparty/bx/include/tinystl/buffer.h22
-rw-r--r--3rdparty/bx/include/tinystl/vector.h12
-rw-r--r--3rdparty/bx/scripts/toolchain.lua17
394 files changed, 3407 insertions, 1578 deletions
diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
index 80f4b6eaf03..81a6d0795e8 100644
--- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
+++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
@@ -1,4 +1,4 @@
-// ImGui library v1.46 WIP
+// ImGui library v1.47 WIP
// Main code & documentation
// See ImGui::ShowTestWindow() in imgui_demo.cpp for demo code.
@@ -665,7 +665,7 @@ ImGuiStyle::ImGuiStyle()
Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.40f, 0.40f, 0.80f, 0.20f);
Colors[ImGuiCol_TitleBgActive] = ImVec4(0.50f, 0.50f, 1.00f, 0.55f);
Colors[ImGuiCol_MenuBarBg] = ImVec4(0.40f, 0.40f, 0.55f, 0.80f);
- Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.40f, 0.40f, 0.80f, 0.15f);
+ Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.20f, 0.25f, 0.30f, 0.60f);
Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.40f, 0.40f, 0.80f, 0.30f);
Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.40f, 0.40f, 0.80f, 0.40f);
Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.80f, 0.50f, 0.50f, 0.40f);
@@ -761,6 +761,8 @@ void ImGuiIO::AddInputCharactersUTF8(const char* utf8_chars)
// HELPERS
//-----------------------------------------------------------------------------
+#define IM_F32_TO_INT8(_VAL) ((int)((_VAL) * 255.0f + 0.5f))
+
#define IM_INT_MIN (-2147483647-1)
#define IM_INT_MAX (2147483647)
@@ -1083,10 +1085,11 @@ ImVec4 ImGui::ColorConvertU32ToFloat4(ImU32 in)
ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in)
{
- ImU32 out = ((ImU32)(ImSaturate(in.x)*255.f));
- out |= ((ImU32)(ImSaturate(in.y)*255.f) << 8);
- out |= ((ImU32)(ImSaturate(in.z)*255.f) << 16);
- out |= ((ImU32)(ImSaturate(in.w)*255.f) << 24);
+ ImU32 out;
+ out = ((ImU32)IM_F32_TO_INT8(ImSaturate(in.x)));
+ out |= ((ImU32)IM_F32_TO_INT8(ImSaturate(in.y))) << 8;
+ out |= ((ImU32)IM_F32_TO_INT8(ImSaturate(in.z))) << 16;
+ out |= ((ImU32)IM_F32_TO_INT8(ImSaturate(in.w))) << 24;
return out;
}
@@ -1524,7 +1527,7 @@ ImGuiWindow::ImGuiWindow(const char* name)
SetWindowPosAllowFlags = SetWindowSizeAllowFlags = SetWindowCollapsedAllowFlags = ImGuiSetCond_Always | ImGuiSetCond_Once | ImGuiSetCond_FirstUseEver | ImGuiSetCond_Appearing;
SetWindowPosCenterWanted = false;
- LastFrameDrawn = -1;
+ LastFrameActive = -1;
ItemWidthDefault = 0.0f;
FontWindowScale = 1.0f;
@@ -3495,7 +3498,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
}
const int current_frame = ImGui::GetFrameCount();
- const bool first_begin_of_the_frame = (window->LastFrameDrawn != current_frame);
+ const bool first_begin_of_the_frame = (window->LastFrameActive != current_frame);
if (first_begin_of_the_frame)
window->Flags = (ImGuiWindowFlags)flags;
else
@@ -3508,23 +3511,25 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
CheckStacksSize(window, true);
IM_ASSERT(parent_window != NULL || !(flags & ImGuiWindowFlags_ChildWindow));
- bool window_was_visible = (window->LastFrameDrawn == current_frame - 1); // Not using !WasActive because the implicit "Debug" window would always toggle off->on
+ bool window_was_active = (window->LastFrameActive == current_frame - 1); // Not using !WasActive because the implicit "Debug" window would always toggle off->on
if (flags & ImGuiWindowFlags_Popup)
{
ImGuiPopupRef& popup_ref = g.OpenedPopupStack[g.CurrentPopupStack.Size];
- window_was_visible &= (window->PopupID == popup_ref.PopupID);
- window_was_visible &= (window == popup_ref.Window);
+ window_was_active &= (window->PopupID == popup_ref.PopupID);
+ window_was_active &= (window == popup_ref.Window);
popup_ref.Window = window;
g.CurrentPopupStack.push_back(popup_ref);
window->PopupID = popup_ref.PopupID;
}
+
+ const bool window_appearing_after_being_hidden = (window->HiddenFrames == 1);
// Process SetNextWindow***() calls
bool window_pos_set_by_api = false, window_size_set_by_api = false;
if (g.SetNextWindowPosCond)
{
const ImVec2 backup_cursor_pos = window->DC.CursorPos; // FIXME: not sure of the exact reason of this anymore :( need to look into that.
- if (!window_was_visible) window->SetWindowPosAllowFlags |= ImGuiSetCond_Appearing;
+ if (!window_was_active || window_appearing_after_being_hidden) window->SetWindowPosAllowFlags |= ImGuiSetCond_Appearing;
window_pos_set_by_api = (window->SetWindowPosAllowFlags & g.SetNextWindowPosCond) != 0;
if (window_pos_set_by_api && ImLengthSqr(g.SetNextWindowPosVal - ImVec2(-FLT_MAX,-FLT_MAX)) < 0.001f)
{
@@ -3533,16 +3538,16 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
}
else
{
- ImGui::SetWindowPos(g.SetNextWindowPosVal, g.SetNextWindowPosCond);
+ SetWindowPos(window, g.SetNextWindowPosVal, g.SetNextWindowPosCond);
}
window->DC.CursorPos = backup_cursor_pos;
g.SetNextWindowPosCond = 0;
}
if (g.SetNextWindowSizeCond)
{
- if (!window_was_visible) window->SetWindowSizeAllowFlags |= ImGuiSetCond_Appearing;
+ if (!window_was_active || window_appearing_after_being_hidden) window->SetWindowSizeAllowFlags |= ImGuiSetCond_Appearing;
window_size_set_by_api = (window->SetWindowSizeAllowFlags & g.SetNextWindowSizeCond) != 0;
- ImGui::SetWindowSize(g.SetNextWindowSizeVal, g.SetNextWindowSizeCond);
+ SetWindowSize(window, g.SetNextWindowSizeVal, g.SetNextWindowSizeCond);
g.SetNextWindowSizeCond = 0;
}
if (g.SetNextWindowContentSizeCond)
@@ -3556,8 +3561,8 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
}
if (g.SetNextWindowCollapsedCond)
{
- if (!window_was_visible) window->SetWindowCollapsedAllowFlags |= ImGuiSetCond_Appearing;
- ImGui::SetWindowCollapsed(g.SetNextWindowCollapsedVal, g.SetNextWindowCollapsedCond);
+ if (!window_was_active || window_appearing_after_being_hidden) window->SetWindowCollapsedAllowFlags |= ImGuiSetCond_Appearing;
+ SetWindowCollapsed(window, g.SetNextWindowCollapsedVal, g.SetNextWindowCollapsedCond);
g.SetNextWindowCollapsedCond = 0;
}
if (g.SetNextWindowFocus)
@@ -3588,7 +3593,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
window->BeginCount = 0;
window->DrawList->Clear();
window->ClipRect = ImVec4(-FLT_MAX,-FLT_MAX,+FLT_MAX,+FLT_MAX);
- window->LastFrameDrawn = current_frame;
+ window->LastFrameActive = current_frame;
window->IDStack.resize(1);
// Setup texture, outer clipping rectangle
@@ -3599,7 +3604,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
PushClipRect(GetVisibleRect());
// New windows appears in front
- if (!window_was_visible)
+ if (!window_was_active)
{
window->AutoPosLastDirection = -1;
@@ -3630,10 +3635,6 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
window->Collapsed = false;
}
- const bool window_appearing_after_being_hidden = (window->HiddenFrames == 1);
- if (window->HiddenFrames > 0)
- window->HiddenFrames--;
-
// SIZE
// Save contents size from last frame for auto-fitting (unless explicitly specified)
@@ -3641,7 +3642,9 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
window->SizeContents.y = (window->SizeContentsExplicit.y != 0.0f) ? window->SizeContentsExplicit.y : ((window_is_new ? 0.0f : window->DC.CursorMaxPos.y - window->Pos.y) + window->Scroll.y);
// Hide popup/tooltip window when first appearing while we measure size (because we recycle them)
- if ((flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_Tooltip)) != 0 && !window_was_visible)
+ if (window->HiddenFrames > 0)
+ window->HiddenFrames--;
+ if ((flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_Tooltip)) != 0 && !window_was_active)
{
window->HiddenFrames = 1;
if (flags & ImGuiWindowFlags_AlwaysAutoResize)
@@ -3848,7 +3851,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
const ImRect resize_rect(br - ImVec2(resize_corner_size * 0.75f, resize_corner_size * 0.75f), br);
const ImGuiID resize_id = window->GetID("#RESIZE");
bool hovered, held;
- ButtonBehavior(resize_rect, resize_id, &hovered, &held, true, ImGuiButtonFlags_FlattenChilds);
+ ButtonBehavior(resize_rect, resize_id, &hovered, &held, ImGuiButtonFlags_FlattenChilds);
resize_col = window->Color(held ? ImGuiCol_ResizeGripActive : hovered ? ImGuiCol_ResizeGripHovered : ImGuiCol_ResizeGrip);
if (hovered || held)
@@ -3961,7 +3964,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
window->DC.TreeDepth = 0;
window->DC.StateStorage = &window->StateStorage;
window->DC.GroupStack.resize(0);
- window->MenuColumns.Update(3, style.ItemSpacing.x, !window_was_visible);
+ window->MenuColumns.Update(3, style.ItemSpacing.x, !window_was_active);
if (window->AutoFitFramesX > 0)
window->AutoFitFramesX--;
@@ -4081,7 +4084,9 @@ static void Scrollbar(ImGuiWindow* window, bool horizontal)
const float border_offset = (window->Flags & ImGuiWindowFlags_ShowBorders) ? 1.0f : 0.0f;
ImRect bb = horizontal
? ImRect(window->Pos.x + border_offset, window_rect.Max.y - style.ScrollbarSize, window_rect.Max.x - other_scrollbar_size_w, window_rect.Max.y)
- : ImRect(window_rect.Max.x - style.ScrollbarSize, window->Pos.y + window->TitleBarHeight() + border_offset, window_rect.Max.x, window_rect.Max.y - other_scrollbar_size_w);
+ : ImRect(window_rect.Max.x - style.ScrollbarSize, window->Pos.y + border_offset, window_rect.Max.x, window_rect.Max.y - other_scrollbar_size_w);
+ if (!horizontal)
+ bb.Min.y += window->TitleBarHeight() + ((window->Flags & ImGuiWindowFlags_MenuBar) ? window->MenuBarHeight() - border_offset : 0.0f);
float window_rounding = (window->Flags & ImGuiWindowFlags_ChildWindow) ? style.ChildWindowRounding : style.WindowRounding;
int window_rounding_corners;
@@ -4107,7 +4112,7 @@ static void Scrollbar(ImGuiWindow* window, bool horizontal)
bool held = false;
bool hovered = false;
const bool previously_held = (g.ActiveId == id);
- ImGui::ButtonBehavior(bb, id, &hovered, &held, true);
+ ImGui::ButtonBehavior(bb, id, &hovered, &held);
float scroll_max = ImMax(1.0f, win_size_contents_v - win_size_avail_v);
float scroll_ratio = ImSaturate(scroll_v / scroll_max);
@@ -5125,7 +5130,7 @@ static inline bool IsWindowContentHoverable(ImGuiWindow* window)
return true;
}
-bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, bool allow_key_modifiers, ImGuiButtonFlags flags)
+bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags)
{
ImGuiState& g = *GImGui;
ImGuiWindow* window = GetCurrentWindow();
@@ -5143,7 +5148,7 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
if (hovered)
{
SetHoveredID(id);
- if (allow_key_modifiers || (!g.IO.KeyCtrl && !g.IO.KeyShift && !g.IO.KeyAlt))
+ if (!(flags & ImGuiButtonFlags_NoKeyModifiers) || (!g.IO.KeyCtrl && !g.IO.KeyShift && !g.IO.KeyAlt))
{
if (g.IO.MouseClicked[0])
{
@@ -5214,7 +5219,7 @@ bool ImGui::ButtonEx(const char* label, const ImVec2& size_arg, ImGuiButtonFlags
if (window->DC.ButtonRepeat) flags |= ImGuiButtonFlags_Repeat;
bool hovered, held;
- bool pressed = ButtonBehavior(bb, id, &hovered, &held, true, flags);
+ bool pressed = ButtonBehavior(bb, id, &hovered, &held, flags);
// Render
const ImU32 col = window->Color((hovered && held) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
@@ -5260,7 +5265,7 @@ bool ImGui::InvisibleButton(const char* str_id, const ImVec2& size_arg)
return false;
bool hovered, held;
- bool pressed = ButtonBehavior(bb, id, &hovered, &held, true);
+ bool pressed = ButtonBehavior(bb, id, &hovered, &held);
return pressed;
}
@@ -5275,7 +5280,7 @@ static bool CloseWindowButton(bool* p_opened)
const ImRect bb(window->Rect().GetTR() + ImVec2(-2.0f-size,2.0f), window->Rect().GetTR() + ImVec2(-2.0f,2.0f+size));
bool hovered, held;
- bool pressed = ImGui::ButtonBehavior(bb, id, &hovered, &held, true);
+ bool pressed = ImGui::ButtonBehavior(bb, id, &hovered, &held);
// Render
const ImU32 col = window->Color((held && hovered) ? ImGuiCol_CloseButtonActive : hovered ? ImGuiCol_CloseButtonHovered : ImGuiCol_CloseButton);
@@ -5346,7 +5351,7 @@ bool ImGui::ImageButton(ImTextureID user_texture_id, const ImVec2& size, const I
return false;
bool hovered, held;
- bool pressed = ButtonBehavior(bb, id, &hovered, &held, true);
+ bool pressed = ButtonBehavior(bb, id, &hovered, &held);
// Render
const ImU32 col = window->Color((hovered && held) ? ImGuiCol_ButtonActive : hovered ? ImGuiCol_ButtonHovered : ImGuiCol_Button);
@@ -5552,7 +5557,7 @@ bool ImGui::CollapsingHeader(const char* label, const char* str_id, bool display
return opened;
bool hovered, held;
- bool pressed = ButtonBehavior(interact_bb, id, &hovered, &held, false);
+ bool pressed = ButtonBehavior(interact_bb, id, &hovered, &held, ImGuiButtonFlags_NoKeyModifiers);
if (pressed)
{
opened = !opened;
@@ -5942,7 +5947,7 @@ float ImGui::RoundScalar(float value, int decimal_precision)
return negative ? -value : value;
}
-bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, bool horizontal)
+bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, ImGuiSliderFlags flags)
{
ImGuiState& g = *GImGui;
ImGuiWindow* window = GetCurrentWindow();
@@ -5952,17 +5957,18 @@ bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v
RenderFrame(frame_bb.Min, frame_bb.Max, window->Color(ImGuiCol_FrameBg), true, style.FrameRounding);
const bool is_non_linear = fabsf(power - 1.0f) > 0.0001f;
+ const bool is_horizontal = (flags & ImGuiSliderFlags_Vertical) == 0;
const float grab_padding = 2.0f;
- const float slider_sz = horizontal ? (frame_bb.GetWidth() - grab_padding * 2.0f) : (frame_bb.GetHeight() - grab_padding * 2.0f);
+ const float slider_sz = is_horizontal ? (frame_bb.GetWidth() - grab_padding * 2.0f) : (frame_bb.GetHeight() - grab_padding * 2.0f);
float grab_sz;
if (decimal_precision > 0)
grab_sz = ImMin(style.GrabMinSize, slider_sz);
else
grab_sz = ImMin(ImMax(1.0f * (slider_sz / (v_max-v_min+1.0f)), style.GrabMinSize), slider_sz); // Integer sliders, if possible have the grab size represent 1 unit
const float slider_usable_sz = slider_sz - grab_sz;
- const float slider_usable_pos_min = (horizontal ? frame_bb.Min.x : frame_bb.Min.y) + grab_padding + grab_sz*0.5f;
- const float slider_usable_pos_max = (horizontal ? frame_bb.Max.x : frame_bb.Max.y) - grab_padding - grab_sz*0.5f;
+ const float slider_usable_pos_min = (is_horizontal ? frame_bb.Min.x : frame_bb.Min.y) + grab_padding + grab_sz*0.5f;
+ const float slider_usable_pos_max = (is_horizontal ? frame_bb.Max.x : frame_bb.Max.y) - grab_padding - grab_sz*0.5f;
// For logarithmic sliders that cross over sign boundary we want the exponential increase to be symmetric around 0.0f
float linear_zero_pos = 0.0f; // 0.0->1.0f
@@ -5985,9 +5991,9 @@ bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v
{
if (g.IO.MouseDown[0])
{
- const float mouse_abs_pos = horizontal ? g.IO.MousePos.x : g.IO.MousePos.y;
+ const float mouse_abs_pos = is_horizontal ? g.IO.MousePos.x : g.IO.MousePos.y;
float normalized_pos = ImClamp((mouse_abs_pos - slider_usable_pos_min) / slider_usable_sz, 0.0f, 1.0f);
- if (!horizontal)
+ if (!is_horizontal)
normalized_pos = 1.0f - normalized_pos;
float new_value;
@@ -6056,11 +6062,11 @@ bool ImGui::SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v
}
// Draw
- if (!horizontal)
+ if (!is_horizontal)
grab_t = 1.0f - grab_t;
const float grab_pos = ImLerp(slider_usable_pos_min, slider_usable_pos_max, grab_t);
ImRect grab_bb;
- if (horizontal)
+ if (is_horizontal)
grab_bb = ImRect(ImVec2(grab_pos - grab_sz*0.5f, frame_bb.Min.y + grab_padding), ImVec2(grab_pos + grab_sz*0.5f, frame_bb.Max.y - grab_padding));
else
grab_bb = ImRect(ImVec2(frame_bb.Min.x + grab_padding, grab_pos - grab_sz*0.5f), ImVec2(frame_bb.Max.x - grab_padding, grab_pos + grab_sz*0.5f));
@@ -6124,7 +6130,7 @@ bool ImGui::SliderFloat(const char* label, float* v, float v_min, float v_max, c
ItemSize(total_bb, style.FramePadding.y);
// Actual slider behavior + render grab
- const bool value_changed = SliderBehavior(frame_bb, id, v, v_min, v_max, power, decimal_precision, true);
+ const bool value_changed = SliderBehavior(frame_bb, id, v, v_min, v_max, power, decimal_precision);
// Display value using user-provided display format so user can add prefix/suffix/decorations to the value.
char value_buf[64];
@@ -6170,7 +6176,7 @@ bool ImGui::VSliderFloat(const char* label, const ImVec2& size, float* v, float
}
// Actual slider behavior + render grab
- bool value_changed = SliderBehavior(frame_bb, id, v, v_min, v_max, power, decimal_precision, false);
+ bool value_changed = SliderBehavior(frame_bb, id, v, v_min, v_max, power, decimal_precision, ImGuiSliderFlags_Vertical);
// Display value using user-provided display format so user can add prefix/suffix/decorations to the value.
// For the vertical slider we allow centered text to overlap the frame padding
@@ -6749,7 +6755,7 @@ bool ImGui::Checkbox(const char* label, bool* v)
return false;
bool hovered, held;
- bool pressed = ButtonBehavior(total_bb, id, &hovered, &held, true);
+ bool pressed = ButtonBehavior(total_bb, id, &hovered, &held);
if (pressed)
*v = !(*v);
@@ -6812,7 +6818,7 @@ bool ImGui::RadioButton(const char* label, bool active)
const float radius = check_bb.GetHeight() * 0.5f;
bool hovered, held;
- bool pressed = ButtonBehavior(total_bb, id, &hovered, &held, true);
+ bool pressed = ButtonBehavior(total_bb, id, &hovered, &held);
window->DrawList->AddCircleFilled(center, radius, window->Color((held && hovered) ? ImGuiCol_FrameBgActive : hovered ? ImGuiCol_FrameBgHovered : ImGuiCol_FrameBg), 16);
if (active)
@@ -7087,6 +7093,7 @@ static bool InputTextFilterCharacter(unsigned int* p_char, ImGuiInputTextFlags f
}
// Edit a string of text
+// FIXME: This is rather complex partly because we are doing UTF8 > u16 > UTF8 conversions on the go to more easily handle stb_textedit calls. Ideally we should stay in UTF-8 all the time.
bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2& size_arg, ImGuiInputTextFlags flags, ImGuiTextEditCallback callback, void* user_data)
{
ImGuiWindow* window = GetCurrentWindow();
@@ -7174,9 +7181,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
{
// Recycle existing cursor/selection/undo stack but clamp position
// Note a single mouse click will override the cursor/position immediately by calling stb_textedit_click handler.
- edit_state.StbState.cursor = ImMin(edit_state.StbState.cursor, edit_state.CurLenW);
- edit_state.StbState.select_start = ImMin(edit_state.StbState.select_start, edit_state.CurLenW);
- edit_state.StbState.select_end = ImMin(edit_state.StbState.select_end, edit_state.CurLenW);
+ edit_state.CursorClamp();
}
else
{
@@ -7207,6 +7212,16 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
if (g.ActiveId == id)
{
+ if (!is_editable && !g.ActiveIdIsJustActivated)
+ {
+ // When read-only we always use the live data passed to the function
+ edit_state.Text.resize(buf_size+1);
+ const char* buf_end = NULL;
+ edit_state.CurLenW = ImTextStrFromUtf8(edit_state.Text.Data, edit_state.Text.Size, buf, NULL, &buf_end);
+ edit_state.CurLenA = (int)(buf_end - buf);
+ edit_state.CursorClamp();
+ }
+
edit_state.BufSizeA = buf_size;
// Although we are active we don't prevent mouse from hovering other elements unless we are interacting right now with the widget.
@@ -7256,6 +7271,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
memset(g.IO.InputCharacters, 0, sizeof(g.IO.InputCharacters));
}
+ // Handle various key-presses
const int k_mask = (is_shift_down ? STB_TEXTEDIT_K_SHIFT : 0);
const bool is_ctrl_only = is_ctrl_down && !is_alt_down && !is_shift_down;
if (IsKeyPressedMap(ImGuiKey_LeftArrow)) { edit_state.OnKeyPressed(is_ctrl_down ? STB_TEXTEDIT_K_WORDLEFT | k_mask : STB_TEXTEDIT_K_LEFT | k_mask); }
@@ -7264,8 +7280,8 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
else if (is_multiline && IsKeyPressedMap(ImGuiKey_DownArrow)) { if (is_ctrl_down) SetWindowScrollY(draw_window, draw_window->Scroll.y + g.FontSize); else edit_state.OnKeyPressed(STB_TEXTEDIT_K_DOWN| k_mask); }
else if (IsKeyPressedMap(ImGuiKey_Home)) { edit_state.OnKeyPressed(is_ctrl_down ? STB_TEXTEDIT_K_TEXTSTART | k_mask : STB_TEXTEDIT_K_LINESTART | k_mask); }
else if (IsKeyPressedMap(ImGuiKey_End)) { edit_state.OnKeyPressed(is_ctrl_down ? STB_TEXTEDIT_K_TEXTEND | k_mask : STB_TEXTEDIT_K_LINEEND | k_mask); }
- else if (IsKeyPressedMap(ImGuiKey_Delete) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_DELETE | k_mask); }
- else if (IsKeyPressedMap(ImGuiKey_Backspace) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE | k_mask); }
+ else if (IsKeyPressedMap(ImGuiKey_Delete) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_DELETE | k_mask); }
+ else if (IsKeyPressedMap(ImGuiKey_Backspace) && is_editable) { edit_state.OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE | k_mask); }
else if (IsKeyPressedMap(ImGuiKey_Enter))
{
bool ctrl_enter_for_new_line = (flags & ImGuiInputTextFlags_CtrlEnterForNewLine) != 0;
@@ -7274,16 +7290,16 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
SetActiveID(0);
enter_pressed = true;
}
- else if (is_editable) // New line
+ else if (is_editable)
{
- unsigned int c = '\n';
+ unsigned int c = '\n'; // Insert new line
if (InputTextFilterCharacter(&c, flags, callback, user_data))
edit_state.OnKeyPressed((int)c);
}
}
else if ((flags & ImGuiInputTextFlags_AllowTabInput) && IsKeyPressedMap(ImGuiKey_Tab) && !is_ctrl_down && !is_shift_down && !is_alt_down && is_editable)
{
- unsigned int c = '\t';
+ unsigned int c = '\t'; // Insert TAB
if (InputTextFilterCharacter(&c, flags, callback, user_data))
edit_state.OnKeyPressed((int)c);
}
@@ -7358,7 +7374,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
{
// Apply new value immediately - copy modified buffer back
// Note that as soon as we can focus into the input box, the in-widget value gets priority over any underlying modification of the input buffer
- // FIXME: We actually always render 'buf' in RenderTextScrolledClipped
+ // FIXME: We actually always render 'buf' when calling DrawList->AddText
// FIXME-OPT: CPU waste to do this every time the widget is active, should mark dirty state from the stb_textedit callbacks
if (is_editable)
{
@@ -7428,6 +7444,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
}
}
+ // Copy back to user buffer
if (is_editable && strcmp(edit_state.TempTextBuffer.Data, buf) != 0)
{
ImFormatString(buf, buf_size, "%s", edit_state.TempTextBuffer.Data);
@@ -7439,9 +7456,9 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
if (!is_multiline)
RenderFrame(frame_bb.Min, frame_bb.Max, window->Color(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);
ImVec2 render_pos = is_multiline ? draw_window->DC.CursorPos : frame_bb.Min + style.FramePadding;
-
- 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);
ImVec2 text_size(0.f, 0.f);
if (g.ActiveId == id || (edit_state.Id == id && is_multiline && g.ActiveId == draw_window->GetID("#SCROLLY")))
{
@@ -7453,40 +7470,44 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
// - Measure text height (for scrollbar)
// We are attempting to do most of that in **one main pass** to minimize the computation cost (non-negligible for large amount of text) + 2nd pass for selection rendering (we could merge them by an extra refactoring effort)
const ImWchar* text_begin = edit_state.Text.Data;
- const ImWchar* text_end = text_begin + edit_state.CurLenW;
ImVec2 cursor_offset, select_start_offset;
{
- // Count lines + find lines numbers of cursor and select_start
- int matches_remaining = 0;
- int matches_line_no[2] = { -1, -999 };
- const ImWchar* matches_ptr[2] = { NULL, NULL };
- matches_ptr[0] = text_begin + edit_state.StbState.cursor; matches_remaining++;
+ // Count lines + find lines numbers straddling 'cursor' and 'select_start' position.
+ const ImWchar* searches_input_ptr[2];
+ searches_input_ptr[0] = text_begin + edit_state.StbState.cursor;
+ searches_input_ptr[1] = NULL;
+ int searches_remaining = 1;
+ int searches_result_line_number[2] = { -1, -999 };
if (edit_state.StbState.select_start != edit_state.StbState.select_end)
{
- matches_ptr[1] = text_begin + ImMin(edit_state.StbState.select_start, edit_state.StbState.select_end);
- matches_line_no[1] = -1;
- matches_remaining++;
+ searches_input_ptr[1] = text_begin + ImMin(edit_state.StbState.select_start, edit_state.StbState.select_end);
+ searches_result_line_number[1] = -1;
+ searches_remaining++;
}
- matches_remaining += is_multiline ? 1 : 0; // So that we never exit the loop until all lines are counted.
+ // Iterate all lines to find our line numbers
+ // In multi-line mode, we never exit the loop until all lines are counted, so add one extra to the searches_remaining counter.
+ searches_remaining += is_multiline ? 1 : 0;
int line_count = 0;
- for (const ImWchar* s = text_begin; s < text_end+1; s++)
- if ((*s) == '\n' || s == text_end)
+ for (const ImWchar* s = text_begin; *s != 0; s++)
+ if (*s == '\n')
{
line_count++;
- if (matches_line_no[0] == -1 && s >= matches_ptr[0]) { matches_line_no[0] = line_count; if (--matches_remaining <= 0) break; }
- if (matches_line_no[1] == -1 && s >= matches_ptr[1]) { matches_line_no[1] = line_count; if (--matches_remaining <= 0) break; }
+ if (searches_result_line_number[0] == -1 && s >= searches_input_ptr[0]) { searches_result_line_number[0] = line_count; if (--searches_remaining <= 0) break; }
+ if (searches_result_line_number[1] == -1 && s >= searches_input_ptr[1]) { searches_result_line_number[1] = line_count; if (--searches_remaining <= 0) break; }
}
+ line_count++;
+ if (searches_result_line_number[0] == -1) searches_result_line_number[0] = line_count;
+ if (searches_result_line_number[1] == -1) searches_result_line_number[1] = line_count;
- // Calculate 2d position
- IM_ASSERT(matches_line_no[0] != -1);
- cursor_offset.x = InputTextCalcTextSizeW(ImStrbolW(matches_ptr[0], text_begin), matches_ptr[0]).x;
- cursor_offset.y = matches_line_no[0] * g.FontSize;
- if (matches_line_no[1] >= 0)
+ // Calculate 2d position by finding the beginning of the line and measuring distance
+ cursor_offset.x = InputTextCalcTextSizeW(ImStrbolW(searches_input_ptr[0], text_begin), searches_input_ptr[0]).x;
+ cursor_offset.y = searches_result_line_number[0] * g.FontSize;
+ if (searches_result_line_number[1] >= 0)
{
- select_start_offset.x = InputTextCalcTextSizeW(ImStrbolW(matches_ptr[1], text_begin), matches_ptr[1]).x;
- select_start_offset.y = matches_line_no[1] * g.FontSize;
+ select_start_offset.x = InputTextCalcTextSizeW(ImStrbolW(searches_input_ptr[1], text_begin), searches_input_ptr[1]).x;
+ select_start_offset.y = searches_result_line_number[1] * g.FontSize;
}
// Calculate text height
@@ -7525,7 +7546,7 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
}
}
edit_state.CursorFollow = false;
- ImVec2 render_scroll = ImVec2(edit_state.ScrollX, 0.0f);
+ const ImVec2 render_scroll = ImVec2(edit_state.ScrollX, 0.0f);
// Draw selection
if (edit_state.StbState.select_start != edit_state.StbState.select_end)
@@ -7983,7 +8004,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
if (flags & ImGuiSelectableFlags_MenuItem) button_flags |= ImGuiButtonFlags_PressedOnClick|ImGuiButtonFlags_PressedOnRelease;
if (flags & ImGuiSelectableFlags_Disabled) button_flags |= ImGuiButtonFlags_Disabled;
bool hovered, held;
- bool pressed = ButtonBehavior(bb_with_spacing, id, &hovered, &held, true, button_flags);
+ bool pressed = ButtonBehavior(bb_with_spacing, id, &hovered, &held, button_flags);
if (flags & ImGuiSelectableFlags_Disabled)
selected = false;
@@ -8322,6 +8343,7 @@ void ImGui::EndMenu()
}
// A little colored square. Return true when clicked.
+// FIXME: May want to display/ignore the alpha component in the color display? Yet show it in the tooltip.
bool ImGui::ColorButton(const ImVec4& col, bool small_height, bool outline_border)
{
ImGuiWindow* window = GetCurrentWindow();
@@ -8338,17 +8360,11 @@ bool ImGui::ColorButton(const ImVec4& col, bool small_height, bool outline_borde
return false;
bool hovered, held;
- bool pressed = ButtonBehavior(bb, id, &hovered, &held, true);
+ bool pressed = ButtonBehavior(bb, id, &hovered, &held);
RenderFrame(bb.Min, bb.Max, window->Color(col), outline_border, style.FrameRounding);
if (hovered)
- {
- int ix = (int)(col.x * 255.0f + 0.5f);
- int iy = (int)(col.y * 255.0f + 0.5f);
- int iz = (int)(col.z * 255.0f + 0.5f);
- int iw = (int)(col.w * 255.0f + 0.5f);
- ImGui::SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col.x, col.y, col.z, col.w, ix, iy, iz, iw);
- }
+ ImGui::SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col.x, col.y, col.z, col.w, IM_F32_TO_INT8(col.x), IM_F32_TO_INT8(col.y), IM_F32_TO_INT8(col.z), IM_F32_TO_INT8(col.z));
return pressed;
}
@@ -8390,7 +8406,7 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha)
if (edit_mode == ImGuiColorEditMode_HSV)
ImGui::ColorConvertRGBtoHSV(f[0], f[1], f[2], f[0], f[1], f[2]);
- int i[4] = { (int)(f[0] * 255.0f + 0.5f), (int)(f[1] * 255.0f + 0.5f), (int)(f[2] * 255.0f + 0.5f), (int)(f[3] * 255.0f + 0.5f) };
+ int i[4] = { IM_F32_TO_INT8(f[0]), IM_F32_TO_INT8(f[1]), IM_F32_TO_INT8(f[2]), IM_F32_TO_INT8(f[3]) };
int components = alpha ? 4 : 3;
bool value_changed = false;
@@ -8463,6 +8479,10 @@ bool ImGui::ColorEdit4(const char* label, float col[4], bool alpha)
const ImVec4 col_display(col[0], col[1], col[2], 1.0f);
if (ImGui::ColorButton(col_display))
g.ColorEditModeStorage.SetInt(id, (edit_mode + 1) % 3); // Don't set local copy of 'edit_mode' right away!
+
+ // Recreate our own tooltip over's ColorButton() one because we want to display correct alpha here
+ if (ImGui::IsItemHovered())
+ ImGui::SetTooltip("Color:\n(%.2f,%.2f,%.2f,%.2f)\n#%02X%02X%02X%02X", col[0], col[1], col[2], col[3], IM_F32_TO_INT8(col[0]), IM_F32_TO_INT8(col[1]), IM_F32_TO_INT8(col[2]), IM_F32_TO_INT8(col[3]));
if (window->DC.ColorEditMode == ImGuiColorEditMode_UserSelectShowButton)
{
@@ -8932,6 +8952,7 @@ void ImGui::Value(const char* prefix, float v, const char* float_format)
}
}
+// FIXME: May want to remove those helpers?
void ImGui::Color(const char* prefix, const ImVec4& v)
{
ImGui::Text("%s: (%.2f,%.2f,%.2f,%.2f)", prefix, v.x, v.y, v.z, v.w);
diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h
index 7bb0aacc56a..d2c4155d918 100644
--- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h
+++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h
@@ -1,4 +1,4 @@
-// ImGui library v1.46 WIP
+// ImGui library v1.47 WIP
// Headers
// See imgui.cpp file for documentation.
@@ -17,7 +17,7 @@
#include <stdlib.h> // NULL, malloc, free, qsort, atoi
#include <string.h> // memset, memmove, memcpy, strlen, strchr, strcpy, strcmp
-#define IMGUI_VERSION "1.46 WIP"
+#define IMGUI_VERSION "1.47 WIP"
// Define assertion handler.
#ifndef IM_ASSERT
@@ -953,7 +953,7 @@ struct ImGuiTextEditCallbackData
ImGuiKey EventKey; // Key pressed (Up/Down/TAB) // Read-only
char* Buf; // Current text // Read-write (pointed data only)
int BufSize; // // Read-only
- bool BufDirty; // Set if you modify Buf directly // Write
+ bool BufDirty; // Must set if you modify Buf directly // Write
int CursorPos; // // Read-write
int SelectionStart; // // Read-write (== to SelectionEnd when no selection)
int SelectionEnd; // // Read-write
diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp
index d78630ee5a1..838070dd93c 100644
--- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp
+++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp
@@ -1,4 +1,4 @@
-// ImGui library v1.46 WIP
+// ImGui library v1.47 WIP
// Demo code
// Don't remove this file from your project! It is useful reference code that you can execute.
@@ -423,7 +423,18 @@ void ImGui::ShowTestWindow(bool* opened)
if (ImGui::TreeNode("Multi-line Text Input"))
{
static bool read_only = false;
- static char text[1024*16] = "// F00F bug\nlabel:\n\tlock cmpxchg8b eax\n";
+ static char text[1024*16] =
+ "/*\n"
+ " The Pentium F00F bug, shorthand for F0 0F C7 C8,\n"
+ " the hexadecimal encoding of one offending instruction,\n"
+ " more formally, the invalid operand with locked CMPXCHG8B\n"
+ " instruction bug, is a design flaw in the majority of\n"
+ " Intel Pentium, Pentium MMX, and Pentium OverDrive\n"
+ " processors (all in the P5 microarchitecture).\n"
+ "*/\n\n"
+ "label:\n"
+ "\tlock cmpxchg8b eax\n";
+
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0,0));
ImGui::Checkbox("Read-only", &read_only);
ImGui::PopStyleVar();
@@ -1724,7 +1735,7 @@ static void ShowExampleAppCustomRendering(bool* opened)
if (ImGui::IsItemHovered())
{
ImVec2 mouse_pos_in_canvas = ImVec2(ImGui::GetIO().MousePos.x - canvas_pos.x, ImGui::GetIO().MousePos.y - canvas_pos.y);
- if (!adding_line && ImGui::GetIO().MouseClicked[0])
+ if (!adding_line && ImGui::IsMouseClicked(0))
{
points.push_back(mouse_pos_in_canvas);
adding_line = true;
@@ -1736,9 +1747,9 @@ static void ShowExampleAppCustomRendering(bool* opened)
if (!ImGui::GetIO().MouseDown[0])
adding_line = adding_preview = false;
}
- if (ImGui::GetIO().MouseClicked[1] && !points.empty())
+ if (ImGui::IsMouseClicked(1) && !points.empty())
{
- adding_line = false;
+ adding_line = adding_preview = false;
points.pop_back();
points.pop_back();
}
diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp
index 09fcf015430..5baae31170e 100644
--- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp
+++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_draw.cpp
@@ -1,4 +1,4 @@
-// ImGui library v1.46 WIP
+// ImGui library v1.47 WIP
// Drawing and font code
// Contains implementation for
@@ -18,7 +18,7 @@
#include <stdio.h> // vsnprintf, sscanf, printf
#include <new> // new (ptr)
-#ifndef alloca
+#if !defined(alloca) && !defined(__FreeBSD__)
#if _WIN32
#include <malloc.h> // alloca
#else
@@ -1082,13 +1082,13 @@ static const char* GetDefaultCompressedFontDataTTFBase85();
static unsigned int Decode85Byte(char c) { return c >= '\\' ? c-36 : c-35; }
static void Decode85(const unsigned char* src, unsigned char* dst)
{
- while (*src)
- {
- unsigned int tmp = Decode85Byte(src[0]) + 85*(Decode85Byte(src[1]) + 85*(Decode85Byte(src[2]) + 85*(Decode85Byte(src[3]) + 85*Decode85Byte(src[4]))));
- dst[0] = ((tmp >> 0) & 0xFF); dst[1] = ((tmp >> 8) & 0xFF); dst[2] = ((tmp >> 16) & 0xFF); dst[3] = ((tmp >> 24) & 0xFF); // We can't assume little-endianess.
+ while (*src)
+ {
+ unsigned int tmp = Decode85Byte(src[0]) + 85*(Decode85Byte(src[1]) + 85*(Decode85Byte(src[2]) + 85*(Decode85Byte(src[3]) + 85*Decode85Byte(src[4]))));
+ dst[0] = ((tmp >> 0) & 0xFF); dst[1] = ((tmp >> 8) & 0xFF); dst[2] = ((tmp >> 16) & 0xFF); dst[3] = ((tmp >> 24) & 0xFF); // We can't assume little-endianess.
src += 5;
dst += 4;
- }
+ }
}
// Load embedded ProggyClean.ttf at size 13, disable oversampling
diff --git a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h
index 1fac4326916..8e266b627c5 100644
--- a/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h
+++ b/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_internal.h
@@ -1,4 +1,4 @@
-// ImGui library v1.46 WIP
+// ImGui library v1.47 WIP
// Internals
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
@@ -39,6 +39,7 @@ struct ImGuiWindow;
typedef int ImGuiLayoutType; // enum ImGuiLayoutType_
typedef int ImGuiButtonFlags; // enum ImGuiButtonFlags_
typedef int ImGuiTreeNodeFlags; // enum ImGuiTreeNodeFlags_
+typedef int ImGuiSliderFlags; // enum ImGuiSliderFlags_
//-------------------------------------------------------------------------
// STB libraries
@@ -148,7 +149,8 @@ enum ImGuiButtonFlags_
ImGuiButtonFlags_FlattenChilds = 1 << 3,
ImGuiButtonFlags_DontClosePopups = 1 << 4,
ImGuiButtonFlags_Disabled = 1 << 5,
- ImGuiButtonFlags_AlignTextBaseLine = 1 << 6
+ ImGuiButtonFlags_AlignTextBaseLine = 1 << 6,
+ ImGuiButtonFlags_NoKeyModifiers = 1 << 7
};
enum ImGuiTreeNodeFlags_
@@ -157,6 +159,11 @@ enum ImGuiTreeNodeFlags_
ImGuiTreeNodeFlags_NoAutoExpandOnLog = 1 << 1
};
+enum ImGuiSliderFlags_
+{
+ ImGuiSliderFlags_Vertical = 1 << 0,
+};
+
enum ImGuiSelectableFlagsPrivate_
{
// NB: need to be in sync with last value of ImGuiSelectableFlags_
@@ -270,24 +277,25 @@ struct IMGUI_API ImGuiSimpleColumns
// Internal state of the currently focused/edited text input box
struct IMGUI_API ImGuiTextEditState
{
- ImGuiID Id; // widget id owning the text state
- ImVector<ImWchar> Text; // edit buffer, we need to persist but can't guarantee the persistence of the user-provided buffer. so we copy into own buffer.
- ImVector<char> InitialText; // backup of end-user buffer at the time of focus (in UTF-8, unaltered)
+ ImGuiID Id; // widget id owning the text state
+ ImVector<ImWchar> Text; // edit buffer, we need to persist but can't guarantee the persistence of the user-provided buffer. so we copy into own buffer.
+ ImVector<char> InitialText; // backup of end-user buffer at the time of focus (in UTF-8, unaltered)
ImVector<char> TempTextBuffer;
- int CurLenA, CurLenW; // we need to maintain our buffer length in both UTF-8 and wchar format.
- int BufSizeA; // end-user buffer size
+ int CurLenA, CurLenW; // we need to maintain our buffer length in both UTF-8 and wchar format.
+ int BufSizeA; // end-user buffer size
float ScrollX;
ImGuiStb::STB_TexteditState StbState;
float CursorAnim;
bool CursorFollow;
- ImVec2 InputCursorScreenPos; // Cursor position in screen space to be used by IME callback.
+ ImVec2 InputCursorScreenPos; // Cursor position in screen space to be used by IME callback.
bool SelectedAllMouseLock;
- ImGuiTextEditState() { memset(this, 0, sizeof(*this)); }
- void CursorAnimReset() { CursorAnim = -0.30f; } // After a user-input the cursor stays on for a while without blinking
- bool HasSelection() const { return StbState.select_start != StbState.select_end; }
- void ClearSelection() { StbState.select_start = StbState.select_end = StbState.cursor; }
- void SelectAll() { StbState.select_start = 0; StbState.select_end = CurLenW; StbState.cursor = StbState.select_end; StbState.has_preferred_x = false; }
+ ImGuiTextEditState() { memset(this, 0, sizeof(*this)); }
+ void CursorAnimReset() { CursorAnim = -0.30f; } // After a user-input the cursor stays on for a while without blinking
+ void CursorClamp() { StbState.cursor = ImMin(StbState.cursor, CurLenW); StbState.select_start = ImMin(StbState.select_start, CurLenW); StbState.select_end = ImMin(StbState.select_end, CurLenW); }
+ bool HasSelection() const { return StbState.select_start != StbState.select_end; }
+ void ClearSelection() { StbState.select_start = StbState.select_end = StbState.cursor; }
+ void SelectAll() { StbState.select_start = 0; StbState.select_end = CurLenW; StbState.cursor = StbState.select_end; StbState.has_preferred_x = false; }
void OnKeyPressed(int key);
};
@@ -598,7 +606,7 @@ struct IMGUI_API ImGuiWindow
ImVector<ImGuiID> IDStack; // ID stack. ID are hashes seeded with the value at the top of the stack
ImRect ClipRect; // = DrawList->clip_rect_stack.back(). Scissoring / clipping rectangle. x1, y1, x2, y2.
ImRect ClippedWindowRect; // = ClipRect just after setup in Begin()
- int LastFrameDrawn;
+ int LastFrameActive;
float ItemWidthDefault;
ImGuiSimpleColumns MenuColumns; // Simplified columns storage for menu items
ImGuiStorage StateStorage;
@@ -672,10 +680,10 @@ namespace ImGui
IMGUI_API void RenderCollapseTriangle(ImVec2 p_min, bool opened, float scale = 1.0f, bool shadow = false);
IMGUI_API void RenderCheckMark(ImVec2 pos, ImU32 col);
- IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, bool allow_key_modifiers, ImGuiButtonFlags flags = 0);
+ IMGUI_API bool ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool* out_held, ImGuiButtonFlags flags = 0);
IMGUI_API bool ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0,0), ImGuiButtonFlags flags = 0);
- IMGUI_API bool SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, bool horizontal);
+ IMGUI_API bool SliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_min, float v_max, float power, int decimal_precision, ImGuiSliderFlags flags = 0);
IMGUI_API bool SliderFloatN(const char* label, float* v, int components, float v_min, float v_max, const char* display_format, float power);
IMGUI_API bool SliderIntN(const char* label, int* v, int components, int v_min, int v_max, const char* display_format);
diff --git a/3rdparty/bgfx/README.md b/3rdparty/bgfx/README.md
index 3b412508723..27ad54916c0 100644
--- a/3rdparty/bgfx/README.md
+++ b/3rdparty/bgfx/README.md
@@ -73,7 +73,7 @@ https://github.com/emoon/ProDBG - ProDBG is a new debugger under development
that will support a variety of targets and operating systems. Currently it's in
very early development and primary focusing on Mac as primary target. This is
how it currently looks.
-![mac_screenshot](https://raw.githubusercontent.com/emoon/ProDBG/master/data/screens/mac_screenshot.png)
+![ProDBG_screenshot](https://raw.githubusercontent.com/emoon/ProDBG/master/data/screens/mac_screenshot.png)
http://www.dogbytegames.com/ Dogbyte Games is an indie mobile developer studio
focusing on racing games.
@@ -91,10 +91,8 @@ JavaScript for desktop/mobile apps. Idea is to combine the fast workflow and
deployment model of web with the performance of native code and GPU acceleration.
https://github.com/nem0/LumixEngine LumixEngine is a MIT licensed 3D engine.
-The main goal is performance and Unity-like usability.
-<a href="http://www.youtube.com/watch?feature=player_embedded&v=eyqk61Yw52E
-" target="_blank"><img src="http://img.youtube.com/vi/eyqk61Yw52E/0.jpg"
-alt="LumixEngine Terrain Editor" width="640" height="480" border="0" /></a>
+The main goal is performance and Unity-like usability.
+![LumixEngine screenshot](https://cloud.githubusercontent.com/assets/153526/10109455/450c51be-63c7-11e5-9c87-96d9d00efe02.png)
[Building](https://bkaradzic.github.io/bgfx/build.html)
-------------------------------------------------------
diff --git a/3rdparty/bgfx/examples/01-cubes/cubes.cpp b/3rdparty/bgfx/examples/01-cubes/cubes.cpp
index d3679d1ea48..4025975b0ee 100644
--- a/3rdparty/bgfx/examples/01-cubes/cubes.cpp
+++ b/3rdparty/bgfx/examples/01-cubes/cubes.cpp
@@ -57,14 +57,16 @@ static const uint16_t s_cubeIndices[36] =
class Cubes : public entry::AppI
{
- void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE
+ void init(int _argc, char** _argv) BX_OVERRIDE
{
+ Args args(_argc, _argv);
+
m_width = 1280;
m_height = 720;
m_debug = BGFX_DEBUG_TEXT;
m_reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(m_width, m_height, m_reset);
// Enable debug text.
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/metaballs.cpp b/3rdparty/bgfx/examples/02-metaballs/metaballs.cpp
index 6593f3d33c1..982d248907f 100644
--- a/3rdparty/bgfx/examples/02-metaballs/metaballs.cpp
+++ b/3rdparty/bgfx/examples/02-metaballs/metaballs.cpp
@@ -4,7 +4,7 @@
*/
#include "common.h"
-#include <bgfx/bgfx.h>
+#include "bgfx_utils.h"
// embedded shaders
#include "vs_metaballs.bin.h"
@@ -464,14 +464,16 @@ uint32_t triangulate(uint8_t* _result, uint32_t _stride, const float* __restrict
class Metaballs : public entry::AppI
{
- void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE
+ void init(int _argc, char** _argv) BX_OVERRIDE
{
+ Args args(_argc, _argv);
+
m_width = 1280;
m_height = 720;
m_debug = BGFX_DEBUG_TEXT;
m_reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(m_width, m_height, m_reset);
// Enable debug text.
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/03-raymarch/raymarch.cpp b/3rdparty/bgfx/examples/03-raymarch/raymarch.cpp
index 7fd619db9fa..1ba4d3ecea4 100644
--- a/3rdparty/bgfx/examples/03-raymarch/raymarch.cpp
+++ b/3rdparty/bgfx/examples/03-raymarch/raymarch.cpp
@@ -102,14 +102,16 @@ void renderScreenSpaceQuad(uint32_t _view, bgfx::ProgramHandle _program, float _
}
}
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
// Enable debug text.
diff --git a/3rdparty/bgfx/examples/04-mesh/mesh.cpp b/3rdparty/bgfx/examples/04-mesh/mesh.cpp
index bf4c4269333..8c10b2b36d3 100644
--- a/3rdparty/bgfx/examples/04-mesh/mesh.cpp
+++ b/3rdparty/bgfx/examples/04-mesh/mesh.cpp
@@ -6,14 +6,16 @@
#include "common.h"
#include "bgfx_utils.h"
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
// Enable debug text.
diff --git a/3rdparty/bgfx/examples/05-instancing/instancing.cpp b/3rdparty/bgfx/examples/05-instancing/instancing.cpp
index 2313adccabd..3d9f9505a6e 100644
--- a/3rdparty/bgfx/examples/05-instancing/instancing.cpp
+++ b/3rdparty/bgfx/examples/05-instancing/instancing.cpp
@@ -55,14 +55,16 @@ static const uint16_t s_cubeIndices[36] =
6, 3, 7,
};
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
// Enable debug text.
diff --git a/3rdparty/bgfx/examples/06-bump/bump.cpp b/3rdparty/bgfx/examples/06-bump/bump.cpp
index 1cbf74592de..e373bf65253 100644
--- a/3rdparty/bgfx/examples/06-bump/bump.cpp
+++ b/3rdparty/bgfx/examples/06-bump/bump.cpp
@@ -105,14 +105,16 @@ static const uint16_t s_cubeIndices[36] =
class Bump : public entry::AppI
{
- void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE
+ void init(int _argc, char** _argv) BX_OVERRIDE
{
+ Args args(_argc, _argv);
+
m_width = 1280;
m_height = 720;
m_debug = BGFX_DEBUG_TEXT;
m_reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(m_width, m_height, m_reset);
// Enable debug text.
diff --git a/3rdparty/bgfx/examples/07-callback/callback.cpp b/3rdparty/bgfx/examples/07-callback/callback.cpp
index fa0b0329d88..0def881acdc 100644
--- a/3rdparty/bgfx/examples/07-callback/callback.cpp
+++ b/3rdparty/bgfx/examples/07-callback/callback.cpp
@@ -364,8 +364,10 @@ private:
uint32_t m_maxBlocks;
};
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
BgfxCallback callback;
BgfxAllocator allocator;
@@ -376,9 +378,10 @@ int _main_(int /*_argc*/, char** /*_argv*/)
bgfx::RendererType::Enum renderers[bgfx::RendererType::Count];
uint8_t numRenderers = bgfx::getSupportedRenderers(renderers);
- bgfx::init(
- renderers[bx::getHPCounter() % numRenderers] /* randomize renderer */
- , BGFX_PCI_ID_NONE
+ bgfx::init(bgfx::RendererType::Count == args.m_type
+ ? renderers[bx::getHPCounter() % numRenderers] /* randomize renderer */
+ : args.m_type
+ , args.m_pciId
, 0
, &callback // custom callback handler
, &allocator // custom allocator
diff --git a/3rdparty/bgfx/examples/08-update/update.cpp b/3rdparty/bgfx/examples/08-update/update.cpp
index 51bd8c0213d..cc2fb3149ef 100644
--- a/3rdparty/bgfx/examples/08-update/update.cpp
+++ b/3rdparty/bgfx/examples/08-update/update.cpp
@@ -34,7 +34,7 @@ struct PosTexcoordVertex
bgfx::VertexDecl PosTexcoordVertex::ms_decl;
-static PosTexcoordVertex s_cubeVertices[28] =
+static PosTexcoordVertex s_m_cubeVertices[28] =
{
{-1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f },
{ 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f },
@@ -72,7 +72,7 @@ static PosTexcoordVertex s_cubeVertices[28] =
{ 1.0f, -1.0f, 1.0f, 2.0f, -2.0f, 2.0f },
};
-static const uint16_t s_cubeIndices[36] =
+static const uint16_t s_m_cubeIndices[36] =
{
0, 1, 2, // 0
1, 3, 2,
@@ -112,390 +112,467 @@ static void updateTextureCubeRectBgra8(bgfx::TextureHandle _handle, uint8_t _sid
bgfx::updateTextureCube(_handle, _side, 0, _x, _y, _width, _height, mem);
}
-int _main_(int /*_argc*/, char** /*_argv*/)
-{
- uint32_t width = 1280;
- uint32_t height = 720;
- uint32_t debug = BGFX_DEBUG_TEXT;
- uint32_t reset = BGFX_RESET_VSYNC;
-
- bgfx::init();
- bgfx::reset(width, height, reset);
-
- // Enable debug text.
- bgfx::setDebug(debug);
-
- // Set view 0 clear state.
- bgfx::setViewClear(0
- , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH
- , 0x303030ff
- , 1.0f
- , 0
- );
+static const uint32_t m_textureside = 512;
+static const uint32_t m_texture2dSize = 256;
- // Create vertex stream declaration.
- PosTexcoordVertex::init();
-
- bgfx::TextureHandle textures[] =
+class Update : public entry::AppI
+{
+public:
+ Update()
+ : m_cube(m_textureside)
{
- loadTexture("texture_compression_bc1.dds", BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP),
- loadTexture("texture_compression_bc2.dds", BGFX_TEXTURE_U_CLAMP),
- loadTexture("texture_compression_bc3.dds", BGFX_TEXTURE_V_CLAMP),
- loadTexture("texture_compression_etc1.ktx", BGFX_TEXTURE_U_BORDER|BGFX_TEXTURE_V_BORDER|BGFX_TEXTURE_BORDER_COLOR(1) ),
- loadTexture("texture_compression_etc2.ktx"),
- loadTexture("texture_compression_ptc12.pvr"),
- loadTexture("texture_compression_ptc14.pvr"),
- loadTexture("texture_compression_ptc22.pvr"),
- loadTexture("texture_compression_ptc24.pvr"),
- };
+ }
- const bgfx::Memory* mem8 = bgfx::alloc(32*32*32);
- const bgfx::Memory* mem16f = bgfx::alloc(32*32*32*2);
- const bgfx::Memory* mem32f = bgfx::alloc(32*32*32*4);
- for (uint8_t zz = 0; zz < 32; ++zz)
+ void init(int _argc, char** _argv) BX_OVERRIDE
{
- for (uint8_t yy = 0; yy < 32; ++yy)
+ Args args(_argc, _argv);
+
+ m_width = 1280;
+ m_height = 720;
+ m_debug = BGFX_DEBUG_TEXT;
+ m_reset = BGFX_RESET_VSYNC;
+
+ bgfx::init(args.m_type, args.m_pciId);
+ bgfx::reset(m_width, m_height, m_reset);
+
+ // Enable debug text.
+ bgfx::setDebug(m_debug);
+
+ // Set view 0 clear state.
+ bgfx::setViewClear(0
+ , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH
+ , 0x303030ff
+ , 1.0f
+ , 0
+ );
+
+ // Create vertex stream declaration.
+ PosTexcoordVertex::init();
+
+ m_textures[0] = loadTexture("texture_compression_bc1.dds", BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP);
+ m_textures[1] = loadTexture("texture_compression_bc2.dds", BGFX_TEXTURE_U_CLAMP);
+ m_textures[2] = loadTexture("texture_compression_bc3.dds", BGFX_TEXTURE_V_CLAMP);
+ m_textures[3] = loadTexture("texture_compression_etc1.ktx", BGFX_TEXTURE_U_BORDER|BGFX_TEXTURE_V_BORDER|BGFX_TEXTURE_BORDER_COLOR(1) );
+ m_textures[4] = loadTexture("texture_compression_etc2.ktx");
+ m_textures[5] = loadTexture("texture_compression_ptc12.pvr");
+ m_textures[6] = loadTexture("texture_compression_ptc14.pvr");
+ m_textures[7] = loadTexture("texture_compression_ptc22.pvr");
+ m_textures[8] = loadTexture("texture_compression_ptc24.pvr");
+
+ const bgfx::Caps* caps = bgfx::getCaps();
+ m_texture3DSupported = !!(caps->supported & BGFX_CAPS_TEXTURE_3D);
+ m_blitSupported = !!(caps->supported & BGFX_CAPS_TEXTURE_BLIT);
+ m_numm_textures3d = 0;
+
+ if (m_texture3DSupported)
{
- for (uint8_t xx = 0; xx < 32; ++xx)
+ const bgfx::Memory* mem8 = bgfx::alloc(32*32*32);
+ const bgfx::Memory* mem16f = bgfx::alloc(32*32*32*2);
+ const bgfx::Memory* mem32f = bgfx::alloc(32*32*32*4);
+ for (uint8_t zz = 0; zz < 32; ++zz)
{
- const uint32_t offset = ( (zz*32+yy)*32+xx);
- const uint32_t val = xx ^ yy ^ zz;
- mem8->data[offset] = val<<3;
- *(uint16_t*)&mem16f->data[offset*2] = bx::halfFromFloat( (float)val/32.0f);
- *(float*)&mem32f->data[offset*4] = (float)val/32.0f;
+ for (uint8_t yy = 0; yy < 32; ++yy)
+ {
+ for (uint8_t xx = 0; xx < 32; ++xx)
+ {
+ const uint32_t offset = ( (zz*32+yy)*32+xx);
+ const uint32_t val = xx ^ yy ^ zz;
+ mem8->data[offset] = val<<3;
+ *(uint16_t*)&mem16f->data[offset*2] = bx::halfFromFloat( (float)val/32.0f);
+ *(float*)&mem32f->data[offset*4] = (float)val/32.0f;
+ }
+ }
}
- }
- }
- const bgfx::Caps* caps = bgfx::getCaps();
- const bool texture3DSupported = !!(caps->supported & BGFX_CAPS_TEXTURE_3D);
+ if (0 != (BGFX_CAPS_FORMAT_TEXTURE_2D & caps->formats[bgfx::TextureFormat::R8]) )
+ {
+ m_textures3d[m_numm_textures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R8, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem8);
+ }
- uint32_t numTextures3d = 0;
- bgfx::TextureHandle textures3d[3] = {};
+ if (0 != (BGFX_CAPS_FORMAT_TEXTURE_2D & caps->formats[bgfx::TextureFormat::R16F]) )
+ {
+ m_textures3d[m_numm_textures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R16F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem16f);
+ }
- if (texture3DSupported)
- {
- if (0 != (BGFX_CAPS_FORMAT_TEXTURE_COLOR & caps->formats[bgfx::TextureFormat::R8]) )
- {
- textures3d[numTextures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R8, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem8);
+ if (0 != (BGFX_CAPS_FORMAT_TEXTURE_2D & caps->formats[bgfx::TextureFormat::R32F]) )
+ {
+ m_textures3d[m_numm_textures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R32F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem32f);
+ }
}
- if (0 != (BGFX_CAPS_FORMAT_TEXTURE_COLOR & caps->formats[bgfx::TextureFormat::R16F]) )
- {
- textures3d[numTextures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R16F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem16f);
- }
+ // Create static vertex buffer.
+ m_vbh = bgfx::createVertexBuffer(bgfx::makeRef(s_m_cubeVertices, sizeof(s_m_cubeVertices) ), PosTexcoordVertex::ms_decl);
+
+ // Create static index buffer.
+ m_ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_m_cubeIndices, sizeof(s_m_cubeIndices) ) );
- if (0 != (BGFX_CAPS_FORMAT_TEXTURE_COLOR & caps->formats[bgfx::TextureFormat::R32F]) )
+ // Create programs.
+ m_program = loadProgram("vs_update", "fs_update");
+ m_programCmp = loadProgram("vs_update", "fs_update_cmp");
+ m_program3d.idx = bgfx::invalidHandle;
+ if (m_texture3DSupported)
{
- textures3d[numTextures3d++] = bgfx::createTexture3D(32, 32, 32, 0, bgfx::TextureFormat::R32F, BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP|BGFX_TEXTURE_W_CLAMP, mem32f);
+ m_program3d = loadProgram("vs_update", "fs_update_3d");
}
- }
- // Create static vertex buffer.
- bgfx::VertexBufferHandle vbh = bgfx::createVertexBuffer(bgfx::makeRef(s_cubeVertices, sizeof(s_cubeVertices) ), PosTexcoordVertex::ms_decl);
+ // Create texture sampler uniforms.
+ s_texCube = bgfx::createUniform("s_texCube", bgfx::UniformType::Int1);
+ s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
- // Create static index buffer.
- bgfx::IndexBufferHandle ibh = bgfx::createIndexBuffer(bgfx::makeRef(s_cubeIndices, sizeof(s_cubeIndices) ) );
+ // Create time uniform.
+ u_time = bgfx::createUniform("u_time", bgfx::UniformType::Vec4);
- // Create programs.
- bgfx::ProgramHandle program = loadProgram("vs_update", "fs_update");
- bgfx::ProgramHandle programCmp = loadProgram("vs_update", "fs_update_cmp");
- bgfx::ProgramHandle program3d = BGFX_INVALID_HANDLE;
- if (texture3DSupported)
- {
- program3d = loadProgram("vs_update", "fs_update_3d");
- }
+ m_textureCube[0] = bgfx::createTextureCube(m_textureside, 1
+ , bgfx::TextureFormat::BGRA8
+ , BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT
+ );
- // Create texture sampler uniforms.
- bgfx::UniformHandle s_texCube = bgfx::createUniform("s_texCube", bgfx::UniformType::Int1);
- bgfx::UniformHandle s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
+ if (m_blitSupported)
+ {
+ m_textureCube[1] = bgfx::createTextureCube(m_textureside, 1
+ , bgfx::TextureFormat::BGRA8
+ , BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT|BGFX_TEXTURE_BLIT_DST
+ );
+ }
- // Create time uniform.
- bgfx::UniformHandle u_time = bgfx::createUniform("u_time", bgfx::UniformType::Vec4);
+ m_texture2d = bgfx::createTexture2D(m_texture2dSize, m_texture2dSize, 1
+ , bgfx::TextureFormat::BGRA8
+ , BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT
+ );
- const uint32_t textureSide = 2048;
+ m_m_texture2dData = (uint8_t*)malloc(m_texture2dSize*m_texture2dSize*4);
- bgfx::TextureHandle textureCube = bgfx::createTextureCube(textureSide, 1
- , bgfx::TextureFormat::BGRA8
- , BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT
- );
+ m_rr = rand()%255;
+ m_gg = rand()%255;
+ m_bb = rand()%255;
- const uint32_t texture2dSize = 256;
+ m_hit = 0;
+ m_miss = 0;
- bgfx::TextureHandle texture2d = bgfx::createTexture2D(texture2dSize, texture2dSize, 1
- , bgfx::TextureFormat::BGRA8
- , BGFX_TEXTURE_MIN_POINT|BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIP_POINT
- );
+ m_updateTime = 0;
+ m_timeOffset = bx::getHPCounter();
+ }
- uint8_t* texture2dData = (uint8_t*)malloc(texture2dSize*texture2dSize*4);
+ virtual int shutdown() BX_OVERRIDE
+ {
+ // m_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);
- uint8_t rr = rand()%255;
- uint8_t gg = rand()%255;
- uint8_t bb = rand()%255;
+ for (uint32_t ii = 0; ii < BX_COUNTOF(m_textures); ++ii)
+ {
+ bgfx::destroyTexture(m_textures[ii]);
+ }
- int64_t updateTime = 0;
+ for (uint32_t ii = 0; ii < m_numm_textures3d; ++ii)
+ {
+ bgfx::destroyTexture(m_textures3d[ii]);
+ }
- RectPackCubeT<256> cube(textureSide);
+ bgfx::destroyTexture(m_texture2d);
+ bgfx::destroyTexture(m_textureCube[0]);
+ if (m_blitSupported)
+ {
+ bgfx::destroyTexture(m_textureCube[1]);
+ }
+ bgfx::destroyIndexBuffer(m_ibh);
+ bgfx::destroyVertexBuffer(m_vbh);
+ if (bgfx::isValid(m_program3d) )
+ {
+ bgfx::destroyProgram(m_program3d);
+ }
+ bgfx::destroyProgram(m_programCmp);
+ bgfx::destroyProgram(m_program);
+ bgfx::destroyUniform(u_time);
+ bgfx::destroyUniform(s_texColor);
+ bgfx::destroyUniform(s_texCube);
- uint32_t hit = 0;
- uint32_t miss = 0;
- std::list<PackCube> quads;
+ // Shutdown bgfx.
+ bgfx::shutdown();
- int64_t timeOffset = bx::getHPCounter();
+ return 0;
+ }
- while (!entry::processEvents(width, height, debug, reset) )
+ bool update() BX_OVERRIDE
{
- float borderColor[4] = { float(rand()%255)/255.0f, float(rand()%255)/255.0f, float(rand()%255)/255.0f, float(rand()%255)/255.0f };
- bgfx::setPaletteColor(1, borderColor);
-
- // Set view 0 and 1 viewport.
- bgfx::setViewRect(0, 0, 0, width, height);
- bgfx::setViewRect(1, 0, 0, width, height);
-
- // This dummy draw call is here to make sure that view 0 is cleared
- // if no other draw calls are submitted to view 0.
- bgfx::touch(0);
-
- int64_t now = bx::getHPCounter();
- static int64_t last = now;
- const int64_t frameTime = now - last;
- last = now;
- const int64_t freq = bx::getHPFrequency();
- const double toMs = 1000.0/double(freq);
- float time = (float)( (now - timeOffset)/double(bx::getHPFrequency() ) );
- bgfx::setUniform(u_time, &time);
-
- // Use debug font to print information about this example.
- bgfx::dbgTextClear();
- bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/08-update");
- bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Updating textures.");
- bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs);
-
- if (now > updateTime)
+ if (!entry::processEvents(m_width, m_height, m_debug, m_reset) )
{
- PackCube face;
-
- uint32_t bw = bx::uint16_max(1, rand()%(textureSide/4) );
- uint32_t bh = bx::uint16_max(1, rand()%(textureSide/4) );
-
- if (cube.find(bw, bh, face) )
+ float borderColor[4] = { float(rand()%255)/255.0f, float(rand()%255)/255.0f, float(rand()%255)/255.0f, float(rand()%255)/255.0f };
+ bgfx::setPaletteColor(1, borderColor);
+
+ // Set view 0 and 1 viewport.
+ bgfx::setViewRect(0, 0, 0, m_width, m_height);
+ bgfx::setViewRect(1, 0, 0, m_width, m_height);
+
+ // This dummy draw call is here to make sure that view 0 is cleared
+ // if no other draw calls are submitted to view 0.
+ bgfx::touch(0);
+
+ int64_t now = bx::getHPCounter();
+ static int64_t last = now;
+ const int64_t frameTime = now - last;
+ last = now;
+ const int64_t freq = bx::getHPFrequency();
+ const double toMs = 1000.0/double(freq);
+ float time = (float)( (now - m_timeOffset)/double(bx::getHPFrequency() ) );
+ bgfx::setUniform(u_time, &time);
+
+ // Use debug font to print information about this example.
+ bgfx::dbgTextClear();
+ bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/08-update");
+ bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Updating m_textures.");
+ bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs);
+
+ if (now > m_updateTime)
{
- quads.push_back(face);
-
- ++hit;
- const Pack2D& rect = face.m_rect;
+ PackCube face;
- updateTextureCubeRectBgra8(textureCube, face.m_side, rect.m_x, rect.m_y, rect.m_width, rect.m_height, rr, gg, bb);
-
- rr = rand()%255;
- gg = rand()%255;
- bb = rand()%255;
- }
- else
- {
- ++miss;
+ uint32_t bw = bx::uint16_max(1, rand()%(m_textureside/4) );
+ uint32_t bh = bx::uint16_max(1, rand()%(m_textureside/4) );
- for (uint32_t ii = 0, num = bx::uint32_min(10, (uint32_t)quads.size() ); ii < num; ++ii)
+ if (m_cube.find(bw, bh, face) )
{
- cube.clear(quads.front() );
- quads.pop_front();
- }
- }
-
- {
- // Fill rect.
- const uint32_t pitch = texture2dSize*4;
+ m_quads.push_back(face);
- const uint16_t tw = rand()%texture2dSize;
- const uint16_t th = rand()%texture2dSize;
- const uint16_t tx = rand()%(texture2dSize-tw);
- const uint16_t ty = rand()%(texture2dSize-th);
+ ++m_hit;
+ const Pack2D& rect = face.m_rect;
- uint8_t* dst = &texture2dData[(ty*texture2dSize+tx)*4];
- uint8_t* next = dst + pitch;
-
- // Using makeRef to pass texture memory without copying.
- const bgfx::Memory* mem = bgfx::makeRef(dst, tw*th*4);
-
- for (uint32_t yy = 0; yy < th; ++yy, dst = next, next += pitch)
- {
- for (uint32_t xx = 0; xx < tw; ++xx, dst += 4)
+ updateTextureCubeRectBgra8(m_textureCube[0], face.m_side, rect.m_x, rect.m_y, rect.m_width, rect.m_height, m_rr, m_gg, m_bb);
+ if (m_blitSupported)
{
- dst[0] = bb;
- dst[1] = gg;
- dst[2] = rr;
- dst[3] = 255;
+ bgfx::blit(0, m_textureCube[1], 0, rect.m_x, rect.m_y, face.m_side, m_textureCube[0], 0, rect.m_x, rect.m_y, face.m_side, rect.m_width, rect.m_height);
}
- }
- // Pitch here makes possible to pass data from source to destination
- // without need for textures and allocated memory to be the same size.
- bgfx::updateTexture2D(texture2d, 0, tx, ty, tw, th, mem, pitch);
- }
- }
+ m_rr = rand()%255;
+ m_gg = rand()%255;
+ m_bb = rand()%255;
+ }
+ else
+ {
+ ++m_miss;
- bgfx::dbgTextPrintf(0, 4, 0x0f, "hit: %d, miss %d", hit, miss);
+ for (uint32_t ii = 0, num = bx::uint32_min(10, (uint32_t)m_quads.size() ); ii < num; ++ii)
+ {
+ face = m_quads.front();
+ const Pack2D& rect = face.m_rect;
- float at[3] = { 0.0f, 0.0f, 0.0f };
- float eye[3] = { 0.0f, 0.0f, -5.0f };
+ updateTextureCubeRectBgra8(m_textureCube[0], face.m_side, rect.m_x, rect.m_y, rect.m_width, rect.m_height, 0, 0, 0);
+ if (m_blitSupported)
+ {
+ bgfx::blit(0, m_textureCube[1], 0, rect.m_x, rect.m_y, face.m_side, m_textureCube[0], 0, rect.m_x, rect.m_y, face.m_side, rect.m_width, rect.m_height);
+ }
- float view[16];
- float proj[16];
- bx::mtxLookAt(view, eye, at);
- bx::mtxProj(proj, 60.0f, float(width)/float(height), 0.1f, 100.0f);
+ m_cube.clear(face);
+ m_quads.pop_front();
+ }
+ }
- // Set view and projection matrix for view 0.
- bgfx::setViewTransform(0, view, proj);
+ {
+ // Fill rect.
+ const uint32_t pitch = m_texture2dSize*4;
- float mtx[16];
- bx::mtxRotateXY(mtx, time, time*0.37f);
+ const uint16_t tw = rand()%m_texture2dSize;
+ const uint16_t th = rand()%m_texture2dSize;
+ const uint16_t tx = rand()%(m_texture2dSize-tw);
+ const uint16_t ty = rand()%(m_texture2dSize-th);
- // Set model matrix for rendering.
- bgfx::setTransform(mtx);
+ uint8_t* dst = &m_m_texture2dData[(ty*m_texture2dSize+tx)*4];
+ uint8_t* next = dst + pitch;
- // Set vertex and index buffer.
- bgfx::setVertexBuffer(vbh);
- bgfx::setIndexBuffer(ibh);
+ // Using makeRef to pass texture memory without copying.
+ const bgfx::Memory* mem = bgfx::makeRef(dst, tw*th*4);
- // Bind texture.
- bgfx::setTexture(0, s_texCube, textureCube);
+ for (uint32_t yy = 0; yy < th; ++yy, dst = next, next += pitch)
+ {
+ for (uint32_t xx = 0; xx < tw; ++xx, dst += 4)
+ {
+ dst[0] = m_bb;
+ dst[1] = m_gg;
+ dst[2] = m_rr;
+ dst[3] = 255;
+ }
+ }
- // Set render states.
- bgfx::setState(BGFX_STATE_DEFAULT);
+ // Pitch here makes possible to pass data from source to destination
+ // without need for m_textures and allocated memory to be the same size.
+ bgfx::updateTexture2D(m_texture2d, 0, tx, ty, tw, th, mem, pitch);
+ }
+ }
- // Submit primitive for rendering to view 0.
- bgfx::submit(0, program);
+ bgfx::dbgTextPrintf(0, 4, 0x0f, "m_hit: %d, m_miss %d", m_hit, m_miss);
+ float at[3] = { 0.0f, 0.0f, 0.0f };
+ float eye[3] = { 0.0f, 0.0f, -5.0f };
- // Set view and projection matrix for view 1.
- const float aspectRatio = float(height)/float(width);
- const float size = 11.0f;
- bx::mtxOrtho(proj, -size, size, size*aspectRatio, -size*aspectRatio, 0.0f, 1000.0f);
- bgfx::setViewTransform(1, NULL, proj);
+ float view[16];
+ float proj[16];
+ bx::mtxLookAt(view, eye, at);
+ bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f);
+ // Set view and projection matrix for view 0.
+ bgfx::setViewTransform(0, view, proj);
- bx::mtxTranslate(mtx, -size+2.0f - BX_COUNTOF(textures)*0.1f*0.5f, 1.9f, 0.0f);
+ for (uint32_t ii = 0; ii < 1 + uint32_t(m_blitSupported); ++ii)
+ {
+ float mtx[16];
+ bx::mtxSRT(mtx, 1.0f, 1.0f, 1.0f, time, time*0.37f, 0.0f, -1.5f*m_blitSupported + ii*3.0f, 0.0f, 0.0f);
- // Set model matrix for rendering.
- bgfx::setTransform(mtx);
+ // Set model matrix for rendering.
+ bgfx::setTransform(mtx);
- // Set vertex and index buffer.
- bgfx::setVertexBuffer(vbh);
- bgfx::setIndexBuffer(ibh);
+ // Set vertex and index buffer.
+ bgfx::setVertexBuffer(m_vbh);
+ bgfx::setIndexBuffer(m_ibh);
- // Bind texture.
- bgfx::setTexture(0, s_texColor, texture2d);
+ // Bind texture.
+ bgfx::setTexture(0, s_texCube, m_textureCube[ii]);
- // Set render states.
- bgfx::setState(BGFX_STATE_DEFAULT);
+ // Set render states.
+ bgfx::setState(BGFX_STATE_DEFAULT);
- // Submit primitive for rendering to view 1.
- bgfx::submit(1, programCmp);
+ // Submit primitive for rendering to view 0.
+ bgfx::submit(0, m_program);
+ }
- const float xpos = -size+2.0f - BX_COUNTOF(textures)*0.1f*0.5f;
+ // Set view and projection matrix for view 1.
+ const float aspectRatio = float(m_height)/float(m_width);
+ const float size = 11.0f;
+ bx::mtxOrtho(proj, -size, size, size*aspectRatio, -size*aspectRatio, 0.0f, 1000.0f);
+ bgfx::setViewTransform(1, NULL, proj);
- for (uint32_t ii = 0; ii < BX_COUNTOF(textures); ++ii)
- {
- bx::mtxTranslate(mtx, xpos + ii*2.1f, size-6.5f, 0.0f);
+ float mtx[16];
+ bx::mtxTranslate(mtx, -size+2.0f - BX_COUNTOF(m_textures)*0.1f*0.5f, 1.9f, 0.0f);
// Set model matrix for rendering.
bgfx::setTransform(mtx);
// Set vertex and index buffer.
- bgfx::setVertexBuffer(vbh);
- bgfx::setIndexBuffer(ibh, 0, 6);
+ bgfx::setVertexBuffer(m_vbh);
+ bgfx::setIndexBuffer(m_ibh);
// Bind texture.
- bgfx::setTexture(0, s_texColor, textures[ii]);
+ bgfx::setTexture(0, s_texColor, m_texture2d);
// Set render states.
bgfx::setState(BGFX_STATE_DEFAULT);
// Submit primitive for rendering to view 1.
- bgfx::submit(1, programCmp);
- }
+ bgfx::submit(1, m_programCmp);
- for (uint32_t ii = 0; ii < numTextures3d; ++ii)
- {
- bx::mtxTranslate(mtx, xpos + ii*2.1f, -size+6.5f, 0.0f);
+ const float xpos = -size+2.0f - BX_COUNTOF(m_textures)*0.1f*0.5f;
- // Set model matrix for rendering.
- bgfx::setTransform(mtx);
+ for (uint32_t ii = 0; ii < BX_COUNTOF(m_textures); ++ii)
+ {
+ bx::mtxTranslate(mtx, xpos + ii*2.1f, size-6.5f, 0.0f);
- // Set vertex and index buffer.
- bgfx::setVertexBuffer(vbh);
- bgfx::setIndexBuffer(ibh, 0, 6);
+ // Set model matrix for rendering.
+ bgfx::setTransform(mtx);
- // Bind texture.
- bgfx::setTexture(0, s_texColor, textures3d[ii]);
+ // Set vertex and index buffer.
+ bgfx::setVertexBuffer(m_vbh);
+ bgfx::setIndexBuffer(m_ibh, 0, 6);
- // Set render states.
- bgfx::setState(BGFX_STATE_DEFAULT);
+ // Bind texture.
+ bgfx::setTexture(0, s_texColor, m_textures[ii]);
- // Submit primitive for rendering to view 1.
- bgfx::submit(1, program3d);
- }
+ // Set render states.
+ bgfx::setState(BGFX_STATE_DEFAULT);
- for (uint32_t ii = 0; ii < 4; ++ii)
- {
- bx::mtxTranslate(mtx, xpos + (size-2.0f)*2.1f, -size+6.5f + ii*2.1f, 0.0f);
+ // Submit primitive for rendering to view 1.
+ bgfx::submit(1, m_programCmp);
+ }
- // Set model matrix for rendering.
- bgfx::setTransform(mtx);
+ for (uint32_t ii = 0; ii < m_numm_textures3d; ++ii)
+ {
+ bx::mtxTranslate(mtx, xpos + ii*2.1f, -size+6.5f, 0.0f);
- // Set vertex and index buffer.
- bgfx::setVertexBuffer(vbh, 24, 4);
- bgfx::setIndexBuffer(ibh, 0, 6);
+ // Set model matrix for rendering.
+ bgfx::setTransform(mtx);
- // Bind texture.
- bgfx::setTexture(0, s_texColor, textures[ii]);
+ // Set vertex and index buffer.
+ bgfx::setVertexBuffer(m_vbh);
+ bgfx::setIndexBuffer(m_ibh, 0, 6);
- // Set render states.
- bgfx::setState(BGFX_STATE_DEFAULT);
+ // Bind texture.
+ bgfx::setTexture(0, s_texColor, m_textures3d[ii]);
- // Submit primitive for rendering to view 1.
- bgfx::submit(1, programCmp);
- }
+ // Set render states.
+ bgfx::setState(BGFX_STATE_DEFAULT);
- // Advance to next frame. Rendering thread will be kicked to
- // process submitted rendering primitives.
- bgfx::frame();
- }
+ // Submit primitive for rendering to view 1.
+ bgfx::submit(1, m_program3d);
+ }
- // 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();
+ for (uint32_t ii = 0; ii < 4; ++ii)
+ {
+ bx::mtxTranslate(mtx, xpos + (size-2.0f)*2.1f, -size+6.5f + ii*2.1f, 0.0f);
- // Cleanup.
- free(texture2dData);
+ // Set model matrix for rendering.
+ bgfx::setTransform(mtx);
- for (uint32_t ii = 0; ii < BX_COUNTOF(textures); ++ii)
- {
- bgfx::destroyTexture(textures[ii]);
- }
+ // Set vertex and index buffer.
+ bgfx::setVertexBuffer(m_vbh, 24, 4);
+ bgfx::setIndexBuffer(m_ibh, 0, 6);
- for (uint32_t ii = 0; ii < numTextures3d; ++ii)
- {
- bgfx::destroyTexture(textures3d[ii]);
- }
+ // Bind texture.
+ bgfx::setTexture(0, s_texColor, m_textures[ii]);
- bgfx::destroyTexture(texture2d);
- bgfx::destroyTexture(textureCube);
- bgfx::destroyIndexBuffer(ibh);
- bgfx::destroyVertexBuffer(vbh);
- if (bgfx::isValid(program3d) )
- {
- bgfx::destroyProgram(program3d);
+ // Set render states.
+ bgfx::setState(BGFX_STATE_DEFAULT);
+
+ // Submit primitive for rendering to view 1.
+ bgfx::submit(1, m_programCmp);
+ }
+
+ // Advance to next frame. Rendering thread will be kicked to
+ // process submitted rendering primitives.
+ bgfx::frame();
+ return true;
+ }
+
+ return false;
}
- bgfx::destroyProgram(programCmp);
- bgfx::destroyProgram(program);
- bgfx::destroyUniform(u_time);
- bgfx::destroyUniform(s_texColor);
- bgfx::destroyUniform(s_texCube);
- // Shutdown bgfx.
- bgfx::shutdown();
+ uint8_t* m_m_texture2dData;
+
+ uint32_t m_width;
+ uint32_t m_height;
+ uint32_t m_debug;
+ uint32_t m_reset;
+
+ uint32_t m_numm_textures3d;
+ bool m_texture3DSupported;
+ bool m_blitSupported;
+
+ std::list<PackCube> m_quads;
+ RectPackCubeT<256> m_cube;
+ int64_t m_updateTime;
+ int64_t m_timeOffset;
+
+ uint32_t m_hit;
+ uint32_t m_miss;
+
+ uint8_t m_rr;
+ uint8_t m_gg;
+ uint8_t m_bb;
+
+ bgfx::TextureHandle m_textures[9];
+ bgfx::TextureHandle m_textures3d[3];
+ bgfx::TextureHandle m_texture2d;
+ bgfx::TextureHandle m_textureCube[2];
+ bgfx::IndexBufferHandle m_ibh;
+ bgfx::VertexBufferHandle m_vbh;
+ bgfx::ProgramHandle m_program3d;
+ bgfx::ProgramHandle m_programCmp;
+ bgfx::ProgramHandle m_program;
+ bgfx::UniformHandle u_time;
+ bgfx::UniformHandle s_texColor;
+ bgfx::UniformHandle s_texCube;
- return 0;
-}
+};
+
+ENTRY_IMPLEMENT_MAIN(Update);
diff --git a/3rdparty/bgfx/examples/09-hdr/hdr.cpp b/3rdparty/bgfx/examples/09-hdr/hdr.cpp
index 9ad7eb5aeca..a5985f45e75 100644
--- a/3rdparty/bgfx/examples/09-hdr/hdr.cpp
+++ b/3rdparty/bgfx/examples/09-hdr/hdr.cpp
@@ -141,14 +141,16 @@ inline float square(float _x)
class HDR : public entry::AppI
{
- void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE
+ void init(int _argc, char** _argv) BX_OVERRIDE
{
- m_width = 1280;
+ Args args(_argc, _argv);
+
+ m_width = 1280;
m_height = 720;
- m_debug = BGFX_DEBUG_TEXT;
- m_reset = BGFX_RESET_VSYNC;
+ m_debug = BGFX_DEBUG_TEXT;
+ m_reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(m_width, m_height, m_reset);
// Enable m_debug text.
@@ -215,6 +217,16 @@ class HDR : public entry::AppI
m_bright = bgfx::createFrameBuffer(bgfx::BackbufferRatio::Half, bgfx::TextureFormat::BGRA8);
m_blur = bgfx::createFrameBuffer(bgfx::BackbufferRatio::Eighth, bgfx::TextureFormat::BGRA8);
+ m_lumBgra8 = 0;
+ if ( (BGFX_CAPS_TEXTURE_BLIT|BGFX_CAPS_TEXTURE_READ_BACK) == (bgfx::getCaps()->supported & (BGFX_CAPS_TEXTURE_BLIT|BGFX_CAPS_TEXTURE_READ_BACK) ) )
+ {
+ m_rb = bgfx::createTexture2D(1, 1, 1, bgfx::TextureFormat::BGRA8, BGFX_TEXTURE_READ_BACK);
+ }
+ else
+ {
+ m_rb.idx = bgfx::invalidHandle;
+ }
+
// Imgui.
imguiCreate();
@@ -259,6 +271,10 @@ class HDR : public entry::AppI
bgfx::destroyProgram(m_blurProgram);
bgfx::destroyProgram(m_brightProgram);
bgfx::destroyTexture(m_uffizi);
+ if (bgfx::isValid(m_rb) )
+ {
+ bgfx::destroyTexture(m_rb);
+ }
bgfx::destroyUniform(s_texCube);
bgfx::destroyUniform(s_texColor);
@@ -306,7 +322,7 @@ class HDR : public entry::AppI
, m_height
);
- imguiBeginScrollArea("Settings", m_width - m_width / 5 - 10, 10, m_width / 5, m_height / 3, &m_scrollArea);
+ imguiBeginScrollArea("Settings", m_width - m_width / 5 - 10, 10, m_width / 5, m_height / 2, &m_scrollArea);
imguiSeparatorLine();
imguiSlider("Speed", m_speed, 0.0f, 1.0f, 0.01f);
@@ -316,6 +332,14 @@ class HDR : public entry::AppI
imguiSlider("White point", m_white, 0.1f, 2.0f, 0.01f);
imguiSlider("Threshold", m_threshold, 0.1f, 2.0f, 0.01f);
+ if (bgfx::isValid(m_rb) )
+ {
+ union { uint32_t color; uint8_t bgra[4]; } cast = { m_lumBgra8 };
+ float exponent = cast.bgra[3]/255.0f * 255.0f - 128.0f;
+ float lumAvg = cast.bgra[2]/255.0f * exp2(exponent);
+ imguiSlider("Lum Avg", lumAvg, 0.0f, 1.0f, 0.01f, false);
+ }
+
imguiEndScrollArea();
imguiEndFrame();
@@ -341,7 +365,7 @@ class HDR : public entry::AppI
// Set views.
for (uint32_t ii = 0; ii < 6; ++ii)
{
- bgfx::setViewRect(ii, 0, 0, m_width, m_height);
+ bgfx::setViewRect(ii, 0, 0, bgfx::BackbufferRatio::Equal);
}
bgfx::setViewFrameBuffer(0, m_fbh);
bgfx::setViewFrameBuffer(1, m_fbh);
@@ -362,13 +386,13 @@ class HDR : public entry::AppI
bgfx::setViewRect(6, 0, 0, 1, 1);
bgfx::setViewFrameBuffer(6, m_lum[4]);
- bgfx::setViewRect(7, 0, 0, m_width/2, m_height/2);
+ bgfx::setViewRect(7, 0, 0, bgfx::BackbufferRatio::Half);
bgfx::setViewFrameBuffer(7, m_bright);
- bgfx::setViewRect(8, 0, 0, m_width/8, m_height/8);
+ bgfx::setViewRect(8, 0, 0, bgfx::BackbufferRatio::Eighth);
bgfx::setViewFrameBuffer(8, m_blur);
- bgfx::setViewRect(9, 0, 0, m_width, m_height);
+ bgfx::setViewRect(9, 0, 0, bgfx::BackbufferRatio::Equal);
float view[16];
float proj[16];
@@ -473,6 +497,12 @@ class HDR : public entry::AppI
screenSpaceQuad( (float)m_width, (float)m_height, s_originBottomLeft);
bgfx::submit(9, m_tonemapProgram);
+ if (bgfx::isValid(m_rb) )
+ {
+ bgfx::blit(9, m_rb, 0, 0, m_lum[4]);
+ bgfx::readTexture(m_rb, &m_lumBgra8);
+ }
+
// Advance to next frame. Rendering thread will be kicked to
// process submitted rendering primitives.
bgfx::frame();
@@ -505,6 +535,7 @@ class HDR : public entry::AppI
Mesh* m_mesh;
bgfx::TextureHandle m_fbtextures[2];
+ bgfx::TextureHandle m_rb;
bgfx::FrameBufferHandle m_fbh;
bgfx::FrameBufferHandle m_lum[5];
bgfx::FrameBufferHandle m_bright;
@@ -514,6 +545,7 @@ class HDR : public entry::AppI
uint32_t m_height;
uint32_t m_debug;
uint32_t m_reset;
+ uint32_t m_lumBgra8;
uint32_t m_oldWidth;
uint32_t m_oldHeight;
diff --git a/3rdparty/bgfx/examples/10-font/font.cpp b/3rdparty/bgfx/examples/10-font/font.cpp
index 660ff2998af..1701e566c41 100644
--- a/3rdparty/bgfx/examples/10-font/font.cpp
+++ b/3rdparty/bgfx/examples/10-font/font.cpp
@@ -4,8 +4,8 @@
*/
#include "common.h"
+#include "bgfx_utils.h"
-#include <bgfx/bgfx.h>
#include <bx/timer.h>
#include <bx/string.h>
#include <bx/fpumath.h>
@@ -46,15 +46,16 @@ TrueTypeHandle loadTtf(FontManager* _fm, const char* _filePath)
return invalid;
}
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
-
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
// Enable debug text.
diff --git a/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp b/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp
index d54d4756cd8..72881bb908e 100644
--- a/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp
+++ b/3rdparty/bgfx/examples/11-fontsdf/fontsdf.cpp
@@ -64,15 +64,16 @@ TrueTypeHandle loadTtf(FontManager* _fm, const char* _filePath)
return invalid;
}
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
-
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
// Enable debug text.
diff --git a/3rdparty/bgfx/examples/12-lod/fs_tree.sc b/3rdparty/bgfx/examples/12-lod/fs_tree.sc
index 4ff3b4805ea..7b8e0fbb1f6 100644
--- a/3rdparty/bgfx/examples/12-lod/fs_tree.sc
+++ b/3rdparty/bgfx/examples/12-lod/fs_tree.sc
@@ -7,8 +7,8 @@ $input v_pos, v_view, v_normal, v_texcoord0
#include "../common/common.sh"
-SAMPLER2D(u_texColor, 0);
-SAMPLER2D(u_texStipple, 1);
+SAMPLER2D(s_texColor, 0);
+SAMPLER2D(s_texStipple, 1);
uniform vec4 u_stipple;
vec2 blinn(vec3 _lightDir, vec3 _normal, vec3 _viewDir)
@@ -23,8 +23,8 @@ void main()
{
vec2 viewport = (u_viewRect.zw - u_viewRect.xy) * vec2(1.0/8.0, 1.0/4.0);
vec2 stippleUV = viewport*(v_pos.xy*0.5 + 0.5);
- vec4 color = texture2D(u_texColor, v_texcoord0);
- if ( (u_stipple.x - texture2D(u_texStipple,stippleUV).x)*u_stipple.y > u_stipple.z
+ vec4 color = texture2D(s_texColor, v_texcoord0);
+ if ( (u_stipple.x - texture2D(s_texStipple, stippleUV).x)*u_stipple.y > u_stipple.z
|| color.w < 0.5)
{
discard;
@@ -34,7 +34,7 @@ void main()
vec3 normal = normalize(v_normal);
vec3 view = normalize(v_view);
vec2 bln = blinn(lightDir, normal, view);
- float l = saturate(bln.y);
+ float l = saturate(bln.y) + 0.12;
color.xyz = toLinear(color.xyz)*l;
gl_FragColor = toGamma(color);
diff --git a/3rdparty/bgfx/examples/12-lod/lod.cpp b/3rdparty/bgfx/examples/12-lod/lod.cpp
index c57d7bd820d..d47cc3708c5 100644
--- a/3rdparty/bgfx/examples/12-lod/lod.cpp
+++ b/3rdparty/bgfx/examples/12-lod/lod.cpp
@@ -15,7 +15,7 @@ struct KnightPos
int32_t m_y;
};
-KnightPos knightTour[8*4] =
+static const KnightPos knightTour[8*4] =
{
{0,0}, {1,2}, {3,3}, {4,1}, {5,3}, {7,2}, {6,0}, {5,2},
{7,3}, {6,1}, {4,0}, {3,2}, {2,0}, {0,1}, {1,3}, {2,1},
@@ -23,273 +23,297 @@ KnightPos knightTour[8*4] =
{7,1}, {6,3}, {5,1}, {7,0}, {6,2}, {4,3}, {3,1}, {2,3},
};
-int _main_(int /*_argc*/, char** /*_argv*/)
+class Lod : public entry::AppI
{
- uint32_t width = 1280;
- uint32_t height = 720;
- uint32_t debug = BGFX_DEBUG_TEXT;
- uint32_t reset = BGFX_RESET_VSYNC;
+ void init(int _argc, char** _argv) BX_OVERRIDE
+ {
+ Args args(_argc, _argv);
- bgfx::init();
- bgfx::reset(width, height, reset);
+ m_width = 1280;
+ m_height = 720;
+ m_debug = BGFX_DEBUG_TEXT;
+ m_reset = BGFX_RESET_VSYNC;
- // Enable debug text.
- bgfx::setDebug(debug);
+ bgfx::init(args.m_type, args.m_pciId);
+ bgfx::reset(m_width, m_height, m_reset);
- // Set view 0 clear state.
- bgfx::setViewClear(0
- , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH
- , 0x303030ff
- , 1.0f
- , 0
- );
+ // Enable debug text.
+ bgfx::setDebug(m_debug);
- bgfx::UniformHandle s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
- bgfx::UniformHandle s_texStipple = bgfx::createUniform("s_texStipple", bgfx::UniformType::Int1);
- bgfx::UniformHandle u_stipple = bgfx::createUniform("u_stipple", bgfx::UniformType::Vec4);
+ // Set view 0 clear state.
+ bgfx::setViewClear(0
+ , BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH
+ , 0x303030ff
+ , 1.0f
+ , 0
+ );
- bgfx::ProgramHandle program = loadProgram("vs_tree", "fs_tree");
+ s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
+ s_texStipple = bgfx::createUniform("s_texStipple", bgfx::UniformType::Int1);
+ u_stipple = bgfx::createUniform("u_stipple", bgfx::UniformType::Vec4);
- bgfx::TextureHandle textureLeafs = loadTexture("leafs1.dds");
- bgfx::TextureHandle textureBark = loadTexture("bark1.dds");
+ m_program = loadProgram("vs_tree", "fs_tree");
- bgfx::TextureHandle textureStipple;
+ m_textureLeafs = loadTexture("leafs1.dds");
+ m_textureBark = loadTexture("bark1.dds");
- const bgfx::Memory* stippleTex = bgfx::alloc(8*4);
- memset(stippleTex->data, 0, stippleTex->size);
+ const bgfx::Memory* stippleTex = bgfx::alloc(8*4);
+ memset(stippleTex->data, 0, stippleTex->size);
- for (uint32_t ii = 0; ii < 32; ++ii)
- {
- stippleTex->data[knightTour[ii].m_y * 8 + knightTour[ii].m_x] = ii*4;
- }
+ for (uint32_t ii = 0; ii < 32; ++ii)
+ {
+ stippleTex->data[knightTour[ii].m_y * 8 + knightTour[ii].m_x] = ii*4;
+ }
- textureStipple = bgfx::createTexture2D(8, 4, 1
+ m_textureStipple = bgfx::createTexture2D(8, 4, 1
, bgfx::TextureFormat::R8
, BGFX_TEXTURE_MAG_POINT|BGFX_TEXTURE_MIN_POINT
, stippleTex
);
- Mesh* meshTop[3] =
- {
- meshLoad("meshes/tree1b_lod0_1.bin"),
- meshLoad("meshes/tree1b_lod1_1.bin"),
- meshLoad("meshes/tree1b_lod2_1.bin"),
- };
+ m_meshTop[0] = meshLoad("meshes/tree1b_lod0_1.bin");
+ m_meshTop[1] = meshLoad("meshes/tree1b_lod1_1.bin");
+ m_meshTop[2] = meshLoad("meshes/tree1b_lod2_1.bin");
- Mesh* meshTrunk[3] =
- {
- meshLoad("meshes/tree1b_lod0_2.bin"),
- meshLoad("meshes/tree1b_lod1_2.bin"),
- meshLoad("meshes/tree1b_lod2_2.bin"),
- };
-
- // Imgui.
- imguiCreate();
-
- const uint64_t stateCommon = 0
- | BGFX_STATE_RGB_WRITE
- | BGFX_STATE_ALPHA_WRITE
- | BGFX_STATE_DEPTH_TEST_LESS
- | BGFX_STATE_CULL_CCW
- | BGFX_STATE_MSAA
- ;
-
- const uint64_t stateTransparent = stateCommon
- | BGFX_STATE_BLEND_ALPHA
- ;
-
- const uint64_t stateOpaque = stateCommon
- | BGFX_STATE_DEPTH_WRITE
- ;
-
- int32_t scrollArea = 0;
-
- bool transitions = true;
- int transitionFrame = 0;
- int currLOD = 0;
- int targetLOD = 0;
-
- float at[3] = { 0.0f, 1.0f, 0.0f };
- float eye[3] = { 0.0f, 1.0f, -2.0f };
-
- entry::MouseState mouseState;
- while (!entry::processEvents(width, height, debug, reset, &mouseState) )
- {
- imguiBeginFrame(mouseState.m_mx
- , mouseState.m_my
- , (mouseState.m_buttons[entry::MouseButton::Left ] ? IMGUI_MBUT_LEFT : 0)
- | (mouseState.m_buttons[entry::MouseButton::Right ] ? IMGUI_MBUT_RIGHT : 0)
- | (mouseState.m_buttons[entry::MouseButton::Middle] ? IMGUI_MBUT_MIDDLE : 0)
- , mouseState.m_mz
- , width
- , height
- );
+ m_meshTrunk[0] = meshLoad("meshes/tree1b_lod0_2.bin");
+ m_meshTrunk[1] = meshLoad("meshes/tree1b_lod1_2.bin");
+ m_meshTrunk[2] = meshLoad("meshes/tree1b_lod2_2.bin");
- imguiBeginScrollArea("Toggle transitions", width - width / 5 - 10, 10, width / 5, height / 6, &scrollArea);
- imguiSeparatorLine();
+ // Imgui.
+ imguiCreate();
- if (imguiButton(transitions ? "ON" : "OFF") )
- {
- transitions = !transitions;
- }
+ m_scrollArea = 0;
+ m_transitions = true;
- static float distance = 2.0f;
- imguiSlider("Distance", distance, 2.0f, 6.0f, .01f);
+ m_transitionFrame = 0;
+ m_currLod = 0;
+ m_targetLod = 0;
+ }
+
+ virtual int shutdown() BX_OVERRIDE
+ {
+ imguiDestroy();
- imguiEndScrollArea();
- imguiEndFrame();
+ for (uint32_t ii = 0; ii < BX_COUNTOF(m_meshTop); ++ii)
+ {
+ meshUnload(m_meshTop[ii]);
+ meshUnload(m_meshTrunk[ii]);
+ }
- // Set view 0 default viewport.
- bgfx::setViewRect(0, 0, 0, width, height);
+ // Cleanup.
+ bgfx::destroyProgram(m_program);
- // This dummy draw call is here to make sure that view 0 is cleared
- // if no other draw calls are submitted to view 0.
- bgfx::touch(0);
+ bgfx::destroyUniform(s_texColor);
+ bgfx::destroyUniform(s_texStipple);
+ bgfx::destroyUniform(u_stipple);
- int64_t now = bx::getHPCounter();
- static int64_t last = now;
- const int64_t frameTime = now - last;
- last = now;
- const double freq = double(bx::getHPFrequency() );
- const double toMs = 1000.0/freq;
+ bgfx::destroyTexture(m_textureStipple);
+ bgfx::destroyTexture(m_textureLeafs);
+ bgfx::destroyTexture(m_textureBark);
- // Use debug font to print information about this example.
- bgfx::dbgTextClear();
- bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/12-lod");
- bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Mesh LOD transitions.");
- bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs);
- bgfx::dbgTextPrintf(0, 4, transitions ? 0x2f : 0x1f, transitions ? "Transitions on" : "Transitions off");
+ // Shutdown bgfx.
+ bgfx::shutdown();
- eye[2] = -distance;
+ return 0;
+ }
- // Set view and projection matrix for view 0.
- const bgfx::HMD* hmd = bgfx::getHMD();
- if (NULL != hmd && 0 != (hmd->flags & BGFX_HMD_RENDERING) )
+ bool update() BX_OVERRIDE
+ {
+ if (!entry::processEvents(m_width, m_height, m_debug, m_reset, &m_mouseState) )
{
- float view[16];
- bx::mtxQuatTranslationHMD(view, hmd->eye[0].rotation, eye);
+ imguiBeginFrame(m_mouseState.m_mx
+ , m_mouseState.m_my
+ , (m_mouseState.m_buttons[entry::MouseButton::Left ] ? IMGUI_MBUT_LEFT : 0)
+ | (m_mouseState.m_buttons[entry::MouseButton::Right ] ? IMGUI_MBUT_RIGHT : 0)
+ | (m_mouseState.m_buttons[entry::MouseButton::Middle] ? IMGUI_MBUT_MIDDLE : 0)
+ , m_mouseState.m_mz
+ , m_width
+ , m_height
+ );
+
+ imguiBeginScrollArea("Toggle transitions", m_width - m_width / 5 - 10, 10, m_width / 5, m_height / 6, &m_scrollArea);
+ imguiSeparatorLine();
+
+ if (imguiButton(m_transitions ? "ON" : "OFF") )
+ {
+ m_transitions = !m_transitions;
+ }
- float proj[16];
- bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f);
+ static float distance = 2.0f;
+ imguiSlider("Distance", distance, 2.0f, 6.0f, 0.01f);
- bgfx::setViewTransform(0, view, proj);
+ imguiEndScrollArea();
+ imguiEndFrame();
// Set view 0 default viewport.
- //
- // Use HMD's width/height since HMD's internal frame buffer size
- // might be much larger than window size.
- bgfx::setViewRect(0, 0, 0, hmd->width, hmd->height);
- }
- else
- {
- float view[16];
- bx::mtxLookAt(view, eye, at);
+ bgfx::setViewRect(0, 0, 0, m_width, m_height);
+
+ // This dummy draw call is here to make sure that view 0 is cleared
+ // if no other draw calls are submitted to view 0.
+ bgfx::touch(0);
+
+ int64_t now = bx::getHPCounter();
+ static int64_t last = now;
+ const int64_t frameTime = now - last;
+ last = now;
+ const double freq = double(bx::getHPFrequency() );
+ const double toMs = 1000.0/freq;
+
+ // Use debug font to print information about this example.
+ bgfx::dbgTextClear();
+ bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/12-lod");
+ bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Mesh LOD transitions.");
+ bgfx::dbgTextPrintf(0, 3, 0x0f, "Frame: % 7.3f[ms]", double(frameTime)*toMs);
+
+ float at[3] = { 0.0f, 1.0f, 0.0f };
+ float eye[3] = { 0.0f, 2.0f, -distance };
+
+ // Set view and projection matrix for view 0.
+ const bgfx::HMD* hmd = bgfx::getHMD();
+ if (NULL != hmd && 0 != (hmd->flags & BGFX_HMD_RENDERING) )
+ {
+ float view[16];
+ bx::mtxQuatTranslationHMD(view, hmd->eye[0].rotation, eye);
- float proj[16];
- bx::mtxProj(proj, 60.0f, float(width)/float(height), 0.1f, 100.0f);
- bgfx::setViewTransform(0, view, proj);
+ float proj[16];
+ bx::mtxProj(proj, hmd->eye[0].fov, 0.1f, 100.0f);
- // Set view 0 default viewport.
- bgfx::setViewRect(0, 0, 0, width, height);
- }
+ bgfx::setViewTransform(0, view, proj);
- float mtx[16];
- bx::mtxScale(mtx, 0.1f, 0.1f, 0.1f);
+ // Set view 0 default viewport.
+ //
+ // Use HMD's m_width/m_height since HMD's internal frame buffer size
+ // might be much larger than window size.
+ bgfx::setViewRect(0, 0, 0, hmd->width, hmd->height);
+ }
+ else
+ {
+ float view[16];
+ bx::mtxLookAt(view, eye, at);
- float stipple[3];
- float stippleInv[3];
+ float proj[16];
+ bx::mtxProj(proj, 60.0f, float(m_width)/float(m_height), 0.1f, 100.0f);
+ bgfx::setViewTransform(0, view, proj);
- const int currentLODframe = transitions ? 32-transitionFrame : 32;
- const int mainLOD = transitions ? currLOD : targetLOD;
+ // Set view 0 default viewport.
+ bgfx::setViewRect(0, 0, 0, m_width, m_height);
+ }
- stipple[0] = 0.0f;
- stipple[1] = -1.0f;
- stipple[2] = (float(currentLODframe)*4.0f/255.0f) - (1.0f/255.0f);
+ float mtx[16];
+ bx::mtxScale(mtx, 0.1f, 0.1f, 0.1f);
- stippleInv[0] = (float(31)*4.0f/255.0f);
- stippleInv[1] = 1.0f;
- stippleInv[2] = (float(transitionFrame)*4.0f/255.0f) - (1.0f/255.0f);
+ float stipple[3];
+ float stippleInv[3];
- bgfx::setTexture(0, s_texColor, textureBark);
- bgfx::setTexture(1, s_texStipple, textureStipple);
- bgfx::setUniform(u_stipple, stipple);
- meshSubmit(meshTrunk[mainLOD], 0, program, mtx, stateOpaque);
+ const int currentLODframe = m_transitions ? 32-m_transitionFrame : 32;
+ const int mainLOD = m_transitions ? m_currLod : m_targetLod;
- bgfx::setTexture(0, s_texColor, textureLeafs);
- bgfx::setTexture(1, s_texStipple, textureStipple);
- bgfx::setUniform(u_stipple, stipple);
- meshSubmit(meshTop[mainLOD], 0, program, mtx, stateTransparent);
+ stipple[0] = 0.0f;
+ stipple[1] = -1.0f;
+ stipple[2] = (float(currentLODframe)*4.0f/255.0f) - (1.0f/255.0f);
- if (transitions
- && (transitionFrame != 0) )
- {
- bgfx::setTexture(0, s_texColor, textureBark);
- bgfx::setTexture(1, s_texStipple, textureStipple);
- bgfx::setUniform(u_stipple, stippleInv);
- meshSubmit(meshTrunk[targetLOD], 0, program, mtx, stateOpaque);
-
- bgfx::setTexture(0, s_texColor, textureLeafs);
- bgfx::setTexture(1, s_texStipple, textureStipple);
- bgfx::setUniform(u_stipple, stippleInv);
- meshSubmit(meshTop[targetLOD], 0, program, mtx, stateTransparent);
- }
+ stippleInv[0] = (float(31)*4.0f/255.0f);
+ stippleInv[1] = 1.0f;
+ stippleInv[2] = (float(m_transitionFrame)*4.0f/255.0f) - (1.0f/255.0f);
- int lod = 0;
- if (eye[2] < -2.5f)
- {
- lod = 1;
- }
+ const uint64_t stateTransparent = 0
+ | BGFX_STATE_RGB_WRITE
+ | BGFX_STATE_ALPHA_WRITE
+ | BGFX_STATE_DEPTH_TEST_LESS
+ | BGFX_STATE_CULL_CCW
+ | BGFX_STATE_MSAA
+ | BGFX_STATE_BLEND_ALPHA
+ ;
- if (eye[2] < -5.0f)
- {
- lod = 2;
- }
+ const uint64_t stateOpaque = BGFX_STATE_DEFAULT;
- if (targetLOD!=lod)
- {
- if (targetLOD==currLOD)
+ bgfx::setTexture(0, s_texColor, m_textureBark);
+ bgfx::setTexture(1, s_texStipple, m_textureStipple);
+ bgfx::setUniform(u_stipple, stipple);
+ meshSubmit(m_meshTrunk[mainLOD], 0, m_program, mtx, stateOpaque);
+
+ bgfx::setTexture(0, s_texColor, m_textureLeafs);
+ bgfx::setTexture(1, s_texStipple, m_textureStipple);
+ bgfx::setUniform(u_stipple, stipple);
+ meshSubmit(m_meshTop[mainLOD], 0, m_program, mtx, stateTransparent);
+
+ if (m_transitions
+ && (m_transitionFrame != 0) )
{
- targetLOD = lod;
+ bgfx::setTexture(0, s_texColor, m_textureBark);
+ bgfx::setTexture(1, s_texStipple, m_textureStipple);
+ bgfx::setUniform(u_stipple, stippleInv);
+ meshSubmit(m_meshTrunk[m_targetLod], 0, m_program, mtx, stateOpaque);
+
+ bgfx::setTexture(0, s_texColor, m_textureLeafs);
+ bgfx::setTexture(1, s_texStipple, m_textureStipple);
+ bgfx::setUniform(u_stipple, stippleInv);
+ meshSubmit(m_meshTop[m_targetLod], 0, m_program, mtx, stateTransparent);
}
- }
- if (currLOD != targetLOD)
- {
- transitionFrame++;
- }
+ int lod = 0;
+ if (eye[2] < -2.5f)
+ {
+ lod = 1;
+ }
- if (transitionFrame>32)
- {
- currLOD = targetLOD;
- transitionFrame = 0;
- }
+ if (eye[2] < -5.0f)
+ {
+ lod = 2;
+ }
- // Advance to next frame. Rendering thread will be kicked to
- // process submitted rendering primitives.
- bgfx::frame();
- }
+ if (m_targetLod != lod)
+ {
+ if (m_targetLod == m_currLod)
+ {
+ m_targetLod = lod;
+ }
+ }
- imguiDestroy();
+ if (m_currLod != m_targetLod)
+ {
+ m_transitionFrame++;
+ }
- for (uint32_t ii = 0; ii < 3; ++ii)
- {
- meshUnload(meshTop[ii]);
- meshUnload(meshTrunk[ii]);
- }
+ if (m_transitionFrame > 32)
+ {
+ m_currLod = m_targetLod;
+ m_transitionFrame = 0;
+ }
- // Cleanup.
- bgfx::destroyProgram(program);
+ // Advance to next frame. Rendering thread will be kicked to
+ // process submitted rendering primitives.
+ bgfx::frame();
- bgfx::destroyUniform(s_texColor);
- bgfx::destroyUniform(s_texStipple);
- bgfx::destroyUniform(u_stipple);
+ return true;
+ }
- bgfx::destroyTexture(textureStipple);
- bgfx::destroyTexture(textureLeafs);
- bgfx::destroyTexture(textureBark);
+ return false;
+ }
- // Shutdown bgfx.
- bgfx::shutdown();
+ entry::MouseState m_mouseState;
+ uint32_t m_width;
+ uint32_t m_height;
+ uint32_t m_debug;
+ uint32_t m_reset;
+
+ Mesh* m_meshTop[3];
+ Mesh* m_meshTrunk[3];
+
+ bgfx::ProgramHandle m_program;
+ bgfx::UniformHandle s_texColor;
+ bgfx::UniformHandle s_texStipple;
+ bgfx::UniformHandle u_stipple;
+
+ bgfx::TextureHandle m_textureStipple;
+ bgfx::TextureHandle m_textureLeafs;
+ bgfx::TextureHandle m_textureBark;
+
+ int32_t m_scrollArea;
+ int32_t m_transitionFrame;
+ int32_t m_currLod;
+ int32_t m_targetLod;
+ bool m_transitions;
+};
- return 0;
-}
+ENTRY_IMPLEMENT_MAIN(Lod);
diff --git a/3rdparty/bgfx/examples/13-stencil/fs_stencil_texture_lightning.sc b/3rdparty/bgfx/examples/13-stencil/fs_stencil_texture_lightning.sc
index 07ce0c84297..43e4ff38190 100644
--- a/3rdparty/bgfx/examples/13-stencil/fs_stencil_texture_lightning.sc
+++ b/3rdparty/bgfx/examples/13-stencil/fs_stencil_texture_lightning.sc
@@ -16,7 +16,7 @@ uniform vec4 u_color;
uniform vec4 u_specular_shininess;
uniform vec4 u_lightPosRadius[MAX_NUM_LIGHTS];
uniform vec4 u_lightRgbInnerR[MAX_NUM_LIGHTS];
-SAMPLER2D(u_texColor, 0);
+SAMPLER2D(s_texColor, 0);
#define u_ambientPass u_params.x
#define u_lightingPass u_params.y
@@ -80,7 +80,7 @@ void main()
}
lightColor *= u_lightingPass;
- vec3 color = toLinear(texture2D(u_texColor, v_texcoord0)).xyz;
+ vec3 color = toLinear(texture2D(s_texColor, v_texcoord0)).xyz;
vec3 ambient = toGamma(ambientColor * color);
vec3 diffuse = toGamma(lightColor * color);
diff --git a/3rdparty/bgfx/examples/13-stencil/stencil.cpp b/3rdparty/bgfx/examples/13-stencil/stencil.cpp
index 7a1e90d2834..168c19ba569 100644
--- a/3rdparty/bgfx/examples/13-stencil/stencil.cpp
+++ b/3rdparty/bgfx/examples/13-stencil/stencil.cpp
@@ -828,15 +828,17 @@ struct Mesh
GroupArray m_groups;
};
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
ViewState viewState(1280, 720);
ClearValues clearValues(0x30303000, 1.0f, 0);
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(viewState.m_width, viewState.m_height, reset);
// Enable debug text.
diff --git a/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp b/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp
index 17a19ab566c..f8d5061204f 100644
--- a/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp
+++ b/3rdparty/bgfx/examples/14-shadowvolumes/shadowvolumes.cpp
@@ -1850,15 +1850,17 @@ bool clipTest(const float* _planes, uint8_t _planeNum, const Mesh& _mesh, const
return false;
}
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
ViewState viewState(1280, 720);
ClearValues clearValues = {0x00000000, 1.0f, 0};
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(viewState.m_width, viewState.m_height, reset);
// Enable debug text.
diff --git a/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sh b/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sh
index f3a88945cf5..a38a90f2ffc 100644
--- a/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sh
+++ b/3rdparty/bgfx/examples/15-shadowmaps-simple/fs_sms_shadow.sh
@@ -7,10 +7,10 @@
uniform vec4 u_lightPos;
#if SHADOW_PACKED_DEPTH
-SAMPLER2D(u_shadowMap, 0);
+SAMPLER2D(s_shadowMap, 0);
# define Sampler sampler2D
#else
-SAMPLER2DSHADOW(u_shadowMap, 0);
+SAMPLER2DSHADOW(s_shadowMap, 0);
# define Sampler sampler2DShadow
#endif // SHADOW_PACKED_DEPTH
@@ -90,7 +90,7 @@ void main()
vec2 lc = lit(ld, n, vd, 1.0);
vec2 texelSize = vec2_splat(1.0/512.0);
- float visibility = PCF(u_shadowMap, v_shadowcoord, shadowMapBias, texelSize);
+ float visibility = PCF(s_shadowMap, v_shadowcoord, shadowMapBias, texelSize);
vec3 ambient = 0.1 * color;
vec3 brdf = (lc.x + lc.y) * color * visibility;
diff --git a/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp b/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp
index 513a37f2579..badef17db12 100644
--- a/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp
+++ b/3rdparty/bgfx/examples/15-shadowmaps-simple/shadowmaps_simple.cpp
@@ -66,14 +66,16 @@ static const uint16_t s_planeIndices[] =
1, 3, 2,
};
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
bgfx::RendererType::Enum renderer = bgfx::getRendererType();
diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh
index 9c19212a3f0..f2090508904 100644
--- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh
+++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning.sh
@@ -29,10 +29,10 @@ uniform vec4 u_tetraNormalBlue;
uniform vec4 u_tetraNormalRed;
#endif
-SAMPLER2D(u_shadowMap0, 4);
-SAMPLER2D(u_shadowMap1, 5);
-SAMPLER2D(u_shadowMap2, 6);
-SAMPLER2D(u_shadowMap3, 7);
+SAMPLER2D(s_shadowMap0, 4);
+SAMPLER2D(s_shadowMap1, 5);
+SAMPLER2D(s_shadowMap2, 6);
+SAMPLER2D(s_shadowMap3, 7);
struct Shader
{
diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh
index 3e3373e6278..f5393d06db5 100644
--- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh
+++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_lightning_main.sh
@@ -48,7 +48,15 @@
float coverage = texcoordInRange(shadowcoord.xy/shadowcoord.w) * 0.4;
colorCoverage = vec3(-coverage, coverage, -coverage);
- visibility = computeVisibility(u_shadowMap0, shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness);
+ visibility = computeVisibility(s_shadowMap0
+ , shadowcoord
+ , u_shadowMapBias
+ , u_smSamplingParams
+ , texelSize
+ , u_shadowMapDepthMultiplier
+ , u_shadowMapMinVariance
+ , u_shadowMapHardness
+ );
}
else if (selection1)
{
@@ -56,7 +64,15 @@
float coverage = texcoordInRange(shadowcoord.xy/shadowcoord.w) * 0.4;
colorCoverage = vec3(coverage, coverage, -coverage);
- visibility = computeVisibility(u_shadowMap1, shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize/2.0, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness);
+ visibility = computeVisibility(s_shadowMap1
+ , shadowcoord
+ , u_shadowMapBias
+ , u_smSamplingParams
+ , texelSize/2.0
+ , u_shadowMapDepthMultiplier
+ , u_shadowMapMinVariance
+ , u_shadowMapHardness
+ );
}
else if (selection2)
{
@@ -64,7 +80,15 @@
float coverage = texcoordInRange(shadowcoord.xy/shadowcoord.w) * 0.4;
colorCoverage = vec3(-coverage, -coverage, coverage);
- visibility = computeVisibility(u_shadowMap2, shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize/3.0, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness);
+ visibility = computeVisibility(s_shadowMap2
+ , shadowcoord
+ , u_shadowMapBias
+ , u_smSamplingParams
+ , texelSize/3.0
+ , u_shadowMapDepthMultiplier
+ , u_shadowMapMinVariance
+ , u_shadowMapHardness
+ );
}
else //selection3
{
@@ -72,7 +96,15 @@
float coverage = texcoordInRange(shadowcoord.xy/shadowcoord.w) * 0.4;
colorCoverage = vec3(coverage, -coverage, -coverage);
- visibility = computeVisibility(u_shadowMap3, shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize/4.0, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness);
+ visibility = computeVisibility(s_shadowMap3
+ , shadowcoord
+ , u_shadowMapBias
+ , u_smSamplingParams
+ , texelSize/4.0
+ , u_shadowMapDepthMultiplier
+ , u_shadowMapMinVariance
+ , u_shadowMapHardness
+ );
}
#elif SM_OMNI
vec2 texelSize = vec2_splat(u_shadowMapTexelSize/4.0);
@@ -115,14 +147,30 @@
colorCoverage = vec3(coverage, -coverage, -coverage);
}
- visibility = computeVisibility(u_shadowMap0, shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness);
+ visibility = computeVisibility(s_shadowMap0
+ , shadowcoord
+ , u_shadowMapBias
+ , u_smSamplingParams
+ , texelSize
+ , u_shadowMapDepthMultiplier
+ , u_shadowMapMinVariance
+ , u_shadowMapHardness
+ );
#else
vec2 texelSize = vec2_splat(u_shadowMapTexelSize);
float coverage = texcoordInRange(v_shadowcoord.xy/v_shadowcoord.w) * 0.3;
colorCoverage = vec3(coverage, -coverage, -coverage);
- visibility = computeVisibility(u_shadowMap0, v_shadowcoord, u_shadowMapBias, u_smSamplingParams, texelSize, u_shadowMapDepthMultiplier, u_shadowMapMinVariance, u_shadowMapHardness);
+ visibility = computeVisibility(s_shadowMap0
+ , v_shadowcoord
+ , u_shadowMapBias
+ , u_smSamplingParams
+ , texelSize
+ , u_shadowMapDepthMultiplier
+ , u_shadowMapMinVariance
+ , u_shadowMapHardness
+ );
#endif
vec3 v = v_view;
diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_texture.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_texture.sc
index eea20d8ffb2..b81e40d192c 100644
--- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_texture.sc
+++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_color_texture.sc
@@ -7,13 +7,13 @@ $input v_texcoord0
#include "../common/common.sh"
uniform vec4 u_color;
-SAMPLER2D(u_texColor, 0);
+SAMPLER2D(s_texColor, 0);
void main()
{
- vec4 tcolor = toLinear(texture2D(u_texColor, v_texcoord0));
+ vec4 tcolor = toLinear(texture2D(s_texColor, v_texcoord0));
- if (tcolor.x < 0.1) //OK for now.
+ if (tcolor.x < 0.1)
{
discard;
}
diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur.sc
index 7c4186ed187..7f226049ee9 100644
--- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur.sc
+++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur.sc
@@ -6,9 +6,15 @@ $input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4
*/
#include "common.sh"
-SAMPLER2D(u_shadowMap0, 4);
+SAMPLER2D(s_shadowMap0, 4);
void main()
{
- gl_FragColor = blur9(u_shadowMap0, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4);
+ gl_FragColor = blur9(s_shadowMap0
+ , v_texcoord0
+ , v_texcoord1
+ , v_texcoord2
+ , v_texcoord3
+ , v_texcoord4
+ );
}
diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur_vsm.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur_vsm.sc
index 50f96c5fcb6..1173ef7b525 100644
--- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur_vsm.sc
+++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_hblur_vsm.sc
@@ -6,10 +6,15 @@ $input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4
*/
#include "common.sh"
-SAMPLER2D(u_shadowMap0, 4);
+SAMPLER2D(s_shadowMap0, 4);
void main()
{
- gl_FragColor = blur9VSM(u_shadowMap0, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4);
+ gl_FragColor = blur9VSM(s_shadowMap0
+ , v_texcoord0
+ , v_texcoord1
+ , v_texcoord2
+ , v_texcoord3
+ , v_texcoord4
+ );
}
-
diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_texture.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_texture.sc
index 42c2781422d..0f33138b7ff 100644
--- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_texture.sc
+++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_texture.sc
@@ -6,9 +6,9 @@ $input v_texcoord0
*/
#include "../common/common.sh"
-SAMPLER2D(u_texColor, 0);
+SAMPLER2D(s_texColor, 0);
void main()
{
- gl_FragColor = texture2D(u_texColor, v_texcoord0);
+ gl_FragColor = texture2D(s_texColor, v_texcoord0);
}
diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth.sc
index 592a1d926d9..c3ed6e0ec7a 100644
--- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth.sc
+++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth.sc
@@ -6,14 +6,14 @@ $input v_texcoord0
*/
#include "../common/common.sh"
-SAMPLER2D(u_shadowMap0, 4);
+SAMPLER2D(s_shadowMap0, 4);
uniform vec4 u_params2;
#define u_depthValuePow u_params2.x
void main()
{
- float depth = unpackRgbaToFloat(texture2D(u_shadowMap0, v_texcoord0) );
+ float depth = unpackRgbaToFloat(texture2D(s_shadowMap0, v_texcoord0) );
vec3 rgba = pow(vec3_splat(depth), vec3_splat(u_depthValuePow) );
gl_FragColor = vec4(rgba, 1.0);
}
diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth_vsm.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth_vsm.sc
index c81ba1856f6..2e2792ce47e 100644
--- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth_vsm.sc
+++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_unpackdepth_vsm.sc
@@ -6,14 +6,14 @@ $input v_texcoord0
*/
#include "../common/common.sh"
-SAMPLER2D(u_shadowMap0, 4);
+SAMPLER2D(s_shadowMap0, 4);
uniform vec4 u_params2;
#define u_depthValuePow u_params2.x
void main()
{
- vec4 val = texture2D(u_shadowMap0, v_texcoord0);
+ vec4 val = texture2D(s_shadowMap0, v_texcoord0);
float depth = unpackHalfFloat(val.rg);
vec3 rgba = pow(vec3_splat(depth), vec3_splat(u_depthValuePow) );
gl_FragColor = vec4(rgba, 1.0);
diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur.sc
index 7c4186ed187..7f226049ee9 100644
--- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur.sc
+++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur.sc
@@ -6,9 +6,15 @@ $input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4
*/
#include "common.sh"
-SAMPLER2D(u_shadowMap0, 4);
+SAMPLER2D(s_shadowMap0, 4);
void main()
{
- gl_FragColor = blur9(u_shadowMap0, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4);
+ gl_FragColor = blur9(s_shadowMap0
+ , v_texcoord0
+ , v_texcoord1
+ , v_texcoord2
+ , v_texcoord3
+ , v_texcoord4
+ );
}
diff --git a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur_vsm.sc b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur_vsm.sc
index 50f96c5fcb6..1173ef7b525 100644
--- a/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur_vsm.sc
+++ b/3rdparty/bgfx/examples/16-shadowmaps/fs_shadowmaps_vblur_vsm.sc
@@ -6,10 +6,15 @@ $input v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4
*/
#include "common.sh"
-SAMPLER2D(u_shadowMap0, 4);
+SAMPLER2D(s_shadowMap0, 4);
void main()
{
- gl_FragColor = blur9VSM(u_shadowMap0, v_texcoord0, v_texcoord1, v_texcoord2, v_texcoord3, v_texcoord4);
+ gl_FragColor = blur9VSM(s_shadowMap0
+ , v_texcoord0
+ , v_texcoord1
+ , v_texcoord2
+ , v_texcoord3
+ , v_texcoord4
+ );
}
-
diff --git a/3rdparty/bgfx/examples/16-shadowmaps/shadowmaps.cpp b/3rdparty/bgfx/examples/16-shadowmaps/shadowmaps.cpp
index 34ce52c36d2..050e639ae06 100644
--- a/3rdparty/bgfx/examples/16-shadowmaps/shadowmaps.cpp
+++ b/3rdparty/bgfx/examples/16-shadowmaps/shadowmaps.cpp
@@ -223,8 +223,8 @@ static const uint16_t s_planeIndices[] =
static bool s_flipV = false;
static float s_texelHalf = 0.0f;
-static bgfx::UniformHandle u_texColor;
-static bgfx::UniformHandle u_shadowMap[ShadowMapRenderTargets::Count];
+static bgfx::UniformHandle s_texColor;
+static bgfx::UniformHandle s_shadowMap[ShadowMapRenderTargets::Count];
static bgfx::FrameBufferHandle s_rtShadowMap[ShadowMapRenderTargets::Count];
static bgfx::FrameBufferHandle s_rtBlur;
@@ -1012,12 +1012,12 @@ struct Mesh
// Set textures.
if (bgfx::invalidHandle != _texture.idx)
{
- bgfx::setTexture(0, u_texColor, _texture);
+ bgfx::setTexture(0, s_texColor, _texture);
}
for (uint8_t ii = 0; ii < ShadowMapRenderTargets::Count; ++ii)
{
- bgfx::setTexture(4 + ii, u_shadowMap[ii], s_rtShadowMap[ii]);
+ bgfx::setTexture(4 + ii, s_shadowMap[ii], s_rtShadowMap[ii]);
}
// Apply render state.
@@ -1313,15 +1313,17 @@ struct ShadowMapSettings
#undef IMGUI_FLOAT_PARAM
};
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
ViewState viewState(1280, 720);
ClearValues clearValues(0x00000000, 1.0f, 0);
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(viewState.m_width, viewState.m_height, reset);
// Enable debug text.
@@ -1349,11 +1351,11 @@ int _main_(int /*_argc*/, char** /*_argv*/)
// Uniforms.
s_uniforms.init();
- u_texColor = bgfx::createUniform("u_texColor", bgfx::UniformType::Int1);
- u_shadowMap[0] = bgfx::createUniform("u_shadowMap0", bgfx::UniformType::Int1);
- u_shadowMap[1] = bgfx::createUniform("u_shadowMap1", bgfx::UniformType::Int1);
- u_shadowMap[2] = bgfx::createUniform("u_shadowMap2", bgfx::UniformType::Int1);
- u_shadowMap[3] = bgfx::createUniform("u_shadowMap3", bgfx::UniformType::Int1);
+ s_texColor = bgfx::createUniform("s_texColor", bgfx::UniformType::Int1);
+ s_shadowMap[0] = bgfx::createUniform("s_shadowMap0", bgfx::UniformType::Int1);
+ s_shadowMap[1] = bgfx::createUniform("s_shadowMap1", bgfx::UniformType::Int1);
+ s_shadowMap[2] = bgfx::createUniform("s_shadowMap2", bgfx::UniformType::Int1);
+ s_shadowMap[3] = bgfx::createUniform("s_shadowMap3", bgfx::UniformType::Int1);
// Programs.
s_programs.init();
@@ -2812,12 +2814,12 @@ int _main_(int /*_argc*/, char** /*_argv*/)
if (bVsmOrEsm
&& currentSmSettings->m_doBlur)
{
- bgfx::setTexture(4, u_shadowMap[0], s_rtShadowMap[0]);
+ bgfx::setTexture(4, s_shadowMap[0], s_rtShadowMap[0]);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV);
bgfx::submit(RENDERVIEW_VBLUR_0_ID, s_programs.m_vBlur[depthType]);
- bgfx::setTexture(4, u_shadowMap[0], s_rtBlur);
+ bgfx::setTexture(4, s_shadowMap[0], s_rtBlur);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV);
bgfx::submit(RENDERVIEW_HBLUR_0_ID, s_programs.m_hBlur[depthType]);
@@ -2828,12 +2830,12 @@ int _main_(int /*_argc*/, char** /*_argv*/)
{
const uint8_t viewId = RENDERVIEW_VBLUR_0_ID + jj;
- bgfx::setTexture(4, u_shadowMap[0], s_rtShadowMap[ii]);
+ bgfx::setTexture(4, s_shadowMap[0], s_rtShadowMap[ii]);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV);
bgfx::submit(viewId, s_programs.m_vBlur[depthType]);
- bgfx::setTexture(4, u_shadowMap[0], s_rtBlur);
+ bgfx::setTexture(4, s_shadowMap[0], s_rtBlur);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV);
bgfx::submit(viewId+1, s_programs.m_hBlur[depthType]);
@@ -3063,7 +3065,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
// Draw depth rect.
if (settings.m_drawDepthBuffer)
{
- bgfx::setTexture(4, u_shadowMap[0], s_rtShadowMap[0]);
+ bgfx::setTexture(4, s_shadowMap[0], s_rtShadowMap[0]);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV);
bgfx::submit(RENDERVIEW_DRAWDEPTH_0_ID, s_programs.m_drawDepth[depthType]);
@@ -3072,7 +3074,7 @@ int _main_(int /*_argc*/, char** /*_argv*/)
{
for (uint8_t ii = 1; ii < settings.m_numSplits; ++ii)
{
- bgfx::setTexture(4, u_shadowMap[0], s_rtShadowMap[ii]);
+ bgfx::setTexture(4, s_shadowMap[0], s_rtShadowMap[ii]);
bgfx::setState(BGFX_STATE_RGB_WRITE|BGFX_STATE_ALPHA_WRITE);
screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV);
bgfx::submit(RENDERVIEW_DRAWDEPTH_0_ID+ii, s_programs.m_drawDepth[depthType]);
@@ -3145,11 +3147,11 @@ int _main_(int /*_argc*/, char** /*_argv*/)
s_programs.destroy();
- bgfx::destroyUniform(u_texColor);
- bgfx::destroyUniform(u_shadowMap[3]);
- bgfx::destroyUniform(u_shadowMap[2]);
- bgfx::destroyUniform(u_shadowMap[1]);
- bgfx::destroyUniform(u_shadowMap[0]);
+ bgfx::destroyUniform(s_texColor);
+ bgfx::destroyUniform(s_shadowMap[3]);
+ bgfx::destroyUniform(s_shadowMap[2]);
+ bgfx::destroyUniform(s_shadowMap[1]);
+ bgfx::destroyUniform(s_shadowMap[0]);
s_uniforms.destroy();
diff --git a/3rdparty/bgfx/examples/17-drawstress/drawstress.cpp b/3rdparty/bgfx/examples/17-drawstress/drawstress.cpp
index 1f40768b370..ff035625e9d 100644
--- a/3rdparty/bgfx/examples/17-drawstress/drawstress.cpp
+++ b/3rdparty/bgfx/examples/17-drawstress/drawstress.cpp
@@ -3,10 +3,10 @@
* License: http://www.opensource.org/licenses/BSD-2-Clause
*/
-#include <bgfx/bgfx.h>
-#include <bx/uint32_t.h>
-
#include "common.h"
+#include "bgfx_utils.h"
+
+#include <bx/uint32_t.h>
#include "imgui/imgui.h"
// embedded shaders
@@ -72,8 +72,10 @@ static const int64_t lowwm = 1000000/57;
class DrawStress : public entry::AppI
{
- void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE
+ void init(int _argc, char** _argv) BX_OVERRIDE
{
+ Args args(_argc, _argv);
+
m_width = 1280;
m_height = 720;
m_debug = BGFX_DEBUG_TEXT;
@@ -91,7 +93,7 @@ class DrawStress : public entry::AppI
m_deltaTimeAvgNs = 0;
m_numFrames = 0;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(m_width, m_height, m_reset);
const bgfx::Caps* caps = bgfx::getCaps();
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/18-ibl/ibl.cpp b/3rdparty/bgfx/examples/18-ibl/ibl.cpp
index 2d98aba5ac2..8f9f13a3ce1 100644
--- a/3rdparty/bgfx/examples/18-ibl/ibl.cpp
+++ b/3rdparty/bgfx/examples/18-ibl/ibl.cpp
@@ -213,14 +213,16 @@ struct LightProbe
bgfx::TextureHandle m_texIrr;
};
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
// Enable debug text.
diff --git a/3rdparty/bgfx/examples/19-oit/fs_oit_wb_blit.sc b/3rdparty/bgfx/examples/19-oit/fs_oit_wb_blit.sc
index d6b1157dbce..6380967d150 100644
--- a/3rdparty/bgfx/examples/19-oit/fs_oit_wb_blit.sc
+++ b/3rdparty/bgfx/examples/19-oit/fs_oit_wb_blit.sc
@@ -7,12 +7,12 @@ $input v_texcoord0
#include "../common/common.sh"
-SAMPLER2D(u_texColor0, 0);
-SAMPLER2D(u_texColor1, 1);
+SAMPLER2D(s_texColor0, 0);
+SAMPLER2D(s_texColor1, 1);
void main()
{
- vec4 accum = texture2D(u_texColor0, v_texcoord0);
- float opacity = texture2D(u_texColor1, v_texcoord0).x;
+ vec4 accum = texture2D(s_texColor0, v_texcoord0);
+ float opacity = texture2D(s_texColor1, v_texcoord0).x;
gl_FragColor = vec4(accum.xyz / clamp(accum.w, 1e-4, 5e4), opacity);
}
diff --git a/3rdparty/bgfx/examples/19-oit/fs_oit_wb_separate_blit.sc b/3rdparty/bgfx/examples/19-oit/fs_oit_wb_separate_blit.sc
index 9c3a9ed1cf8..195c5ff7d27 100644
--- a/3rdparty/bgfx/examples/19-oit/fs_oit_wb_separate_blit.sc
+++ b/3rdparty/bgfx/examples/19-oit/fs_oit_wb_separate_blit.sc
@@ -7,13 +7,13 @@ $input v_texcoord0
#include "../common/common.sh"
-SAMPLER2D(u_texColor0, 0);
-SAMPLER2D(u_texColor1, 1);
+SAMPLER2D(s_texColor0, 0);
+SAMPLER2D(s_texColor1, 1);
void main()
{
- vec4 accum = texture2D(u_texColor0, v_texcoord0);
+ vec4 accum = texture2D(s_texColor0, v_texcoord0);
float opacity = accum.w;
- float weight = texture2D(u_texColor1, v_texcoord0).x;
+ float weight = texture2D(s_texColor1, v_texcoord0).x;
gl_FragColor = vec4(accum.xyz / clamp(weight, 1e-4, 5e4), opacity);
}
diff --git a/3rdparty/bgfx/examples/19-oit/oit.cpp b/3rdparty/bgfx/examples/19-oit/oit.cpp
index 7457364e86e..c25f39621b2 100644
--- a/3rdparty/bgfx/examples/19-oit/oit.cpp
+++ b/3rdparty/bgfx/examples/19-oit/oit.cpp
@@ -146,14 +146,16 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, bool _originBott
}
}
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
// Create vertex stream declaration.
diff --git a/3rdparty/bgfx/examples/20-nanovg/nanovg.cpp b/3rdparty/bgfx/examples/20-nanovg/nanovg.cpp
index 2f4060a40b8..3f31e2c6cbe 100644
--- a/3rdparty/bgfx/examples/20-nanovg/nanovg.cpp
+++ b/3rdparty/bgfx/examples/20-nanovg/nanovg.cpp
@@ -22,11 +22,11 @@
//
#include "common.h"
+#include "bgfx_utils.h"
#include <stdio.h>
#include <math.h>
-#include <bgfx/bgfx.h>
#include <bx/string.h>
#include <bx/timer.h>
#include "entry/entry.h"
@@ -1201,14 +1201,16 @@ void renderDemo(struct NVGcontext* vg, float mx, float my, float width, float he
nvgRestore(vg);
}
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
// Enable debug text.
diff --git a/3rdparty/bgfx/examples/21-deferred/deferred.cpp b/3rdparty/bgfx/examples/21-deferred/deferred.cpp
index 019b8920518..f1201363036 100644
--- a/3rdparty/bgfx/examples/21-deferred/deferred.cpp
+++ b/3rdparty/bgfx/examples/21-deferred/deferred.cpp
@@ -215,14 +215,16 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf
class Deferred : public entry::AppI
{
- void init(int /*_argc*/, char** /*_argv*/) BX_OVERRIDE
+ void init(int _argc, char** _argv) BX_OVERRIDE
{
- m_width = 1280;
+ Args args(_argc, _argv);
+
+ m_width = 1280;
m_height = 720;
- m_debug = BGFX_DEBUG_TEXT;
- m_reset = BGFX_RESET_VSYNC;
+ m_debug = BGFX_DEBUG_TEXT;
+ m_reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(m_width, m_height, m_reset);
// Enable m_debug text.
@@ -410,9 +412,9 @@ class Deferred : public entry::AppI
else
{
if (m_oldWidth != m_width
- || m_oldHeight != m_height
- || m_oldReset != m_reset
- || !bgfx::isValid(m_gbuffer) )
+ || m_oldHeight != m_height
+ || m_oldReset != m_reset
+ || !bgfx::isValid(m_gbuffer) )
{
// Recreate variable size render targets when resolution changes.
m_oldWidth = m_width;
diff --git a/3rdparty/bgfx/examples/22-windows/windows.cpp b/3rdparty/bgfx/examples/22-windows/windows.cpp
index 36156fce478..24187e27fbf 100644
--- a/3rdparty/bgfx/examples/22-windows/windows.cpp
+++ b/3rdparty/bgfx/examples/22-windows/windows.cpp
@@ -92,14 +92,16 @@ static const InputBinding s_bindings[] =
INPUT_BINDING_END
};
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
const bgfx::Caps* caps = bgfx::getCaps();
diff --git a/3rdparty/bgfx/examples/23-vectordisplay/main.cpp b/3rdparty/bgfx/examples/23-vectordisplay/main.cpp
index f0999cb723f..2cd1574a4be 100644
--- a/3rdparty/bgfx/examples/23-vectordisplay/main.cpp
+++ b/3rdparty/bgfx/examples/23-vectordisplay/main.cpp
@@ -30,14 +30,16 @@ struct PosColorVertex
bgfx::VertexDecl PosColorVertex::ms_decl;
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
const bgfx::RendererType::Enum renderer = bgfx::getRendererType();
diff --git a/3rdparty/bgfx/examples/24-nbody/nbody.cpp b/3rdparty/bgfx/examples/24-nbody/nbody.cpp
index 854a55a7aea..dbd978b4f01 100644
--- a/3rdparty/bgfx/examples/24-nbody/nbody.cpp
+++ b/3rdparty/bgfx/examples/24-nbody/nbody.cpp
@@ -96,14 +96,16 @@ static const float s_quadVertices[] =
static const uint16_t s_quadIndices[] = { 0, 1, 2, 2, 3, 0, };
-int _main_(int /*_argc*/, char** /*_argv*/)
+int _main_(int _argc, char** _argv)
{
+ Args args(_argc, _argv);
+
uint32_t width = 1280;
uint32_t height = 720;
uint32_t debug = BGFX_DEBUG_TEXT;
uint32_t reset = BGFX_RESET_VSYNC;
- bgfx::init();
+ bgfx::init(args.m_type, args.m_pciId);
bgfx::reset(width, height, reset);
// Enable debug text.
diff --git a/3rdparty/bgfx/examples/common/bgfx_utils.cpp b/3rdparty/bgfx/examples/common/bgfx_utils.cpp
index 386062c065d..b1897c8f592 100644
--- a/3rdparty/bgfx/examples/common/bgfx_utils.cpp
+++ b/3rdparty/bgfx/examples/common/bgfx_utils.cpp
@@ -13,8 +13,9 @@
namespace stl = tinystl;
#include <bgfx/bgfx.h>
-#include <bx/readerwriter.h>
+#include <bx/commandline.h>
#include <bx/fpumath.h>
+#include <bx/readerwriter.h>
#include <bx/string.h>
#include "entry/entry.h"
#include <ib-compress/indexbufferdecompression.h>
@@ -621,3 +622,59 @@ void meshSubmit(const Mesh* _mesh, const MeshState*const* _state, uint8_t _numPa
{
_mesh->submit(_state, _numPasses, _mtx, _numMatrices);
}
+
+Args::Args(int _argc, char** _argv)
+ : m_type(bgfx::RendererType::Count)
+ , m_pciId(BGFX_PCI_ID_NONE)
+{
+ bx::CommandLine cmdLine(_argc, (const char**)_argv);
+
+ if (cmdLine.hasArg("gl") )
+ {
+ m_type = bgfx::RendererType::OpenGL;
+ }
+ else if (cmdLine.hasArg("noop")
+ || cmdLine.hasArg("vk") )
+ {
+ m_type = bgfx::RendererType::OpenGL;
+ }
+ else if (BX_ENABLED(BX_PLATFORM_WINDOWS) )
+ {
+ if (cmdLine.hasArg("d3d9") )
+ {
+ m_type = bgfx::RendererType::Direct3D9;
+ }
+ else if (cmdLine.hasArg("d3d11") )
+ {
+ m_type = bgfx::RendererType::Direct3D11;
+ }
+ else if (cmdLine.hasArg("d3d12") )
+ {
+ m_type = bgfx::RendererType::Direct3D12;
+ }
+ }
+ else if (BX_ENABLED(BX_PLATFORM_OSX) )
+ {
+ if (cmdLine.hasArg("mtl") )
+ {
+ m_type = bgfx::RendererType::Metal;
+ }
+ }
+
+ if (cmdLine.hasArg("amd") )
+ {
+ m_pciId = BGFX_PCI_ID_AMD;
+ }
+ else if (cmdLine.hasArg("nvidia") )
+ {
+ m_pciId = BGFX_PCI_ID_NVIDIA;
+ }
+ else if (cmdLine.hasArg("intel") )
+ {
+ m_pciId = BGFX_PCI_ID_INTEL;
+ }
+ else if (cmdLine.hasArg("sw") )
+ {
+ m_pciId = BGFX_PCI_ID_SOFTWARE_RASTERIZER;
+ }
+}
diff --git a/3rdparty/bgfx/examples/common/bgfx_utils.h b/3rdparty/bgfx/examples/common/bgfx_utils.h
index 2938abff1b9..a2427e51182 100644
--- a/3rdparty/bgfx/examples/common/bgfx_utils.h
+++ b/3rdparty/bgfx/examples/common/bgfx_utils.h
@@ -43,4 +43,12 @@ void meshStateDestroy(MeshState* _meshState);
void meshSubmit(const Mesh* _mesh, uint8_t _id, bgfx::ProgramHandle _program, const float* _mtx, uint64_t _state = BGFX_STATE_MASK);
void meshSubmit(const Mesh* _mesh, const MeshState*const* _state, uint8_t _numPasses, const float* _mtx, uint16_t _numMatrices = 1);
+struct Args
+{
+ Args(int _argc, char** _argv);
+
+ bgfx::RendererType::Enum m_type;
+ uint16_t m_pciId;
+};
+
#endif // BGFX_UTILS_H_HEADER_GUARD
diff --git a/3rdparty/bgfx/examples/common/entry/entry.cpp b/3rdparty/bgfx/examples/common/entry/entry.cpp
index 61dbe0b3c9c..08ac26e4e66 100644
--- a/3rdparty/bgfx/examples/common/entry/entry.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry.cpp
@@ -319,6 +319,10 @@ BX_PRAGMA_DIAGNOSTIC_POP();
int runApp(AppI* _app, int _argc, char** _argv)
{
_app->init(_argc, _argv);
+ bgfx::frame();
+
+ WindowHandle defaultWindow = { 0 };
+ setWindowSize(defaultWindow, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT);
#if BX_PLATFORM_EMSCRIPTEN
s_app = _app;
@@ -349,6 +353,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
entry::WindowHandle defaultWindow = { 0 };
entry::setWindowTitle(defaultWindow, bx::baseName(_argv[0]) );
+ setWindowSize(defaultWindow, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT);
int32_t result = ::_main_(_argc, _argv);
@@ -464,10 +469,10 @@ BX_PRAGMA_DIAGNOSTIC_POP();
case Event::Window:
break;
- case Event::Suspend:
- break;
+ case Event::Suspend:
+ break;
- default:
+ default:
break;
}
}
@@ -616,6 +621,9 @@ BX_PRAGMA_DIAGNOSTIC_POP();
}
break;
+ case Event::Suspend:
+ break;
+
default:
break;
}
diff --git a/3rdparty/bgfx/examples/common/entry/entry_osx.mm b/3rdparty/bgfx/examples/common/entry/entry_osx.mm
index 5b59fe06c84..14ddf60418a 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_osx.mm
+++ b/3rdparty/bgfx/examples/common/entry/entry_osx.mm
@@ -444,7 +444,7 @@ namespace entry
const float centerY = (screenRect.size.height - (float)ENTRY_DEFAULT_HEIGHT)*0.5f;
m_windowAlloc.alloc();
- NSRect rect = NSMakeRect(centerX, centerY, (float)ENTRY_DEFAULT_WIDTH, (float)ENTRY_DEFAULT_HEIGHT);
+ NSRect rect = NSMakeRect(centerX, centerY, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT);
NSWindow* window = [[NSWindow alloc]
initWithContentRect:rect
styleMask:m_style
diff --git a/3rdparty/bgfx/examples/common/entry/entry_x11.cpp b/3rdparty/bgfx/examples/common/entry/entry_x11.cpp
index 16b7af4ffa1..9dd0919cb14 100644
--- a/3rdparty/bgfx/examples/common/entry/entry_x11.cpp
+++ b/3rdparty/bgfx/examples/common/entry/entry_x11.cpp
@@ -316,7 +316,7 @@ namespace entry
m_window[0] = XCreateWindow(m_display
, m_root
, 0, 0
- , ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT, 0
+ , 1, 1, 0
, m_depth
, InputOutput
, m_visual
@@ -362,7 +362,7 @@ namespace entry
thread.init(mte.threadFunc, &mte);
WindowHandle defaultWindow = { 0 };
- m_eventQueue.postSizeEvent(defaultWindow, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT);
+ m_eventQueue.postSizeEvent(defaultWindow, 1, 1);
s_joystick.init();
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/ocornut_imgui.cpp b/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp
index 8efddcc65f8..7c49ec06ea2 100644
--- a/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp
+++ b/3rdparty/bgfx/examples/common/imgui/ocornut_imgui.cpp
@@ -57,7 +57,7 @@ public:
#endif // USE_ENTRY
}
- virtual ~PlatformWindow() BX_OVERRIDE
+ virtual ~PlatformWindow()
{
}
@@ -197,7 +197,7 @@ public:
{
}
- virtual ~WindowManager() BX_OVERRIDE
+ virtual ~WindowManager()
{
}
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 263c1b31b94..5891dc546e2 100644
--- a/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp
+++ b/3rdparty/bgfx/examples/common/nanovg/nanovg_bgfx.cpp
@@ -251,7 +251,7 @@ namespace
vs_nanovg_fill = bgfx::makeRef(vs_nanovg_fill_mtl, sizeof(vs_nanovg_fill_mtl) );
fs_nanovg_fill = bgfx::makeRef(fs_nanovg_fill_mtl, sizeof(fs_nanovg_fill_mtl) );
break;
-
+
default:
vs_nanovg_fill = bgfx::makeRef(vs_nanovg_fill_glsl, sizeof(vs_nanovg_fill_glsl) );
fs_nanovg_fill = bgfx::makeRef(fs_nanovg_fill_glsl, sizeof(fs_nanovg_fill_glsl) );
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/runtime/meshes/bunny.bin b/3rdparty/bgfx/examples/runtime/meshes/bunny.bin
index 202927eb20c..b34244a745d 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/bunny.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/bunny.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/bunny_decimated.bin b/3rdparty/bgfx/examples/runtime/meshes/bunny_decimated.bin
index d1adad383f5..d2f2f07e3f6 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/bunny_decimated.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/bunny_decimated.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/bunny_patched.bin b/3rdparty/bgfx/examples/runtime/meshes/bunny_patched.bin
index 33f79a93a8e..217bffeb5ab 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/bunny_patched.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/bunny_patched.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/column.bin b/3rdparty/bgfx/examples/runtime/meshes/column.bin
index 1a295c0b0ba..2d1d1dc5dd3 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/column.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/column.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/cube.bin b/3rdparty/bgfx/examples/runtime/meshes/cube.bin
index 9395fc6a3f6..874c9408e58 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/cube.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/cube.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin b/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin
index 5b93992a965..69a4a38c125 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/hollowcube.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/platform.bin b/3rdparty/bgfx/examples/runtime/meshes/platform.bin
index de63c2457b8..27b604341e2 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/platform.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/platform.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree.bin b/3rdparty/bgfx/examples/runtime/meshes/tree.bin
index cc3170efc15..6daa0cef736 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/tree.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/tree.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_1.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_1.bin
index fc4b18b3c6f..dcce8a7aaa4 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_1.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_1.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_2.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_2.bin
index 19658b28b1d..c7cdb1dd67b 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_2.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod0_2.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_1.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_1.bin
index e775c77e3c7..d27ea1f0e45 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_1.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_1.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_2.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_2.bin
index a5a28b74a78..08d57375fc2 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_2.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod1_2.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_1.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_1.bin
index 9ba1f45d3f2..4b8d4b7d275 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_1.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_1.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_2.bin b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_2.bin
index 2f046b506de..821151e0d9d 100644
--- a/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_2.bin
+++ b/3rdparty/bgfx/examples/runtime/meshes/tree1b_lod2_2.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_blit.bin
index 3cb4d722e14..77b88f46d8d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_blit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_blit.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_separate_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_separate_blit.bin
index faf0106bb12..4515d187d73 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_separate_blit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_oit_wb_separate_blit.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_particle.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_particle.bin
index 0b6b5ca926c..e9ac1a71c49 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_particle.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_particle.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm.bin
index 9adc52e608c..e599c4ec016 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_csm.bin
index 6af5d39a43c..c2ac4161f46 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear.bin
index 327fec56972..acb5c01247e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_csm.bin
index 611a3aaa90a..3430e96d811 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_omni.bin
index 175b7f1d951..6c4859be087 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_omni.bin
index bc3e865aa95..95467349adc 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_esm_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard.bin
index 765fcc0d729..d1612f8ca11 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_csm.bin
index c39380b7869..f6b2ac6587d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear.bin
index 276ccbeddcd..52ac4285db6 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_csm.bin
index e4004b021c3..221a4278dd8 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_omni.bin
index a77a1d2a787..03b37762125 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_omni.bin
index 25b5e800b19..11f1c23b014 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_hard_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf.bin
index 5930f492b42..19d9bba4d4a 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_csm.bin
index 58a4434cfdd..9581dddcd64 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear.bin
index 63ce03cee0f..8746b286f44 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
index f3e7b7f82af..9957e3b8588 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
index 4654cf33e9b..3c72697a9d3 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_omni.bin
index a1369295751..834b235eebe 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_pcf_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm.bin
index 75de94d5d7e..0ae83c419f1 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_csm.bin
index 4b99893b6be..87536cda4d4 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear.bin
index 96745e909fe..5129fdb6b0b 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
index 32e7e3b55f9..08a5970da44 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
index 7e22436b4ef..39d3bff0226 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_omni.bin
index 8bf0df91f13..0991b66851f 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_lightning_vsm_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_texture.bin
index c2e9abff4f3..91b9ec7b7a1 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_color_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur.bin
index 50abe5a34e9..29c825647fb 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur_vsm.bin
index 2bb9efb6c8b..31537c44f98 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_hblur_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_texture.bin
index c40ab8f0508..3406a9c63ce 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth.bin
index 9f0ee665dd8..490815ca33b 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth_vsm.bin
index c9d2106ab65..84c229fdd9e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_unpackdepth_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur.bin
index 50abe5a34e9..29c825647fb 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur_vsm.bin
index 2bb9efb6c8b..31537c44f98 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_shadowmaps_vblur_vsm.bin
Binary files differ
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 32fa218efb4..4207c645f2f 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh.bin
Binary files differ
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 00d1f8a4a6a..5f675f24a27 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh_pd.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_sms_mesh_pd.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_stencil_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_stencil_texture_lightning.bin
index e7405f58ad5..05648ed06ea 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_stencil_texture_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_stencil_texture_lightning.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_tree.bin
index 018b83c8ea1..9b7564ecfd5 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_tree.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx11/fs_tree.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_bump.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_bump.bin
index a074cd8a3e2..2cc6dbea34d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_bump.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_bump.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_callback.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_callback.bin
index 57876856254..9dadf5e9261 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_callback.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_callback.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_cubes.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_cubes.bin
index bdffeb9c076..5bfd5497f0b 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_cubes.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_cubes.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_combine.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_combine.bin
index cc13a509ba8..fc355b76371 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_combine.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_combine.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug.bin
index 4cac33773e7..33a85bb2955 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug.bin
Binary files differ
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 bdffeb9c076..5bfd5497f0b 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug_line.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_debug_line.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_geom.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_geom.bin
index c8cbf705ea2..f9f1020c1e6 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_geom.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_geom.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_light.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_light.bin
index 5c16613bad5..78cbbc32f25 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_light.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_deferred_light.bin
Binary files differ
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 f426518b036..4d331a3cab1 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_blur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_blur.bin
Binary files differ
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 38c67736508..1670d6734f8 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_bright.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_bright.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lum.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lum.bin
index f2be253e8b7..e5ca082614c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lum.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lum.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lumavg.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lumavg.bin
index 0fe106a0adb..b73df0e1d7f 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lumavg.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_lumavg.bin
Binary files differ
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 7c2c50723bd..7553b3acc94 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_mesh.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_mesh.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_skybox.bin
index 0598ce6cc4f..d02ad5de9e4 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_skybox.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_skybox.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_tonemap.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_tonemap.bin
index f9c5bdf5f56..993845cb75b 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_tonemap.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_hdr_tonemap.bin
Binary files differ
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 873b11cf560..3a3ecaba313 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_mesh.bin
Binary files differ
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 a68ed6cf51d..2e49131b0a3 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_skybox.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_ibl_skybox.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_instancing.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_instancing.bin
index bdffeb9c076..5bfd5497f0b 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_instancing.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_instancing.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_mesh.bin
index 09e8453a1d6..ac5cc0d0512 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_mesh.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_mesh.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit.bin
index 38475da682f..05269c3a821 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit.bin
Binary files differ
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 b041df0bda7..29c0b1608bd 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb.bin
Binary files differ
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 c51c81e1b96..b209ea65d9d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_blit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_blit.bin
Binary files differ
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 332cd07bc4a..4c5d7f1b374 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.bin
index c1f188e8370..ff4c6e01b17 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_particle.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_particle.bin
index c52033f7e3b..c20337adffc 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_particle.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_particle.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_raymarching.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_raymarching.bin
index d3cd94464fb..64a2ea353d2 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_raymarching.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_raymarching.bin
Binary files differ
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 1759b12105b..b48ca9a9d75 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_black.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_black.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm.bin
index 0ebc05de809..99f5564ce4d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_csm.bin
index ae8d997d040..420080db2fd 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear.bin
index 06d600bc563..2b80ccad6c3 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_csm.bin
index c797f9d359a..3bbfea99ae7 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_omni.bin
index 83a7200e42b..c9d81f6fa64 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_omni.bin
index 30a32b876fb..308f93ef2e3 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_esm_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard.bin
index 8d671384108..3de4dcbce87 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_csm.bin
index 7550ab771be..c53e8814a34 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear.bin
index c1837a5cc7f..d29c6e8c1ed 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_csm.bin
index 2f7a8e6a477..ca069354ca4 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_omni.bin
index b20f27e5f50..c316724a908 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_omni.bin
index 285976d1c62..bef6549d95b 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_hard_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf.bin
index 008536682f4..55bce42f02a 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_csm.bin
index aedb20eb619..7427157c5fa 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear.bin
index 57c763439b5..a8c173e3c39 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
index 1ba9fc72be1..984458101ee 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
index 66abdeb2efd..e96824aae10 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_omni.bin
index 2a2d3b3481e..bf00e8523f3 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_pcf_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm.bin
index 7e8b0bdc566..ac96c99da43 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_csm.bin
index f3a1ecd2586..0e69a3950ac 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear.bin
index d6a5555fd04..a1ce662b545 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
index 1e355c21a89..80befb85a01 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
index 50b94e1c5cf..f0bdfd66f7b 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_omni.bin
index 5e82a73b20f..856c659ffe6 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_lightning_vsm_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.bin
index 816e771389e..769c938165e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur.bin
index 0014266fb98..35f6b45a29d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.bin
index 088921490a0..4a9dd81714e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth.bin
index 4a693345ca4..605ede3bb29 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth.bin
Binary files differ
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 1c98ebebaa9..e73a81647e3 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.bin
Binary files differ
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 f146f09bfc0..227ada1b7b9 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.bin
Binary files differ
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 89745b960ce..a83254c5e89 100644
--- 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
Binary files differ
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 c8d44342e49..33a85bb2955 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_texture.bin
Binary files differ
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 bab1a305755..6fa413cd90c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth.bin
Binary files differ
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 55c5f9e10ca..23cba5789f1 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur.bin
index 0014266fb98..35f6b45a29d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.bin
index 088921490a0..4a9dd81714e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_lightning.bin
index d2b3c50f5ec..3502c300df9 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_lightning.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.bin
index 3b34c1191f9..769c938165e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.bin
index f35fe6e1dfd..7528dcbf854 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.bin
Binary files differ
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 57089f27fe2..e240cc56e5f 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.bin
Binary files differ
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 49110e0ed14..19ca642da9a 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex1.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex1.bin
Binary files differ
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 7752be6658d..e4fa04e2975 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.bin
Binary files differ
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 b201b42a274..a3163370c84 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.bin
Binary files differ
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 57089f27fe2..e240cc56e5f 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.bin
Binary files differ
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 49110e0ed14..19ca642da9a 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex1.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex1.bin
Binary files differ
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 7752be6658d..e4fa04e2975 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.bin
Binary files differ
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 4ba5d987404..29eab256097 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svside.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svside.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.bin
index 95a432fd6e7..3b5a8f31a62 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.bin
Binary files differ
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 6e349468748..40f240d9f77 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.bin
Binary files differ
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 a299cf2199c..fe9b49ff047 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidetex.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_svsidetex.bin
Binary files differ
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 4cac33773e7..33a85bb2955 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture_lightning.bin
index 216041c92be..1c09e0732be 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_shadowvolume_texture_lightning.bin
Binary files differ
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 402646e293d..c5373130f6f 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh_pd.bin
index fe0dadd74f8..e244ed7a481 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh_pd.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_mesh_pd.bin
Binary files differ
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 1759b12105b..b48ca9a9d75 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow.bin
Binary files differ
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 5c8c5a455f5..d4454c07a1f 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow_pd.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_sms_shadow_pd.bin
Binary files differ
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 1759b12105b..b48ca9a9d75 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_black.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_black.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_lightning.bin
index 812a7288250..c11e9833063 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_lightning.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_texture.bin
index 3b34c1191f9..769c938165e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_color_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture.bin
index 4cac33773e7..33a85bb2955 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture_lightning.bin
index dfa60bab5a3..c2d78611cd0 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_stencil_texture_lightning.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_tree.bin
index ddc984405d1..f2e470f0574 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_tree.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_tree.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update.bin
index 9b583ab3ef4..c67c50a41d1 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update.bin
Binary files differ
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 abc86d23a09..d489147527a 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_3d.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_3d.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_cmp.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_cmp.bin
index 97e41b8eee1..77ee54087de 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_cmp.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_update_cmp.bin
Binary files differ
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 8793fcf84de..2ca54ab6730 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blit.bin
Binary files differ
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 905e8dd5d7a..f6316a80f0e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_blur.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_fb.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_fb.bin
index 8b22edabe2b..c3e8cd2f156 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_fb.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/fs_vectordisplay_fb.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump.bin
index ae10af6fa40..4c80f4cad6d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump.bin
Binary files differ
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 19f743864cb..fc28518a841 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump_instanced.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_bump_instanced.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_callback.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_callback.bin
index 5b24007c6dc..91c7a717fe5 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_callback.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_callback.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_cubes.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_cubes.bin
index 6bed4a49eb9..fcfb16e0d0d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_cubes.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_cubes.bin
Binary files differ
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 a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_combine.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_combine.bin
Binary files differ
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 a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug.bin
Binary files differ
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 6bed4a49eb9..fcfb16e0d0d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug_line.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_debug_line.bin
Binary files differ
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 ae10af6fa40..4c80f4cad6d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_geom.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_geom.bin
Binary files differ
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 a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_light.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_deferred_light.bin
Binary files differ
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 aafc58d61d7..db3143a6259 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_blur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_blur.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_bright.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_bright.bin
index a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_bright.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_bright.bin
Binary files differ
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 a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lum.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lum.bin
Binary files differ
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 a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lumavg.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_lumavg.bin
Binary files differ
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 f8a154140aa..7bafd238112 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_mesh.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_mesh.bin
Binary files differ
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 a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_skybox.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_skybox.bin
Binary files differ
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 c1734e3e3fc..56f1ecb2e44 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_tonemap.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_hdr_tonemap.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_mesh.bin
index a4e8c3d11e9..4218e8ab377 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_mesh.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_mesh.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin
index 92fb53dd59b..c0e84000a3a 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_ibl_skybox.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_instancing.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_instancing.bin
index 9cc463534d9..1334941f88a 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_instancing.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_instancing.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_mesh.bin
index 62f5bd31dae..242f27e7b1f 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_mesh.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_mesh.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit.bin
index 0bd10c7a53f..9f612d35860 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit.bin
Binary files differ
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 a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit_blit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_oit_blit.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_particle.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_particle.bin
index fa1d3b9a442..d727140eef3 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_particle.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_particle.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_raymarching.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_raymarching.bin
index 63ec02a3531..9db127f1b78 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_raymarching.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_raymarching.bin
Binary files differ
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 4550c08d137..63a27d6a014 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning.bin
index 93a692801b5..afd241b6c2e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_csm.bin
index 6b819879e75..5b190835b30 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear.bin
index 3bc8a261ee5..4953a46cb26 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_csm.bin
index 9e7c86f7bb1..3fe61829886 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_omni.bin
index 2c6c09c36c8..fb516014651 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_omni.bin
index 7a0105a308d..37de03aa63e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_lightning_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.bin
index a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.bin
Binary files differ
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 4550c08d137..63a27d6a014 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_depth.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_depth.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_hblur.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_hblur.bin
index 17606423b6c..056267dd34d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_hblur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_hblur.bin
Binary files differ
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 3e5827745c0..46332ef6918 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth.bin
Binary files differ
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 329980ae388..0d28593e06a 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_packdepth_linear.bin
Binary files differ
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 a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture_lightning.bin
index a04a6320173..96799c4e15d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_texture_lightning.bin
Binary files differ
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 a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.bin
Binary files differ
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 347b4ed021b..c2695fe4a16 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_vblur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowmaps_vblur.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_lightning.bin
index f948ab9105f..305be162e1d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_lightning.bin
Binary files differ
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 a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_color_texture.bin
Binary files differ
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 ff9efe36483..5875aa635d7 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svback.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svback.bin
Binary files differ
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 4550c08d137..63a27d6a014 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svfront.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svfront.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svside.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svside.bin
index 7571a1e53fa..2b3dd0ebae0 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svside.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_svside.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture.bin
index a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture_lightning.bin
index e632b911c39..c97d58d5a67 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_shadowvolume_texture_lightning.bin
Binary files differ
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 f5b0d896104..d33c32f16d0 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_mesh.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_mesh.bin
Binary files differ
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 4550c08d137..63a27d6a014 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow_pd.bin
index 3bd185477f5..94b26f0a41d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow_pd.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_sms_shadow_pd.bin
Binary files differ
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 4550c08d137..63a27d6a014 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_lightning.bin
index bedf096177e..0c0fe9fffee 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_lightning.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_texture.bin
index a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_color_texture.bin
Binary files differ
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 a299604962c..fe8592c138d 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture_lightning.bin
index 7257af2e87f..fcdfc2e180c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_stencil_texture_lightning.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_tree.bin
index 9e69b0bb4a4..71f4167608c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_tree.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_tree.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_update.bin b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_update.bin
index 1c043f0ad5c..155eea03f6c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_update.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_update.bin
Binary files differ
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 63ec02a3531..9db127f1b78 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_vectordisplay_fb.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/dx9/vs_vectordisplay_fb.bin
Binary files differ
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 e594526cf19..df53debb5b1 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_blit.bin
index cd2a8d201c4..4de4a7d474c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_blit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_blit.bin
Binary files differ
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 51ae8f2dbaf..2ae88a47fff 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate_blit.bin
index ca62c6e3ff5..e85ddbedf34 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate_blit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_oit_wb_separate_blit.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm.bin
index 0a7b4118d9e..700694d399e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_csm.bin
index 7316f095fa3..525a27cdd51 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear.bin
index 01131f3d85c..04c38666671 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_csm.bin
index 5f342ec396a..27d8231f863 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_omni.bin
index 0a1677885b1..4ca43066c34 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_omni.bin
index a9c0f3f7234..4b3fea74139 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_esm_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard.bin
index 384fe08e17f..7c5095f0e29 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_csm.bin
index ad36fa13de6..b77c2c824c4 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear.bin
index 5f75eb78748..3988caee216 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_csm.bin
index d8b2e73926a..9a8ae99224e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_omni.bin
index 18389d52061..1965c493afa 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_omni.bin
index 101c938ca7b..31b8e22ba35 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_hard_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf.bin
index 1c77fb06cde..c867113fd8c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_csm.bin
index acdaba7a85c..c78a27741db 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear.bin
index 2e3c8032449..85cebb56f07 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
index 555297a60d7..93c5b80ef33 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
index 5ec150317bb..4769169ac7f 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_omni.bin
index ff27f69318f..18a43e1ea27 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_pcf_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm.bin
index 372c9106da3..f42d12496d6 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_csm.bin
index b53921656e7..50e5c4f14cb 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear.bin
index 6d0b631bcdf..3e96ec50a4c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
index 8b778ad84fd..df85bd9510c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
index 7c496d2d736..2d63ad15e45 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_omni.bin
index 0496f530f14..772ec28f6ed 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_lightning_vsm_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_texture.bin
index 885640dda0a..d843710a8b0 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_color_texture.bin
Binary files differ
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 e635da9c9bc..d8509532b15 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur_vsm.bin
index 8cd91a899a9..cde87278282 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_hblur_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth.bin
index d6bdeb0b6c9..3997cd62a98 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth.bin
Binary files differ
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 c1c6b516290..a366ac46963 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_packdepth_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_texture.bin
index f021c850793..18195420f57 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_texture.bin
Binary files differ
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 b963ccfd100..0fd472eda28 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth_vsm.bin
index fac7a851ad1..5044da1a692 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_unpackdepth_vsm.bin
Binary files differ
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 e635da9c9bc..d8509532b15 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur_vsm.bin
index 8cd91a899a9..cde87278282 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_shadowmaps_vblur_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh.bin
index fe1fee41cb6..b9f060dbd20 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh_pd.bin
index 7ba659fb8ff..5844d74493e 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh_pd.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_mesh_pd.bin
Binary files differ
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 d6bdeb0b6c9..3997cd62a98 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow_pd.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_sms_shadow_pd.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_stencil_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_stencil_texture_lightning.bin
index 7e823c40ea9..3ceba55ea2f 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_stencil_texture_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_stencil_texture_lightning.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_tree.bin
index 2bd2dbc1229..d9398b15c40 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/gles/fs_tree.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/gles/fs_tree.bin
Binary files differ
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 32f69e5aed2..1bfc2361d5c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_blit.bin
index 998144e1b45..f7552195b08 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_blit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_blit.bin
Binary files differ
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 d77b34792fa..f8ae5bc9b81 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate_blit.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate_blit.bin
index 31fe76ab83d..5386f067f20 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate_blit.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_oit_wb_separate_blit.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm.bin
index c158fab0530..f5a580f1289 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_csm.bin
index 4c54039dd29..1e7a4d25acd 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear.bin
index afec490e51c..3c41f4ed3f7 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_csm.bin
index c8e67a6b134..b930d047c81 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_omni.bin
index ab2002f7cc2..5b5e123eaec 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_omni.bin
index f7b3944e05b..9e5441e5839 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_esm_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard.bin
index 911579fc0b5..62a4fab7411 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_csm.bin
index b9b683980c4..7ae79a1339c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear.bin
index 6d5d493fbc0..52a0b821316 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_csm.bin
index 3b1269cf028..08808de87a7 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_omni.bin
index 770c1297acd..3218ab5f3cc 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_omni.bin
index 6b06a2ccf35..0f8e094c7e9 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_hard_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf.bin
index ae8c23a6130..797ec0bcdbe 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_csm.bin
index d485d900014..c649bf07a24 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear.bin
index b635a6bf4f9..5f0c1c7c365 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
index 1f7ce109cfd..5b07162b001 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
index 5265cd5803c..34d5c091ce2 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_omni.bin
index 35f142f65ca..53f13abd5c8 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_pcf_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm.bin
index 4cbaeda75b1..3ba96599cd4 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_csm.bin
index 96d35c6b0b0..d1d4d641bdb 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear.bin
index 83d645a4088..5b675445db3 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_csm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
index 19971b517aa..cbcecf1feb4 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_csm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
index 800d24e1aa2..a2aeda4ead7 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_linear_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_omni.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_omni.bin
index eaf1d915411..fd9d3902609 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_omni.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_lightning_vsm_omni.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_texture.bin
index 08ec2bbf471..16e982ef81c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_color_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur.bin
index a4b099de0de..f1180dceb51 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur_vsm.bin
index a7eb99190dc..5a506e22099 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_hblur_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth.bin
index 6148b430945..960eba1e085 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth_linear.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth_linear.bin
index d59593b94a3..a592392cdd6 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth_linear.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_packdepth_linear.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_texture.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_texture.bin
index fafb0e9002a..d9bf2d2c4a0 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_texture.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_texture.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth.bin
index af6a2d0c727..acda8d5f64f 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth_vsm.bin
index 98435947567..2c61fc1cc22 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_unpackdepth_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur.bin
index a4b099de0de..f1180dceb51 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur_vsm.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur_vsm.bin
index a7eb99190dc..5a506e22099 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur_vsm.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_shadowmaps_vblur_vsm.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh.bin
index 31f9f2f4a79..e9b3d24ad35 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh_pd.bin
index e18e85fbbcb..a036a3a6254 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh_pd.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_mesh_pd.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow_pd.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow_pd.bin
index 6148b430945..960eba1e085 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow_pd.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_sms_shadow_pd.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_stencil_texture_lightning.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_stencil_texture_lightning.bin
index b9d80197e47..aa333ccb02c 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_stencil_texture_lightning.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_stencil_texture_lightning.bin
Binary files differ
diff --git a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_tree.bin b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_tree.bin
index 48d7ea940b3..6da14d14952 100644
--- a/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_tree.bin
+++ b/3rdparty/bgfx/examples/runtime/shaders/glsl/fs_tree.bin
Binary files differ
diff --git a/3rdparty/bgfx/include/bgfx/bgfx.h b/3rdparty/bgfx/include/bgfx/bgfx.h
index 524953228c3..64cd158c487 100644
--- a/3rdparty/bgfx/include/bgfx/bgfx.h
+++ b/3rdparty/bgfx/include/bgfx/bgfx.h
@@ -8,7 +8,7 @@
#include <stdarg.h> // va_list
#include <stdint.h> // uint32_t
-#include <stdlib.h> // size_t
+#include <stdlib.h> // NULL
#include <bgfx/bgfxdefines.h>
@@ -471,10 +471,10 @@ namespace bgfx
/// Supported texture formats.
/// - `BGFX_CAPS_FORMAT_TEXTURE_NONE` - not supported
- /// - `BGFX_CAPS_FORMAT_TEXTURE_COLOR` - supported
- /// - `BGFX_CAPS_FORMAT_TEXTURE_EMULATED` - emulated
+ /// - `BGFX_CAPS_FORMAT_TEXTURE_2D` - supported
+ /// - `BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED` - emulated
/// - `BGFX_CAPS_FORMAT_TEXTURE_VERTEX` - supported vertex texture
- uint8_t formats[TextureFormat::Count];
+ uint16_t formats[TextureFormat::Count];
};
/// Transient index buffer.
@@ -1394,8 +1394,33 @@ namespace bgfx
///
void updateTextureCube(TextureHandle _handle, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const Memory* _mem, uint16_t _pitch = UINT16_MAX);
+ /// Read back texture content.
+ ///
+ /// @param[in] _handle Texture handle.
+ /// @param[in] _data Destination buffer.
+ ///
+ /// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
+ /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
+ /// @attention C99 equivalent is `bgfx_read_texture`.
+ ///
+ void readTexture(TextureHandle _handle, void* _data);
+
+ /// Read back texture content.
+ ///
+ /// @param[in] _handle Frame buffer handle.
+ /// @param[in] _attachment Frame buffer attachment index.
+ /// @param[in] _data Destination buffer.
+ ///
+ /// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
+ /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
+ /// @attention C99 equivalent is `bgfx_read_texture`.
+ ///
+ void readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data);
+
/// Destroy texture.
///
+ /// @param[in] _handle Texture handle.
+ ///
/// @attention C99 equivalent is `bgfx_destroy_texture`.
///
void destroyTexture(TextureHandle _handle);
@@ -1442,7 +1467,7 @@ namespace bgfx
///
/// @attention C99 equivalent is `bgfx_create_frame_buffer_from_handles`.
///
- FrameBufferHandle createFrameBuffer(uint8_t _num, TextureHandle* _handles, bool _destroyTextures = false);
+ FrameBufferHandle createFrameBuffer(uint8_t _num, const TextureHandle* _handles, bool _destroyTextures = false);
/// Create frame buffer for multiple window rendering.
///
@@ -1563,6 +1588,9 @@ namespace bgfx
///
void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height);
+ ///
+ void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, BackbufferRatio::Enum _ratio);
+
/// Set view scissor. Draw primitive outside view will be clipped. When
/// _x, _y, _width and _height are set to 0, scissor will be disabled.
///
@@ -1660,6 +1688,14 @@ namespace bgfx
///
void setViewRemap(uint8_t _id = 0, uint8_t _num = UINT8_MAX, const void* _remap = NULL);
+ /// Reset all view settings to default.
+ ///
+ /// @param[in] _id View id.
+ ///
+ /// @attention C99 equivalent is `bgfx_reset_view`.
+ ///
+ void resetView(uint8_t _id);
+
/// Sets debug marker.
///
/// @attention C99 equivalent is `bgfx_set_marker`.
@@ -1892,7 +1928,7 @@ namespace bgfx
/// @param[in] _stage Texture unit.
/// @param[in] _sampler Program sampler.
/// @param[in] _handle Frame buffer handle.
- /// @param[in] _attachment Attachment index.
+ /// @param[in] _attachment Frame buffer attachment index.
/// @param[in] _flags Texture sampling mode. Default value UINT32_MAX uses
/// texture sampling settings from the texture.
/// - `BGFX_TEXTURE_[U/V/W]_[MIRROR/CLAMP]` - Mirror or clamp to edge wrap
@@ -2000,7 +2036,7 @@ namespace bgfx
/// @param[in] _stage Texture unit.
/// @param[in] _sampler Program sampler.
/// @param[in] _handle Frame buffer handle.
- /// @param[in] _attachment Attachment index.
+ /// @param[in] _attachment Frame buffer attachment index.
/// @param[in] _access Texture access. See `Access::Enum`.
/// @param[in] _format Texture format. See: `TextureFormat::Enum`.
///
@@ -2046,6 +2082,100 @@ namespace bgfx
///
void discard();
+ /// Blit texture 2D region between two 2D textures.
+ ///
+ /// @param[in] _id View id.
+ /// @param[in] _dst Destination texture handle.
+ /// @param[in] _dstX Destination texture X position.
+ /// @param[in] _dstY Destination texture Y position.
+ /// @param[in] _src Source texture handle.
+ /// @param[in] _srcX Source texture X position.
+ /// @param[in] _srcY Source texture Y position.
+ /// @param[in] _width Width of region.
+ /// @param[in] _height Height of region.
+ ///
+ /// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag.
+ /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
+ /// @attention C99 equivalent is `bgfx_blit`.
+ ///
+ void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX);
+
+ /// Blit texture 2D region between 2D frame buffer and 2D texture.
+ ///
+ /// @param[in] _id View id.
+ /// @param[in] _dst Destination texture handle.
+ /// @param[in] _dstX Destination texture X position.
+ /// @param[in] _dstY Destination texture Y position.
+ /// @param[in] _src Source frame buffer handle.
+ /// @param[in] _attachment Source frame buffer attachment index.
+ /// @param[in] _srcX Source texture X position.
+ /// @param[in] _srcY Source texture Y position.
+ /// @param[in] _width Width of region.
+ /// @param[in] _height Height of region.
+ ///
+ /// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag.
+ /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
+ /// @attention C99 equivalent is `bgfx_blit`.
+ ///
+ void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, FrameBufferHandle _src, uint8_t _attachment = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX);
+
+ /// Blit texture region between two textures.
+ ///
+ /// @param[in] _id View id.
+ /// @param[in] _dst Destination texture handle.
+ /// @param[in] _dstMip Destination texture mip level.
+ /// @param[in] _dstX Destination texture X position.
+ /// @param[in] _dstY Destination texture Y position.
+ /// @param[in] _dstZ If texture is 2D this argument should be 0. If destination texture is cube
+ /// this argument represent destination texture cube face. For 3D texture this argument
+ /// represent destination texture Z position.
+ /// @param[in] _src Source texture handle.
+ /// @param[in] _srcMip Source texture mip level.
+ /// @param[in] _srcX Source texture X position.
+ /// @param[in] _srcY Source texture Y position.
+ /// @param[in] _srcZ If texture is 2D this argument should be 0. If source texture is cube
+ /// this argument represent source texture cube face. For 3D texture this argument
+ /// represent source texture Z position.
+ /// @param[in] _width Width of region.
+ /// @param[in] _height Height of region.
+ /// @param[in] _depth If texture is 3D this argument represent depth of region, otherwise is
+ /// unused.
+ ///
+ /// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag.
+ /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
+ /// @attention C99 equivalent is `bgfx_blit`.
+ ///
+ void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _srcZ = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX, uint16_t _depth = UINT16_MAX);
+
+ /// Blit texture region between frame buffer and texture.
+ ///
+ /// @param[in] _id View id.
+ /// @param[in] _dst Destination texture handle.
+ /// @param[in] _dstMip Destination texture mip level.
+ /// @param[in] _dstX Destination texture X position.
+ /// @param[in] _dstY Destination texture Y position.
+ /// @param[in] _dstZ If texture is 2D this argument should be 0. If destination texture is cube
+ /// this argument represent destination texture cube face. For 3D texture this argument
+ /// represent destination texture Z position.
+ /// @param[in] _src Source frame buffer handle.
+ /// @param[in] _attachment Source frame buffer attachment index.
+ /// @param[in] _srcMip Source texture mip level.
+ /// @param[in] _srcX Source texture X position.
+ /// @param[in] _srcY Source texture Y position.
+ /// @param[in] _srcZ If texture is 2D this argument should be 0. If source texture is cube
+ /// this argument represent source texture cube face. For 3D texture this argument
+ /// represent source texture Z position.
+ /// @param[in] _width Width of region.
+ /// @param[in] _height Height of region.
+ /// @param[in] _depth If texture is 3D this argument represent depth of region, otherwise is
+ /// unused.
+ ///
+ /// @attention Destination texture must be create with `BGFX_TEXTURE_BLIT_DST` flag.
+ /// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
+ /// @attention C99 equivalent is `bgfx_blit`.
+ ///
+ void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, FrameBufferHandle _src, uint8_t _attachment = 0, uint8_t _srcMip = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _srcZ = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX, uint16_t _depth = UINT16_MAX);
+
/// Request screen shot.
///
/// @param[in] _filePath Will be passed to `bgfx::CallbackI::screenShot` callback.
diff --git a/3rdparty/bgfx/include/bgfx/bgfxdefines.h b/3rdparty/bgfx/include/bgfx/bgfxdefines.h
index b239be1cf88..5ca5e7d02c1 100644
--- a/3rdparty/bgfx/include/bgfx/bgfxdefines.h
+++ b/3rdparty/bgfx/include/bgfx/bgfxdefines.h
@@ -310,6 +310,8 @@
#define BGFX_TEXTURE_COMPARE_MASK UINT32_C(0x000f0000) //!<
#define BGFX_TEXTURE_COMPUTE_WRITE UINT32_C(0x00100000) //!<
#define BGFX_TEXTURE_SRGB UINT32_C(0x00200000) //!<
+#define BGFX_TEXTURE_BLIT_DST UINT32_C(0x00400000) //!<
+#define BGFX_TEXTURE_READ_BACK UINT32_C(0x00800000) //!<
#define BGFX_TEXTURE_BORDER_COLOR_SHIFT 24 //!<
#define BGFX_TEXTURE_BORDER_COLOR_MASK UINT32_C(0x0f000000) //!<
#define BGFX_TEXTURE_RESERVED_SHIFT 28 //!<
@@ -366,17 +368,25 @@
#define BGFX_CAPS_INDEX32 UINT64_C(0x0000000000002000) //!< 32-bit indices are supported.
#define BGFX_CAPS_DRAW_INDIRECT UINT64_C(0x0000000000004000) //!< Draw indirect is supported.
#define BGFX_CAPS_HIDPI UINT64_C(0x0000000000008000) //!< HiDPI rendering is supported.
+#define BGFX_CAPS_TEXTURE_BLIT UINT64_C(0x0000000000010000) //!< Texture blit is supported.
+#define BGFX_CAPS_TEXTURE_READ_BACK UINT64_C(0x0000000000020000) //!< Read-back texture is supported.
///
-#define BGFX_CAPS_FORMAT_TEXTURE_NONE UINT8_C(0x00) //!< Texture format is not supported.
-#define BGFX_CAPS_FORMAT_TEXTURE_COLOR UINT8_C(0x01) //!< Texture format is supported.
-#define BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB UINT8_C(0x02) //!< Texture as sRGB format is supported.
-#define BGFX_CAPS_FORMAT_TEXTURE_EMULATED UINT8_C(0x04) //!< Texture format is emulated.
-#define BGFX_CAPS_FORMAT_TEXTURE_VERTEX UINT8_C(0x08) //!< Texture format can be used from vertex shader.
-#define BGFX_CAPS_FORMAT_TEXTURE_IMAGE UINT8_C(0x10) //!< Texture format can be used as image from compute shader.
-#define BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER UINT8_C(0x20) //!< Texture format can be used as frame buffer.
-#define BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA UINT8_C(0x40) //!< Texture format can be used as MSAA frame buffer.
-#define BGFX_CAPS_FORMAT_TEXTURE_MSAA UINT8_C(0x80) //!< Texture can be sampled as MSAA.
+#define BGFX_CAPS_FORMAT_TEXTURE_NONE UINT16_C(0x0000) //!< Texture format is not supported.
+#define BGFX_CAPS_FORMAT_TEXTURE_2D UINT16_C(0x0001) //!< Texture format is supported.
+#define BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB UINT16_C(0x0002) //!< Texture as sRGB format is supported.
+#define BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED UINT16_C(0x0004) //!< Texture format is emulated.
+#define BGFX_CAPS_FORMAT_TEXTURE_3D UINT16_C(0x0008) //!< Texture format is supported.
+#define BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB UINT16_C(0x0010) //!< Texture as sRGB format is supported.
+#define BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED UINT16_C(0x0020) //!< Texture format is emulated.
+#define BGFX_CAPS_FORMAT_TEXTURE_CUBE UINT16_C(0x0040) //!< Texture format is supported.
+#define BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB UINT16_C(0x0080) //!< Texture as sRGB format is supported.
+#define BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED UINT16_C(0x0100) //!< Texture format is emulated.
+#define BGFX_CAPS_FORMAT_TEXTURE_VERTEX UINT16_C(0x0200) //!< Texture format can be used from vertex shader.
+#define BGFX_CAPS_FORMAT_TEXTURE_IMAGE UINT16_C(0x0400) //!< Texture format can be used as image from compute shader.
+#define BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER UINT16_C(0x0800) //!< Texture format can be used as frame buffer.
+#define BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA UINT16_C(0x1000) //!< Texture format can be used as MSAA frame buffer.
+#define BGFX_CAPS_FORMAT_TEXTURE_MSAA UINT16_C(0x2000) //!< Texture can be sampled as MSAA.
///
#define BGFX_VIEW_NONE UINT8_C(0x00) //!<
diff --git a/3rdparty/bgfx/include/bgfx/c99/bgfx.h b/3rdparty/bgfx/include/bgfx/c99/bgfx.h
index b7aeecda3e7..534c13f1f50 100644
--- a/3rdparty/bgfx/include/bgfx/c99/bgfx.h
+++ b/3rdparty/bgfx/include/bgfx/c99/bgfx.h
@@ -337,7 +337,7 @@ typedef struct bgfx_caps
uint16_t deviceId;
bgfx_caps_gpu_t gpu[4];
- uint8_t formats[BGFX_TEXTURE_FORMAT_COUNT];
+ uint16_t formats[BGFX_TEXTURE_FORMAT_COUNT];
} bgfx_caps_t;
@@ -624,7 +624,7 @@ BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer(uint16_t _width,
BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_scaled(bgfx_backbuffer_ratio_t _ratio, bgfx_texture_format_t _format, uint32_t _textureFlags);
/**/
-BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(uint8_t _num, bgfx_texture_handle_t* _handles, bool _destroyTextures);
+BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(uint8_t _num, const bgfx_texture_handle_t* _handles, bool _destroyTextures);
/**/
BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_nwh(void* _nwh, uint16_t _width, uint16_t _height, bgfx_texture_format_t _depthFormat);
@@ -771,6 +771,9 @@ BGFX_C_API uint32_t bgfx_dispatch_indirect(uint8_t _id, bgfx_program_handle_t _h
BGFX_C_API void bgfx_discard();
/**/
+BGFX_C_API void bgfx_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);
+
+/**/
BGFX_C_API void bgfx_save_screen_shot(const char* _filePath);
#endif // BGFX_C99_H_HEADER_GUARD
diff --git a/3rdparty/bgfx/scripts/bgfx.lua b/3rdparty/bgfx/scripts/bgfx.lua
index c9658d35f84..a946155bdc8 100644
--- a/3rdparty/bgfx/scripts/bgfx.lua
+++ b/3rdparty/bgfx/scripts/bgfx.lua
@@ -81,8 +81,11 @@ function bgfxProject(_name, _kind, _defines)
}
configuration { "osx" }
- links {
- "Cocoa.framework",
+ linkoptions {
+ "-framework Cocoa",
+ "-framework Metal",
+ "-framework QuartzCore",
+ "-framework OpenGL",
}
configuration { "not nacl" }
@@ -129,7 +132,7 @@ function bgfxProject(_name, _kind, _defines)
path.join(BGFX_DIR, "src/vertexdecl.cpp"),
}
- configuration { "xcode4 or osx or ios*" }
+ configuration { "xcode* or osx or ios*" }
files {
path.join(BGFX_DIR, "src/amalgamated.mm"),
}
@@ -144,7 +147,7 @@ function bgfxProject(_name, _kind, _defines)
configuration {}
else
- configuration { "xcode4 or osx or ios*" }
+ configuration { "xcode* or osx or ios*" }
files {
path.join(BGFX_DIR, "src/glcontext_eagl.mm"),
path.join(BGFX_DIR, "src/glcontext_nsgl.mm"),
diff --git a/3rdparty/bgfx/src/bgfx.cpp b/3rdparty/bgfx/src/bgfx.cpp
index 279fd7564c0..51b52b03720 100644
--- a/3rdparty/bgfx/src/bgfx.cpp
+++ b/3rdparty/bgfx/src/bgfx.cpp
@@ -852,6 +852,31 @@ namespace bgfx
return m_num;
}
+ void Frame::blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth)
+ {
+ uint16_t item = m_numBlitItems++;
+
+ BlitItem& bi = m_blitItem[item];
+ bi.m_srcX = _srcX;
+ bi.m_srcY = _srcY;
+ bi.m_srcZ = _srcZ;
+ bi.m_dstX = _dstX;
+ bi.m_dstY = _dstY;
+ bi.m_dstZ = _dstZ;
+ bi.m_width = _width;
+ bi.m_height = _height;
+ bi.m_depth = _depth;
+ bi.m_srcMip = _srcMip;
+ bi.m_dstMip = _dstMip;
+ bi.m_src = _src;
+ bi.m_dst = _dst;
+
+ BlitKey key;
+ key.m_view = _id;
+ key.m_item = item;
+ m_blitKeys[item] = key.encode();
+ }
+
void Frame::sort()
{
for (uint32_t ii = 0, num = m_num; ii < num; ++ii)
@@ -859,6 +884,12 @@ namespace bgfx
m_sortKeys[ii] = SortKey::remapView(m_sortKeys[ii], m_viewRemap);
}
bx::radixSort64(m_sortKeys, s_ctx->m_tempKeys, m_sortValues, s_ctx->m_tempValues, m_num);
+
+ for (uint32_t ii = 0, num = m_num; ii < num; ++ii)
+ {
+ m_blitKeys[ii] = BlitKey::remapView(m_blitKeys[ii], m_viewRemap);
+ }
+ bx::radixSort32(m_blitKeys, (uint32_t*)&s_ctx->m_tempKeys, m_numBlitItems);
}
RenderFrame::Enum renderFrame()
@@ -946,6 +977,8 @@ namespace bgfx
CAPS_FLAGS(BGFX_CAPS_INDEX32),
CAPS_FLAGS(BGFX_CAPS_DRAW_INDIRECT),
CAPS_FLAGS(BGFX_CAPS_HIDPI),
+ CAPS_FLAGS(BGFX_CAPS_TEXTURE_BLIT),
+ CAPS_FLAGS(BGFX_CAPS_TEXTURE_READ_BACK),
#undef CAPS_FLAGS
};
@@ -965,23 +998,31 @@ namespace bgfx
}
BX_TRACE("Supported texture formats:");
- BX_TRACE("\t +----------- x = supported / * = emulated");
- BX_TRACE("\t |+---------- sRGB format");
- BX_TRACE("\t ||+--------- vertex format");
- BX_TRACE("\t |||+-------- image");
- BX_TRACE("\t ||||+------- framebuffer");
- BX_TRACE("\t |||||+------ MSAA framebuffer");
- BX_TRACE("\t ||||||+----- MSAA texture");
- BX_TRACE("\t ||||||| +-- name");
+ BX_TRACE("\t +--------------- 2D: x = supported / * = emulated");
+ BX_TRACE("\t |+-------------- 2D: sRGB format");
+ BX_TRACE("\t ||+------------- 3D: x = supported / * = emulated");
+ BX_TRACE("\t |||+------------ 3D: sRGB format");
+ BX_TRACE("\t ||||+----------- Cube: x = supported / * = emulated");
+ BX_TRACE("\t |||||+---------- Cube: sRGB format");
+ BX_TRACE("\t ||||||+--------- vertex format");
+ BX_TRACE("\t |||||||+-------- image");
+ BX_TRACE("\t ||||||||+------- framebuffer");
+ BX_TRACE("\t |||||||||+------ MSAA framebuffer");
+ BX_TRACE("\t ||||||||||+----- MSAA texture");
+ BX_TRACE("\t ||||||||||| +-- name");
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
{
if (TextureFormat::Unknown != ii
&& TextureFormat::UnknownDepth != ii)
{
- uint8_t flags = g_caps.formats[ii];
- BX_TRACE("\t[%c%c%c%c%c%c%c] %s"
- , flags&BGFX_CAPS_FORMAT_TEXTURE_COLOR ? 'x' : flags&BGFX_CAPS_FORMAT_TEXTURE_EMULATED ? '*' : ' '
- , flags&BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB ? 'l' : ' '
+ uint16_t flags = g_caps.formats[ii];
+ BX_TRACE("\t[%c%c%c%c%c%c%c%c%c%c%c] %s"
+ , flags&BGFX_CAPS_FORMAT_TEXTURE_2D ? 'x' : flags&BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED ? '*' : ' '
+ , flags&BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB ? 'l' : ' '
+ , flags&BGFX_CAPS_FORMAT_TEXTURE_3D ? 'x' : flags&BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED ? '*' : ' '
+ , flags&BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB ? 'l' : ' '
+ , flags&BGFX_CAPS_FORMAT_TEXTURE_CUBE ? 'x' : flags&BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED ? '*' : ' '
+ , flags&BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB ? 'l' : ' '
, flags&BGFX_CAPS_FORMAT_TEXTURE_VERTEX ? 'v' : ' '
, flags&BGFX_CAPS_FORMAT_TEXTURE_IMAGE ? 'i' : ' '
, flags&BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER ? 'f' : ' '
@@ -1055,17 +1096,9 @@ namespace bgfx
m_viewRemap[ii] = uint8_t(ii);
}
- memset(m_fb, 0xff, sizeof(m_fb) );
- memset(m_clear, 0, sizeof(m_clear) );
- memset(m_rect, 0, sizeof(m_rect) );
- memset(m_scissor, 0, sizeof(m_scissor) );
- memset(m_seq, 0, sizeof(m_seq) );
- memset(m_seqMask, 0, sizeof(m_seqMask) );
-
- for (uint32_t ii = 0; ii < BX_COUNTOF(m_rect); ++ii)
+ for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii)
{
- m_rect[ii].m_width = 1;
- m_rect[ii].m_height = 1;
+ resetView(uint8_t(ii) );
}
for (uint32_t ii = 0; ii < BX_COUNTOF(m_clearColor); ++ii)
@@ -1102,9 +1135,20 @@ namespace bgfx
for (uint32_t ii = 0; ii < BX_COUNTOF(s_emulatedFormats); ++ii)
{
- if (0 == (g_caps.formats[s_emulatedFormats[ii] ] & BGFX_CAPS_FORMAT_TEXTURE_COLOR) )
+ const uint32_t fmt = s_emulatedFormats[ii];
+ if (0 == (g_caps.formats[fmt] & BGFX_CAPS_FORMAT_TEXTURE_2D) )
{
- g_caps.formats[s_emulatedFormats[ii] ] |= BGFX_CAPS_FORMAT_TEXTURE_EMULATED;
+ g_caps.formats[fmt] |= BGFX_CAPS_FORMAT_TEXTURE_2D_EMULATED;
+ }
+
+ if (0 == (g_caps.formats[fmt] & BGFX_CAPS_FORMAT_TEXTURE_3D) )
+ {
+ g_caps.formats[fmt] |= BGFX_CAPS_FORMAT_TEXTURE_3D_EMULATED;
+ }
+
+ if (0 == (g_caps.formats[fmt] & BGFX_CAPS_FORMAT_TEXTURE_CUBE) )
+ {
+ g_caps.formats[fmt] |= BGFX_CAPS_FORMAT_TEXTURE_CUBE_EMULATED;
}
}
@@ -1287,6 +1331,7 @@ namespace bgfx
{
freeDynamicBuffers();
m_submit->m_resolution = m_resolution;
+ m_resolution.m_flags &= ~BGFX_RESET_FORCE;
m_submit->m_debug = m_debug;
memcpy(m_submit->m_viewRemap, m_viewRemap, sizeof(m_viewRemap) );
@@ -1501,11 +1546,11 @@ namespace bgfx
{ d3d9::rendererCreate, d3d9::rendererDestroy, BGFX_RENDERER_DIRECT3D9_NAME, !!BGFX_CONFIG_RENDERER_DIRECT3D9 }, // Direct3D9
{ d3d11::rendererCreate, d3d11::rendererDestroy, BGFX_RENDERER_DIRECT3D11_NAME, !!BGFX_CONFIG_RENDERER_DIRECT3D11 }, // Direct3D11
{ d3d12::rendererCreate, d3d12::rendererDestroy, BGFX_RENDERER_DIRECT3D12_NAME, !!BGFX_CONFIG_RENDERER_DIRECT3D12 }, // Direct3D12
-#if BGFX_CONFIG_RENDERER_METAL
+#if BX_PLATFORM_OSX || BX_PLATFORM_IOS
{ mtl::rendererCreate, mtl::rendererDestroy, BGFX_RENDERER_METAL_NAME, !!BGFX_CONFIG_RENDERER_METAL }, // Metal
#else
{ noop::rendererCreate, noop::rendererDestroy, BGFX_RENDERER_NULL_NAME, !!BGFX_CONFIG_RENDERER_NULL }, // Noop
-#endif // BGFX_CONFIG_RENDERER_METAL
+#endif // BX_PLATFORM_OSX || BX_PLATFORM_IOS
{ gl::rendererCreate, gl::rendererDestroy, BGFX_RENDERER_OPENGL_NAME, !!BGFX_CONFIG_RENDERER_OPENGLES }, // OpenGLES
{ gl::rendererCreate, gl::rendererDestroy, BGFX_RENDERER_OPENGL_NAME, !!BGFX_CONFIG_RENDERER_OPENGL }, // OpenGL
{ vk::rendererCreate, vk::rendererDestroy, BGFX_RENDERER_VULKAN_NAME, !!BGFX_CONFIG_RENDERER_VULKAN }, // Vulkan
@@ -1563,12 +1608,8 @@ again:
if (windowsVersionIs(Condition::GreaterEqual, 0x0602) )
{
-#if defined(__MINGW32__)
first = RendererType::Direct3D11;
-#else
- first = RendererType::Direct3D12;
-#endif // __MINGW32__
- second = RendererType::Direct3D11;
+ second = RendererType::Direct3D12;
if (!s_rendererCreator[second].supported)
{
second = RendererType::Direct3D9;
@@ -2030,6 +2071,18 @@ again:
}
break;
+ case CommandBuffer::ReadTexture:
+ {
+ TextureHandle handle;
+ _cmdbuf.read(handle);
+
+ void* data;
+ _cmdbuf.read(data);
+
+ m_renderCtx->readTexture(handle, data);
+ }
+ break;
+
case CommandBuffer::ResizeTexture:
{
TextureHandle handle;
@@ -2744,7 +2797,9 @@ again:
TextureHandle createTexture3D(uint16_t _width, uint16_t _height, uint16_t _depth, uint8_t _numMips, TextureFormat::Enum _format, uint32_t _flags, const Memory* _mem)
{
BGFX_CHECK_MAIN_THREAD();
- BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_3D), "Texture3D is not supported! Use bgfx::getCaps to check backend renderer capabilities.");
+ BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_3D)
+ , "Texture3D is not supported! Use bgfx::getCaps to check BGFX_CAPS_TEXTURE_3D backend renderer capabilities."
+ );
_numMips = uint8_t(bx::uint32_max(1, _numMips) );
@@ -2847,6 +2902,9 @@ again:
{
BGFX_CHECK_MAIN_THREAD();
BX_CHECK(NULL != _mem, "_mem can't be NULL");
+ BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_3D)
+ , "Texture3D is not supported! Use bgfx::getCaps to check BGFX_CAPS_TEXTURE_3D backend renderer capabilities."
+ );
if (_width == 0
|| _height == 0
|| _depth == 0)
@@ -2875,6 +2933,26 @@ again:
}
}
+ void readTexture(TextureHandle _handle, void* _data)
+ {
+ BGFX_CHECK_MAIN_THREAD();
+ BX_CHECK(NULL != _data, "_data can't be NULL");
+ BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_READ_BACK)
+ , "Texture read-back is not supported! Use bgfx::getCaps to check BGFX_CAPS_TEXTURE_READ_BACK backend renderer capabilities."
+ );
+ s_ctx->readTexture(_handle, _data);
+ }
+
+ void readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data)
+ {
+ BGFX_CHECK_MAIN_THREAD();
+ BX_CHECK(NULL != _data, "_data can't be NULL");
+ BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_READ_BACK)
+ , "Texture read-back is not supported! Use bgfx::getCaps to check BGFX_CAPS_TEXTURE_READ_BACK backend renderer capabilities."
+ );
+ s_ctx->readTexture(_handle, _attachment, _data);
+ }
+
FrameBufferHandle createFrameBuffer(uint16_t _width, uint16_t _height, TextureFormat::Enum _format, uint32_t _textureFlags)
{
_textureFlags |= _textureFlags&BGFX_TEXTURE_RT_MSAA_MASK ? 0 : BGFX_TEXTURE_RT;
@@ -2890,7 +2968,7 @@ again:
return createFrameBuffer(1, &th, true);
}
- FrameBufferHandle createFrameBuffer(uint8_t _num, TextureHandle* _handles, bool _destroyTextures)
+ FrameBufferHandle createFrameBuffer(uint8_t _num, const TextureHandle* _handles, bool _destroyTextures)
{
BGFX_CHECK_MAIN_THREAD();
BX_CHECK(_num != 0, "Number of frame buffer attachments can't be 0.");
@@ -2979,6 +3057,17 @@ again:
s_ctx->setViewRect(_id, _x, _y, _width, _height);
}
+ void setViewRect(uint8_t _id, uint16_t _x, uint16_t _y, BackbufferRatio::Enum _ratio)
+ {
+ BGFX_CHECK_MAIN_THREAD();
+ BX_CHECK(checkView(_id), "Invalid view id: %d", _id);
+
+ uint16_t width = uint16_t(s_ctx->m_resolution.m_width);
+ uint16_t height = uint16_t(s_ctx->m_resolution.m_height);
+ getTextureSizeFromRatio(_ratio, width, height);
+ setViewRect(_id, _x, _y, width, height);
+ }
+
void setViewScissor(uint8_t _id, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height)
{
BGFX_CHECK_MAIN_THREAD();
@@ -3028,6 +3117,13 @@ again:
s_ctx->setViewRemap(_id, _num, _remap);
}
+ void resetView(uint8_t _id)
+ {
+ BGFX_CHECK_MAIN_THREAD();
+ BX_CHECK(checkView(_id), "Invalid view id: %d", _id);
+ s_ctx->resetView(_id);
+ }
+
void setMarker(const char* _marker)
{
BGFX_CHECK_MAIN_THREAD();
@@ -3245,6 +3341,34 @@ again:
s_ctx->discard();
}
+ void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX, uint16_t _srcY, uint16_t _width, uint16_t _height)
+ {
+ blit(_id, _dst, 0, _dstX, _dstY, 0, _src, 0, _srcX, _srcY, 0, _width, _height, 0);
+ }
+
+ void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, FrameBufferHandle _src, uint8_t _attachment, uint16_t _srcX, uint16_t _srcY, uint16_t _width, uint16_t _height)
+ {
+ blit(_id, _dst, 0, _dstX, _dstY, 0, _src, _attachment, 0, _srcX, _srcY, 0, _width, _height, 0);
+ }
+
+ void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth)
+ {
+ BGFX_CHECK_MAIN_THREAD();
+ BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_BLIT)
+ , "Texture blit is not supported, use bgfx::getCaps to test BGFX_CAPS_TEXTURE_BLIT feature availability"
+ );
+ s_ctx->blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth);
+ }
+
+ void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, FrameBufferHandle _src, uint8_t _attachment, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth)
+ {
+ BGFX_CHECK_MAIN_THREAD();
+ BX_CHECK(0 != (g_caps.supported & BGFX_CAPS_TEXTURE_BLIT)
+ , "Texture blit is not supported! Use bgfx::getCaps to check BGFX_CAPS_TEXTURE_BLIT backend renderer capabilities."
+ );
+ s_ctx->blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _attachment, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth);
+ }
+
void saveScreenShot(const char* _filePath)
{
BGFX_CHECK_MAIN_THREAD();
@@ -3783,10 +3907,10 @@ BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_scaled(bgfx_backb
return handle.c;
}
-BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(uint8_t _num, bgfx_texture_handle_t* _handles, bool _destroyTextures)
+BGFX_C_API bgfx_frame_buffer_handle_t bgfx_create_frame_buffer_from_handles(uint8_t _num, const bgfx_texture_handle_t* _handles, bool _destroyTextures)
{
union { bgfx_frame_buffer_handle_t c; bgfx::FrameBufferHandle cpp; } handle;
- handle.cpp = bgfx::createFrameBuffer(_num, (bgfx::TextureHandle*)_handles, _destroyTextures);
+ handle.cpp = bgfx::createFrameBuffer(_num, (const bgfx::TextureHandle*)_handles, _destroyTextures);
return handle.c;
}
@@ -3872,6 +3996,11 @@ BGFX_C_API void bgfx_set_view_remap(uint8_t _id, uint8_t _num, const void* _rema
bgfx::setViewRemap(_id, _num, _remap);
}
+BGFX_C_API void bgfx_reset_view(uint8_t _id)
+{
+ bgfx::resetView(_id);
+}
+
BGFX_C_API void bgfx_set_marker(const char* _marker)
{
bgfx::setMarker(_marker);
@@ -4063,6 +4192,13 @@ BGFX_C_API void bgfx_discard()
bgfx::discard();
}
+BGFX_C_API void bgfx_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)
+{
+ union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } dst = { _dst };
+ union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } src = { _src };
+ bgfx::blit(_id, dst.cpp, _dstMip, _dstX, _dstY, _dstZ, src.cpp, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth);
+}
+
BGFX_C_API void bgfx_save_screen_shot(const char* _filePath)
{
bgfx::saveScreenShot(_filePath);
diff --git a/3rdparty/bgfx/src/bgfx_p.h b/3rdparty/bgfx/src/bgfx_p.h
index b7bbcf676b5..fe9f89d916d 100644
--- a/3rdparty/bgfx/src/bgfx_p.h
+++ b/3rdparty/bgfx/src/bgfx_p.h
@@ -174,6 +174,7 @@ namespace stl
#define BGFX_MAX_COMPUTE_BINDINGS 8
#define BGFX_SAMPLER_DEFAULT_FLAGS UINT32_C(0x10000000)
+#define BGFX_RESET_FORCE UINT32_C(0x80000000)
#define BGFX_RENDERER_DIRECT3D9_NAME "Direct3D 9"
#define BGFX_RENDERER_DIRECT3D11_NAME "Direct3D 11"
@@ -583,6 +584,7 @@ namespace bgfx
DestroyTexture,
DestroyFrameBuffer,
DestroyUniform,
+ ReadTexture,
SaveScreenShot,
};
@@ -759,6 +761,34 @@ namespace bgfx
};
#undef SORT_KEY_RENDER_DRAW
+ struct BlitKey
+ {
+ uint32_t encode()
+ {
+ return 0
+ | (uint32_t(m_view) << 24)
+ | uint32_t(m_item)
+ ;
+ }
+
+ void decode(uint32_t _key)
+ {
+ m_item = uint16_t(_key & UINT16_MAX);
+ m_view = uint8_t(_key >> 24);
+ }
+
+ static uint32_t remapView(uint32_t _key, uint8_t _viewRemap[BGFX_CONFIG_MAX_VIEWS])
+ {
+ const uint8_t oldView = uint8_t(_key >> 24);
+ const uint32_t view = uint32_t(_viewRemap[oldView]) << 24;
+ const uint32_t key = (_key & ~UINT32_C(0xff000000) ) | view;
+ return key;
+ }
+
+ uint16_t m_item;
+ uint8_t m_view;
+ };
+
BX_ALIGN_DECL_16(struct) Matrix4
{
union
@@ -1184,6 +1214,23 @@ namespace bgfx
RenderCompute compute;
};
+ struct BlitItem
+ {
+ uint16_t m_srcX;
+ uint16_t m_srcY;
+ uint16_t m_srcZ;
+ uint16_t m_dstX;
+ uint16_t m_dstY;
+ uint16_t m_dstZ;
+ uint16_t m_width;
+ uint16_t m_height;
+ uint16_t m_depth;
+ uint8_t m_srcMip;
+ uint8_t m_dstMip;
+ TextureHandle m_src;
+ TextureHandle m_dst;
+ };
+
struct Resolution
{
Resolution()
@@ -1274,9 +1321,10 @@ namespace bgfx
m_matrixCache.reset();
m_rectCache.reset();
m_key.reset();
- m_num = 0;
+ m_num = 0;
m_numRenderItems = 0;
- m_numDropped = 0;
+ m_numDropped = 0;
+ m_numBlitItems = 0;
m_iboffset = 0;
m_vboffset = 0;
m_cmdPre.start();
@@ -1501,6 +1549,8 @@ namespace bgfx
return dispatch(_id, _handle, 0, 0, 0, _flags);
}
+ void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth);
+
void sort();
bool checkAvailTransientIndexBuffer(uint32_t _num)
@@ -1622,6 +1672,8 @@ namespace bgfx
RenderItem m_renderItem[BGFX_CONFIG_MAX_DRAW_CALLS+1];
RenderDraw m_draw;
RenderCompute m_compute;
+ uint32_t m_blitKeys[BGFX_CONFIG_MAX_BLIT_ITEMS+1];
+ BlitItem m_blitItem[BGFX_CONFIG_MAX_BLIT_ITEMS+1];
uint64_t m_flags;
uint32_t m_uniformBegin;
uint32_t m_uniformEnd;
@@ -1632,6 +1684,7 @@ namespace bgfx
RenderItemCount m_num;
RenderItemCount m_numRenderItems;
RenderItemCount m_numDropped;
+ uint16_t m_numBlitItems;
MatrixCache m_matrixCache;
RectCache m_rectCache;
@@ -1890,6 +1943,7 @@ namespace bgfx
virtual void updateTextureBegin(TextureHandle _handle, uint8_t _side, uint8_t _mip) = 0;
virtual void updateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) = 0;
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 destroyTexture(TextureHandle _handle) = 0;
virtual void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const TextureHandle* _textureHandles) = 0;
@@ -1983,6 +2037,7 @@ namespace bgfx
, uint16_t(m_resolution.m_width)
, uint16_t(m_resolution.m_height)
);
+ m_resolution.m_flags |= BGFX_RESET_FORCE;
}
}
}
@@ -2939,6 +2994,22 @@ namespace bgfx
textureDecRef(_handle);
}
+ BGFX_API_FUNC(void readTexture(TextureHandle _handle, void* _data) )
+ {
+ CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::ReadTexture);
+ cmdbuf.write(_handle);
+ cmdbuf.write(_data);
+ }
+
+ BGFX_API_FUNC(void readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data) )
+ {
+ const FrameBufferRef& ref = m_frameBufferRef[_handle.idx];
+ BX_CHECK(!ref.m_window, "Can't sample window frame buffer.");
+ TextureHandle textureHandle = ref.un.m_th[_attachment];
+ BX_CHECK(isValid(textureHandle), "Frame buffer texture %d is invalid.", _attachment);
+ readTexture(textureHandle, _data);
+ }
+
void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height)
{
const TextureRef& textureRef = m_textureRef[_handle.idx];
@@ -3005,8 +3076,37 @@ namespace bgfx
cmdbuf.write(_mem);
}
- BGFX_API_FUNC(FrameBufferHandle createFrameBuffer(uint8_t _num, TextureHandle* _handles, bool _destroyTextures) )
+ bool checkFrameBuffer(uint8_t _num, const TextureHandle* _handles) const
+ {
+ uint8_t color = 0;
+ uint8_t depth = 0;
+
+ for (uint32_t ii = 0; ii < _num; ++ii)
+ {
+ TextureHandle texHandle = _handles[ii];
+ if (isDepth(TextureFormat::Enum(m_textureRef[texHandle.idx].m_format)))
+ {
+ ++depth;
+ }
+ else
+ {
+ ++color;
+ }
+ }
+
+ return color <= g_caps.maxFBAttachments
+ && depth <= 1
+ ;
+ }
+
+ BGFX_API_FUNC(FrameBufferHandle createFrameBuffer(uint8_t _num, const TextureHandle* _handles, bool _destroyTextures) )
{
+ BX_CHECK(checkFrameBuffer(_num, _handles)
+ , "Too many frame buffer attachments (num attachments: %d, max color attachments %d)!"
+ , _num
+ , g_caps.maxFBAttachments
+ );
+
FrameBufferHandle handle = { m_frameBufferHandle.alloc() };
BX_WARN(isValid(handle), "Failed to allocate frame buffer handle.");
@@ -3297,6 +3397,17 @@ namespace bgfx
}
}
+ BGFX_API_FUNC(void resetView(uint8_t _id) )
+ {
+ setViewRect(_id, 0, 0, 1, 1);
+ setViewScissor(_id, 0, 0, 0, 0);
+ setViewClear(_id, BGFX_CLEAR_NONE, 0, 0.0f, 0);
+ setViewSeq(_id, false);
+ bgfx::FrameBufferHandle invalid = BGFX_INVALID_HANDLE;
+ setViewFrameBuffer(_id, invalid);
+ setViewTransform(_id, NULL, NULL, BGFX_VIEW_NONE, NULL);
+ }
+
BGFX_API_FUNC(void setViewRemap(uint8_t _id, uint8_t _num, const void* _remap) )
{
const uint32_t num = bx::uint32_min(_id + _num, BGFX_CONFIG_MAX_VIEWS) - _id;
@@ -3559,6 +3670,28 @@ namespace bgfx
m_submit->discard();
}
+ BGFX_API_FUNC(void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) )
+ {
+ const TextureRef& src = m_textureRef[_src.idx];
+ const TextureRef& dst = m_textureRef[_dst.idx];
+ BX_CHECK(src.m_format == dst.m_format
+ , "Texture format must match (src %s, dst %s)."
+ , bgfx::getName(TextureFormat::Enum(src.m_format) )
+ , bgfx::getName(TextureFormat::Enum(dst.m_format) )
+ );
+ BX_UNUSED(src, dst);
+ m_submit->blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, _src, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth);
+ }
+
+ BGFX_API_FUNC(void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, FrameBufferHandle _src, uint8_t _attachment, uint8_t _srcMip, uint16_t _srcX, uint16_t _srcY, uint16_t _srcZ, uint16_t _width, uint16_t _height, uint16_t _depth) )
+ {
+ const FrameBufferRef& ref = m_frameBufferRef[_src.idx];
+ BX_CHECK(!ref.m_window, "Can't sample window frame buffer.");
+ TextureHandle textureHandle = ref.un.m_th[_attachment];
+ BX_CHECK(isValid(textureHandle), "Frame buffer texture %d is invalid.", _attachment);
+ blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, textureHandle, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth);
+ }
+
BGFX_API_FUNC(uint32_t frame() );
void dumpViewStats();
diff --git a/3rdparty/bgfx/src/config.h b/3rdparty/bgfx/src/config.h
index 7ed64c04325..a150861a269 100644
--- a/3rdparty/bgfx/src/config.h
+++ b/3rdparty/bgfx/src/config.h
@@ -44,6 +44,7 @@
# ifndef BGFX_CONFIG_RENDERER_METAL
# define BGFX_CONFIG_RENDERER_METAL (0 \
|| BX_PLATFORM_IOS \
+ || BX_PLATFORM_OSX \
? 1 : 0)
# endif // BGFX_CONFIG_RENDERER_METAL
@@ -188,6 +189,10 @@
# define BGFX_CONFIG_MAX_DRAW_CALLS ( (64<<10)-1)
#endif // BGFX_CONFIG_MAX_DRAW_CALLS
+#ifndef BGFX_CONFIG_MAX_BLIT_ITEMS
+# define BGFX_CONFIG_MAX_BLIT_ITEMS 256
+#endif // BGFX_CONFIG_MAX_BLIT_ITEMS
+
#ifndef BGFX_CONFIG_MAX_MATRIX_CACHE
# define BGFX_CONFIG_MAX_MATRIX_CACHE (BGFX_CONFIG_MAX_DRAW_CALLS+1)
#endif // BGFX_CONFIG_MAX_MATRIX_CACHE
diff --git a/3rdparty/bgfx/src/glimports.h b/3rdparty/bgfx/src/glimports.h
index 42f966ece35..0209f0b5f7d 100644
--- a/3rdparty/bgfx/src/glimports.h
+++ b/3rdparty/bgfx/src/glimports.h
@@ -71,6 +71,7 @@ typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum targ
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
+typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode);
@@ -120,6 +121,7 @@ typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuin
typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (GL_APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void);
typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data);
@@ -138,6 +140,7 @@ typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint prog
typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);
typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
+typedef void (GL_APIENTRYP PFNGLGETTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, void *pixels);
typedef void (GL_APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
@@ -251,6 +254,7 @@ GL_IMPORT______(false, PFNGLCOMPRESSEDTEXIMAGE2DPROC, glCompressedT
GL_IMPORT______(false, PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC, glCompressedTexSubImage2D);
GL_IMPORT______(true , PFNGLCOMPRESSEDTEXIMAGE3DPROC, glCompressedTexImage3D);
GL_IMPORT______(true , PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC, glCompressedTexSubImage3D);
+GL_IMPORT______(true , PFNGLCOPYIMAGESUBDATAPROC, glCopyImageSubData);
GL_IMPORT______(false, PFNGLCREATEPROGRAMPROC, glCreateProgram);
GL_IMPORT______(false, PFNGLCREATESHADERPROC, glCreateShader);
GL_IMPORT______(false, PFNGLCULLFACEPROC, glCullFace);
@@ -300,6 +304,7 @@ GL_IMPORT______(true, PFNGLGENVERTEXARRAYSPROC, glGenVertexAr
GL_IMPORT______(false, PFNGLGETACTIVEATTRIBPROC, glGetActiveAttrib);
GL_IMPORT______(false, PFNGLGETATTRIBLOCATIONPROC, glGetAttribLocation);
GL_IMPORT______(false, PFNGLGETACTIVEUNIFORMPROC, glGetActiveUniform);
+GL_IMPORT______(true, PFNGLGETCOMPRESSEDTEXIMAGEPROC, glGetCompressedTexImage);
GL_IMPORT______(true, PFNGLGETDEBUGMESSAGELOGPROC, glGetDebugMessageLog);
GL_IMPORT______(false, PFNGLGETERRORPROC, glGetError);
GL_IMPORT______(false, PFNGLGETFLOATVPROC, glGetFloatv);
@@ -318,6 +323,7 @@ GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCEIVPROC, glGetProgramR
GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCENAMEPROC, glGetProgramResourceName);
GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCELOCATIONPROC, glGetProgramResourceLocation);
GL_IMPORT______(true, PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC, glGetProgramResourceLocationIndex);
+GL_IMPORT______(true, PFNGLGETTEXIMAGEPROC, glGetTexImage);
GL_IMPORT______(true, PFNGLGETQUERYIVPROC, glGetQueryiv);
GL_IMPORT______(true, PFNGLGETQUERYOBJECTIVPROC, glGetQueryObjectiv);
GL_IMPORT______(true, PFNGLGETQUERYOBJECTI64VPROC, glGetQueryObjecti64v);
@@ -451,11 +457,16 @@ GL_IMPORT______(true, PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC, glGetTranslat
GL_IMPORT_ANGLE(true, PFNGLBLITFRAMEBUFFERPROC, glBlitFramebuffer);
GL_IMPORT_ANGLE(true, PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC, glRenderbufferStorageMultisample);
+GL_IMPORT_EXT__(true , PFNGLCOPYIMAGESUBDATAPROC, glCopyImageSubData);
+
GL_IMPORT_KHR__(true, PFNGLDEBUGMESSAGECONTROLPROC, glDebugMessageControl);
GL_IMPORT_KHR__(true, PFNGLDEBUGMESSAGEINSERTPROC, glDebugMessageInsert);
GL_IMPORT_KHR__(true, PFNGLDEBUGMESSAGECALLBACKPROC, glDebugMessageCallback);
GL_IMPORT_KHR__(true, PFNGLGETDEBUGMESSAGELOGPROC, glGetDebugMessageLog);
+GL_IMPORT_____x(true, PFNGLGETCOMPRESSEDTEXIMAGEPROC, glGetCompressedTexImage);
+GL_IMPORT_____x(true, PFNGLGETTEXIMAGEPROC, glGetTexImage);
+
# if BGFX_CONFIG_RENDERER_OPENGLES < 30
GL_IMPORT_OES__(true, PFNGLTEXIMAGE3DPROC, glTexImage3D);
GL_IMPORT_OES__(true, PFNGLTEXSUBIMAGE3DPROC, glTexSubImage3D);
diff --git a/3rdparty/bgfx/src/renderer_d3d11.cpp b/3rdparty/bgfx/src/renderer_d3d11.cpp
index a7a383d3b7d..e2ec495a34f 100644
--- a/3rdparty/bgfx/src/renderer_d3d11.cpp
+++ b/3rdparty/bgfx/src/renderer_d3d11.cpp
@@ -56,6 +56,7 @@ namespace bgfx { namespace d3d11
ID3D11UnorderedAccessView* m_uav[D3D11_PS_CS_UAV_REGISTER_COUNT];
ID3D11ShaderResourceView* m_srv[D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT];
ID3D11SamplerState* m_sampler[D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT];
+ ID3D11RenderTargetView* m_rtv[BGFX_CONFIG_MAX_FRAME_BUFFERS];
uint32_t m_zero[D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT];
float m_zerof[D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT];
};
@@ -569,7 +570,6 @@ namespace bgfx { namespace d3d11
, m_captureTexture(NULL)
, m_captureResolve(NULL)
, m_wireframe(false)
- , m_flags(BGFX_RESET_NONE)
, m_maxAnisotropy(1)
, m_currentProgram(NULL)
, m_vsChanges(0)
@@ -1156,6 +1156,8 @@ BX_PRAGMA_DIAGNOSTIC_POP();
| BGFX_CAPS_SWAP_CHAIN
| (m_ovr.isInitialized() ? BGFX_CAPS_HMD : 0)
| BGFX_CAPS_DRAW_INDIRECT
+ | BGFX_CAPS_TEXTURE_BLIT
+ | BGFX_CAPS_TEXTURE_READ_BACK
);
if (m_featureLevel <= D3D_FEATURE_LEVEL_9_2)
@@ -1275,7 +1277,21 @@ BX_PRAGMA_DIAGNOSTIC_POP();
| D3D11_FORMAT_SUPPORT_TEXTURE3D
| D3D11_FORMAT_SUPPORT_TEXTURECUBE
) )
- ? BGFX_CAPS_FORMAT_TEXTURE_COLOR
+ ? BGFX_CAPS_FORMAT_TEXTURE_2D
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_TEXTURE3D
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_3D
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+
+ support |= 0 != (data.OutFormatSupport & (0
+ | D3D11_FORMAT_SUPPORT_TEXTURECUBE
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_CUBE
: BGFX_CAPS_FORMAT_TEXTURE_NONE
;
@@ -1357,10 +1373,22 @@ BX_PRAGMA_DIAGNOSTIC_POP();
{
support |= 0 != (data.OutFormatSupport & (0
| D3D11_FORMAT_SUPPORT_TEXTURE2D
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+
+ support |= 0 != (data.OutFormatSupport & (0
| D3D11_FORMAT_SUPPORT_TEXTURE3D
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+
+ support |= 0 != (data.OutFormatSupport & (0
| D3D11_FORMAT_SUPPORT_TEXTURECUBE
) )
- ? BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB
+ ? BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB
: BGFX_CAPS_FORMAT_TEXTURE_NONE
;
}
@@ -1651,6 +1679,32 @@ BX_PRAGMA_DIAGNOSTIC_POP();
{
}
+ void readTexture(TextureHandle _handle, void* _data) BX_OVERRIDE
+ {
+ const TextureD3D11& texture = m_textures[_handle.idx];
+ D3D11_MAPPED_SUBRESOURCE mapped;
+ DX_CHECK(m_deviceCtx->Map(texture.m_ptr, 0, D3D11_MAP_READ, 0, &mapped) );
+
+ uint8_t* src = (uint8_t*)mapped.pData;
+ uint32_t srcPitch = mapped.RowPitch;
+
+ const uint8_t bpp = getBitsPerPixel(TextureFormat::Enum(texture.m_textureFormat) );
+ uint8_t* dst = (uint8_t*)_data;
+ uint32_t dstPitch = texture.m_width*bpp/8;
+
+ uint32_t pitch = bx::uint32_min(srcPitch, dstPitch);
+
+ for (uint32_t yy = 0, height = texture.m_height; yy < height; ++yy)
+ {
+ memcpy(dst, src, pitch);
+
+ src += srcPitch;
+ dst += dstPitch;
+ }
+
+ m_deviceCtx->Unmap(texture.m_ptr, 0);
+ }
+
void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE
{
TextureD3D11& texture = m_textures[_handle.idx];
@@ -1939,12 +1993,12 @@ BX_PRAGMA_DIAGNOSTIC_POP();
DX_CHECK(m_swapChain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&color) );
D3D11_RENDER_TARGET_VIEW_DESC desc;
- desc.ViewDimension = (m_flags & BGFX_RESET_MSAA_MASK)
+ desc.ViewDimension = (m_resolution.m_flags & BGFX_RESET_MSAA_MASK)
? D3D11_RTV_DIMENSION_TEXTURE2DMS
: D3D11_RTV_DIMENSION_TEXTURE2D
;
desc.Texture2D.MipSlice = 0;
- desc.Format = (m_flags & BGFX_RESET_SRGB_BACKBUFFER)
+ desc.Format = (m_resolution.m_flags & BGFX_RESET_SRGB_BACKBUFFER)
? DXGI_FORMAT_R8G8B8A8_UNORM_SRGB
: DXGI_FORMAT_R8G8B8A8_UNORM
;
@@ -2008,7 +2062,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
HRESULT hr = S_OK;
uint32_t syncInterval = BX_ENABLED(BX_PLATFORM_WINRT)
? 1 // sync interval of 0 is not supported on WinRT
- : !!(m_flags & BGFX_RESET_VSYNC)
+ : !!(m_resolution.m_flags & BGFX_RESET_VSYNC)
;
for (uint32_t ii = 1, num = m_numWindows; ii < num && SUCCEEDED(hr); ++ii)
@@ -2101,22 +2155,23 @@ BX_PRAGMA_DIAGNOSTIC_POP();
uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY);
- if ( getBufferWidth() != _resolution.m_width
- || getBufferHeight() != _resolution.m_height
- || m_flags != flags)
+ if (m_resolution.m_width != _resolution.m_width
+ || m_resolution.m_height != _resolution.m_height
+ || m_resolution.m_flags != flags)
{
+ flags &= ~BGFX_RESET_FORCE;
+
bool resize = true
&& !BX_ENABLED(BX_PLATFORM_WINRT) // can't use ResizeBuffers on Windows Phone
- && (m_flags&BGFX_RESET_MSAA_MASK) == (flags&BGFX_RESET_MSAA_MASK)
+ && (m_resolution.m_flags&BGFX_RESET_MSAA_MASK) == (flags&BGFX_RESET_MSAA_MASK)
;
- m_flags = flags;
-
- m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
- m_textVideoMem.clear();
m_resolution = _resolution;
m_resolution.m_flags = flags;
+ m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
+ m_textVideoMem.clear();
+
setBufferSize(_resolution.m_width, _resolution.m_height);
preReset();
@@ -2131,6 +2186,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
{
if (resize)
{
+ m_deviceCtx->OMSetRenderTargets(1, s_zero.m_rtv, NULL);
DX_CHECK(m_swapChain->ResizeBuffers(2
, getBufferWidth()
, getBufferHeight()
@@ -2141,13 +2197,13 @@ BX_PRAGMA_DIAGNOSTIC_POP();
else
{
updateMsaa();
- m_scd.SampleDesc = s_msaa[(m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT];
+ m_scd.SampleDesc = s_msaa[(m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT];
DX_RELEASE(m_swapChain, 0);
SwapChainDesc* scd = &m_scd;
SwapChainDesc swapChainScd;
- if (0 != (m_flags & BGFX_RESET_HMD)
+ if (0 != (m_resolution.m_flags & BGFX_RESET_HMD)
&& m_ovr.isInitialized() )
{
swapChainScd = m_scd;
@@ -2920,7 +2976,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
void capturePostReset()
{
- if (m_flags&BGFX_RESET_CAPTURE)
+ if (m_resolution.m_flags&BGFX_RESET_CAPTURE)
{
ID3D11Texture2D* backBuffer;
DX_CHECK(m_swapChain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&backBuffer) );
@@ -3259,7 +3315,6 @@ BX_PRAGMA_DIAGNOSTIC_POP();
#endif // BX_PLATFORM_WINRT
SwapChainDesc m_scd;
- uint32_t m_flags;
uint32_t m_maxAnisotropy;
IndexBufferD3D11 m_indexBuffers[BGFX_CONFIG_MAX_INDEX_BUFFERS];
@@ -3800,7 +3855,10 @@ BX_PRAGMA_DIAGNOSTIC_POP();
const uint32_t textureWidth = bx::uint32_max(blockInfo.blockWidth, imageContainer.m_width >>startLod);
const uint32_t textureHeight = bx::uint32_max(blockInfo.blockHeight, imageContainer.m_height>>startLod);
- m_flags = _flags;
+ m_flags = _flags;
+ m_width = textureWidth;
+ m_height = textureHeight;
+ m_depth = imageContainer.m_depth;
m_requestedFormat = (uint8_t)imageContainer.m_format;
m_textureFormat = (uint8_t)imageContainer.m_format;
@@ -3899,10 +3957,12 @@ BX_PRAGMA_DIAGNOSTIC_POP();
}
}
- const bool bufferOnly = 0 != (m_flags&BGFX_TEXTURE_RT_BUFFER_ONLY);
+ const bool bufferOnly = 0 != (m_flags&(BGFX_TEXTURE_RT_BUFFER_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;
+ const bool srgb = 0 != (m_flags&BGFX_TEXTURE_SRGB) || imageContainer.m_srgb;
+ const bool blit = 0 != (m_flags&BGFX_TEXTURE_BLIT_DST);
+ const bool readBack = 0 != (m_flags&BGFX_TEXTURE_READ_BACK);
const uint32_t msaaQuality = bx::uint32_satsub( (m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1);
const DXGI_SAMPLE_DESC& msaa = s_msaa[msaaQuality];
@@ -3940,7 +4000,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
desc.MipLevels = numMips;
desc.Format = format;
desc.SampleDesc = msaa;
- desc.Usage = kk == 0 ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE;
+ desc.Usage = kk == 0 || blit ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE;
desc.BindFlags = bufferOnly ? 0 : D3D11_BIND_SHADER_RESOURCE;
desc.CPUAccessFlags = 0;
@@ -3961,6 +4021,13 @@ BX_PRAGMA_DIAGNOSTIC_POP();
desc.Usage = D3D11_USAGE_DEFAULT;
}
+ if (readBack)
+ {
+ desc.BindFlags = 0;
+ desc.Usage = D3D11_USAGE_STAGING;
+ desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
+ }
+
if (imageContainer.m_cubeMap)
{
desc.ArraySize = 6;
@@ -3988,7 +4055,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
desc.Depth = imageContainer.m_depth;
desc.MipLevels = imageContainer.m_numMips;
desc.Format = format;
- desc.Usage = kk == 0 ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE;
+ desc.Usage = kk == 0 || blit ? D3D11_USAGE_DEFAULT : D3D11_USAGE_IMMUTABLE;
desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
desc.CPUAccessFlags = 0;
desc.MiscFlags = 0;
@@ -4235,23 +4302,96 @@ BX_PRAGMA_DIAGNOSTIC_POP();
}
}
+ const uint32_t msaaQuality = bx::uint32_satsub( (texture.m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1);
+ const DXGI_SAMPLE_DESC& msaa = s_msaa[msaaQuality];
+
if (isDepth( (TextureFormat::Enum)texture.m_textureFormat) )
{
BX_CHECK(NULL == m_dsv, "Frame buffer already has depth-stencil attached.");
- const uint32_t msaaQuality = bx::uint32_satsub( (texture.m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1);
- const DXGI_SAMPLE_DESC& msaa = s_msaa[msaaQuality];
+ switch (texture.m_type)
+ {
+ default:
+ case TextureD3D11::Texture2D:
+ {
+ D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc;
+ dsvDesc.Format = s_textureFormat[texture.m_textureFormat].m_fmtDsv;
+ dsvDesc.ViewDimension = 1 < msaa.Count
+ ? D3D11_DSV_DIMENSION_TEXTURE2DMS
+ : D3D11_DSV_DIMENSION_TEXTURE2D
+ ;
+ dsvDesc.Flags = 0;
+ dsvDesc.Texture2D.MipSlice = 0;
+ DX_CHECK(s_renderD3D11->m_device->CreateDepthStencilView(texture.m_ptr, &dsvDesc, &m_dsv) );
+ }
+ break;
- D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc;
- dsvDesc.Format = s_textureFormat[texture.m_textureFormat].m_fmtDsv;
- dsvDesc.ViewDimension = 1 < msaa.Count ? D3D11_DSV_DIMENSION_TEXTURE2DMS : D3D11_DSV_DIMENSION_TEXTURE2D;
- dsvDesc.Flags = 0;
- dsvDesc.Texture2D.MipSlice = 0;
- DX_CHECK(s_renderD3D11->m_device->CreateDepthStencilView(texture.m_ptr, &dsvDesc, &m_dsv) );
+ case TextureD3D11::TextureCube:
+ {
+ D3D11_DEPTH_STENCIL_VIEW_DESC dsvDesc;
+ dsvDesc.Format = s_textureFormat[texture.m_textureFormat].m_fmtDsv;
+ if (1 < msaa.Count)
+ {
+ dsvDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY;
+ dsvDesc.Texture2DMSArray.ArraySize = 1;
+ dsvDesc.Texture2DMSArray.FirstArraySlice = 0;
+ }
+ else
+ {
+ dsvDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2DARRAY;
+ dsvDesc.Texture2DArray.ArraySize = 1;
+ dsvDesc.Texture2DArray.FirstArraySlice = 0;
+ dsvDesc.Texture2DArray.MipSlice = 0;
+ }
+ dsvDesc.Flags = 0;
+ DX_CHECK(s_renderD3D11->m_device->CreateDepthStencilView(texture.m_ptr, &dsvDesc, &m_dsv) );
+ }
+ break;
+ }
}
else
{
- DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, NULL, &m_rtv[m_num]) );
+ switch (texture.m_type)
+ {
+ default:
+ case TextureD3D11::Texture2D:
+ DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, NULL, &m_rtv[m_num]) );
+ break;
+
+ case TextureD3D11::TextureCube:
+ {
+ D3D11_RENDER_TARGET_VIEW_DESC desc;
+ desc.Format = s_textureFormat[texture.m_textureFormat].m_fmt;
+ if (1 < msaa.Count)
+ {
+ desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY;
+ desc.Texture2DMSArray.ArraySize = 1;
+ desc.Texture2DMSArray.FirstArraySlice = 0;
+ }
+ else
+ {
+ desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2DARRAY;
+ desc.Texture2DArray.ArraySize = 1;
+ desc.Texture2DArray.FirstArraySlice = 0;
+ desc.Texture2DArray.MipSlice = 0;
+ }
+ DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, &desc, &m_rtv[m_num]) );
+ }
+ break;
+
+ case TextureD3D11::Texture3D:
+ {
+ D3D11_RENDER_TARGET_VIEW_DESC desc;
+ desc.Format = s_textureFormat[texture.m_textureFormat].m_fmt;
+ desc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE3D;
+ desc.Texture3D.MipSlice = 0;
+ desc.Texture3D.WSize = 1;
+ desc.Texture3D.FirstWSlice = 0;
+ DX_CHECK(s_renderD3D11->m_device->CreateRenderTargetView(texture.m_ptr, &desc, &m_rtv[m_num]) );
+ }
+ break;
+ }
+
DX_CHECK(s_renderD3D11->m_device->CreateShaderResourceView(texture.m_ptr, NULL, &m_srv[m_num]) );
m_num++;
}
@@ -4450,6 +4590,11 @@ BX_PRAGMA_DIAGNOSTIC_POP();
uint16_t view = UINT16_MAX;
FrameBufferHandle fbh = BGFX_INVALID_HANDLE;
+ BlitKey blitKey;
+ blitKey.decode(_render->m_blitKeys[0]);
+ uint16_t numBlitItems = _render->m_numBlitItems;
+ uint16_t blitItem = 0;
+
const uint64_t primType = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0;
uint8_t primIndex = uint8_t(primType >> BGFX_STATE_PT_SHIFT);
PrimInfo prim = s_primInfo[primIndex];
@@ -4583,6 +4728,75 @@ BX_PRAGMA_DIAGNOSTIC_POP();
clearQuad(_clearQuad, viewState.m_rect, clr, _render->m_colorPalette);
prim = s_primInfo[BX_COUNTOF(s_primName)]; // Force primitive type update after clear quad.
}
+
+ for (; blitItem < numBlitItems && blitKey.m_view <= view; blitItem++)
+ {
+ const BlitItem& blit = _render->m_blitItem[blitItem];
+ blitKey.decode(_render->m_blitKeys[blitItem+1]);
+
+ const TextureD3D11& src = m_textures[blit.m_src.idx];
+ const TextureD3D11& dst = m_textures[blit.m_dst.idx];
+
+ uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX;
+ uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY;
+ uint32_t srcDepth = bx::uint32_min(src.m_depth, blit.m_srcZ + blit.m_depth) - blit.m_srcZ;
+ uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX;
+ uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY;
+ uint32_t dstDepth = bx::uint32_min(dst.m_depth, blit.m_dstZ + blit.m_depth) - blit.m_dstZ;
+ uint32_t width = bx::uint32_min(srcWidth, dstWidth);
+ uint32_t height = bx::uint32_min(srcHeight, dstHeight);
+ uint32_t depth = bx::uint32_min(srcDepth, dstDepth);
+
+ if (TextureD3D11::Texture3D == src.m_type)
+ {
+ D3D11_BOX box;
+ box.left = blit.m_srcX;
+ box.top = blit.m_srcY;
+ box.front = blit.m_srcZ;
+ box.right = blit.m_srcX + width;
+ box.bottom = blit.m_srcY + height;;
+ box.back = blit.m_srcZ + bx::uint32_imax(1, depth);
+
+ deviceCtx->CopySubresourceRegion(dst.m_ptr
+ , blit.m_dstMip
+ , blit.m_dstX
+ , blit.m_dstY
+ , blit.m_dstZ
+ , src.m_ptr
+ , blit.m_srcMip
+ , &box
+ );
+ }
+ else
+ {
+ 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.back = 1;
+
+ const uint32_t srcZ = TextureD3D11::TextureCube == src.m_type
+ ? blit.m_srcZ
+ : 0
+ ;
+ const uint32_t dstZ = TextureD3D11::TextureCube == dst.m_type
+ ? blit.m_dstZ
+ : 0
+ ;
+
+ deviceCtx->CopySubresourceRegion(dst.m_ptr
+ , dstZ*dst.m_numMips+blit.m_dstMip
+ , blit.m_dstX
+ , blit.m_dstY
+ , 0
+ , src.m_ptr
+ , srcZ*src.m_numMips+blit.m_srcMip
+ , &box
+ );
+ }
+ }
}
if (isCompute)
diff --git a/3rdparty/bgfx/src/renderer_d3d11.h b/3rdparty/bgfx/src/renderer_d3d11.h
index d0560957f72..958e3d8c8b8 100644
--- a/3rdparty/bgfx/src/renderer_d3d11.h
+++ b/3rdparty/bgfx/src/renderer_d3d11.h
@@ -238,6 +238,9 @@ namespace bgfx { namespace d3d11
ID3D11ShaderResourceView* m_srv;
ID3D11UnorderedAccessView* m_uav;
uint32_t m_flags;
+ uint32_t m_width;
+ uint32_t m_height;
+ uint32_t m_depth;
uint8_t m_type;
uint8_t m_requestedFormat;
uint8_t m_textureFormat;
diff --git a/3rdparty/bgfx/src/renderer_d3d12.cpp b/3rdparty/bgfx/src/renderer_d3d12.cpp
index 902eb8b4610..ce3d71bacde 100644
--- a/3rdparty/bgfx/src/renderer_d3d12.cpp
+++ b/3rdparty/bgfx/src/renderer_d3d12.cpp
@@ -457,7 +457,6 @@ namespace bgfx { namespace d3d12
{
RendererContextD3D12()
: m_wireframe(false)
- , m_flags(BGFX_RESET_NONE)
, m_maxAnisotropy(1)
, m_fsChanges(0)
, m_vsChanges(0)
@@ -884,6 +883,8 @@ namespace bgfx { namespace d3d12
| BGFX_CAPS_COMPUTE
| (m_options.ROVsSupported ? BGFX_CAPS_FRAGMENT_ORDERING : 0)
// | BGFX_CAPS_SWAP_CHAIN
+ | BGFX_CAPS_TEXTURE_BLIT
+ | BGFX_CAPS_TEXTURE_READ_BACK
);
g_caps.maxTextureSize = 16384;
g_caps.maxFBAttachments = uint8_t(bx::uint32_min(16, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) );
@@ -907,10 +908,22 @@ namespace bgfx { namespace d3d12
{
support |= 0 != (data.Support1 & (0
| D3D12_FORMAT_SUPPORT1_TEXTURE2D
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_2D
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+
+ support |= 0 != (data.Support1 & (0
| D3D12_FORMAT_SUPPORT1_TEXTURE3D
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_3D
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+
+ support |= 0 != (data.Support1 & (0
| D3D12_FORMAT_SUPPORT1_TEXTURECUBE
) )
- ? BGFX_CAPS_FORMAT_TEXTURE_COLOR
+ ? BGFX_CAPS_FORMAT_TEXTURE_CUBE
: BGFX_CAPS_FORMAT_TEXTURE_NONE
;
@@ -992,10 +1005,22 @@ namespace bgfx { namespace d3d12
{
support |= 0 != (data.Support1 & (0
| D3D12_FORMAT_SUPPORT1_TEXTURE2D
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+
+ support |= 0 != (data.Support1 & (0
| D3D12_FORMAT_SUPPORT1_TEXTURE3D
+ ) )
+ ? BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+
+ support |= 0 != (data.Support1 & (0
| D3D12_FORMAT_SUPPORT1_TEXTURECUBE
) )
- ? BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB
+ ? BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB
: BGFX_CAPS_FORMAT_TEXTURE_NONE
;
}
@@ -1120,7 +1145,7 @@ namespace bgfx { namespace d3d12
int64_t start = bx::getHPCounter();
HRESULT hr = 0;
- uint32_t syncInterval = !!(m_flags & BGFX_RESET_VSYNC);
+ uint32_t syncInterval = !!(m_resolution.m_flags & BGFX_RESET_VSYNC);
uint32_t flags = 0 == syncInterval ? DXGI_PRESENT_RESTART : 0;
for (uint32_t ii = 1, num = m_numWindows; ii < num && SUCCEEDED(hr); ++ii)
{
@@ -1249,6 +1274,65 @@ namespace bgfx { namespace d3d12
{
}
+ void readTexture(TextureHandle _handle, void* _data) BX_OVERRIDE
+ {
+ const TextureD3D12& texture = m_textures[_handle.idx];
+
+ D3D12_RESOURCE_DESC desc = texture.m_ptr->GetDesc();
+
+ D3D12_PLACED_SUBRESOURCE_FOOTPRINT layout;
+ uint32_t numRows;
+ uint64_t total;
+ uint64_t srcPitch;
+ m_device->GetCopyableFootprints(&desc
+ , 0
+ , 1
+ , 0
+ , &layout
+ , &numRows
+ , &srcPitch
+ , &total
+ );
+
+ ID3D12Resource* readback = createCommittedResource(m_device, HeapProperty::ReadBack, total);
+
+ D3D12_BOX box;
+ box.left = 0;
+ box.top = 0;
+ box.right = texture.m_width;
+ box.bottom = texture.m_height;
+ box.front = 0;
+ box.back = 1;
+
+ D3D12_TEXTURE_COPY_LOCATION dstLocation = { readback, D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT, { layout } };
+ D3D12_TEXTURE_COPY_LOCATION srcLocation = { texture.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {} };
+ m_commandList->CopyTextureRegion(&dstLocation, 0, 0, 0, &srcLocation, &box);
+
+ finish();
+ m_commandList = m_cmd.alloc();
+
+ uint8_t* src;
+ readback->Map(0, NULL, (void**)&src);
+
+ const uint8_t bpp = getBitsPerPixel(TextureFormat::Enum(texture.m_textureFormat) );
+ uint8_t* dst = (uint8_t*)_data;
+ uint32_t dstPitch = texture.m_width*bpp/8;
+
+ uint32_t pitch = bx::uint32_min(uint32_t(srcPitch), dstPitch);
+
+ for (uint32_t yy = 0, height = texture.m_height; yy < height; ++yy)
+ {
+ memcpy(dst, src, pitch);
+
+ src += srcPitch;
+ dst += dstPitch;
+ }
+
+ readback->Unmap(0, NULL);
+
+ DX_RELEASE(readback, 0);
+ }
+
void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE
{
TextureD3D12& texture = m_textures[_handle.idx];
@@ -1638,17 +1722,22 @@ data.NumQualityLevels = 0;
m_maxAnisotropy = 1;
}
- if ( (uint32_t)m_scd.BufferDesc.Width != _resolution.m_width
- || (uint32_t)m_scd.BufferDesc.Height != _resolution.m_height
- || m_flags != _resolution.m_flags)
+ uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY);
+
+ if (m_resolution.m_width != _resolution.m_width
+ || m_resolution.m_height != _resolution.m_height
+ || m_resolution.m_flags != flags)
{
- bool resize = (m_flags&BGFX_RESET_MSAA_MASK) == (_resolution.m_flags&BGFX_RESET_MSAA_MASK);
- m_flags = _resolution.m_flags;
+ flags &= ~BGFX_RESET_FORCE;
+
+ bool resize = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK) == (_resolution.m_flags&BGFX_RESET_MSAA_MASK);
+
+ m_resolution = _resolution;
+ m_resolution.m_flags = flags;
m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
m_textVideoMem.clear();
- m_resolution = _resolution;
m_scd.BufferDesc.Width = _resolution.m_width;
m_scd.BufferDesc.Height = _resolution.m_height;
@@ -1673,7 +1762,7 @@ data.NumQualityLevels = 0;
else
{
updateMsaa();
- m_scd.SampleDesc = s_msaa[(m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT];
+ m_scd.SampleDesc = s_msaa[(m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT];
DX_RELEASE(m_swapChain, 0);
@@ -2532,7 +2621,6 @@ data.NumQualityLevels = 0;
bool m_wireframe;
DXGI_SWAP_CHAIN_DESC m_scd;
- uint32_t m_flags;
uint32_t m_maxAnisotropy;
BufferD3D12 m_indexBuffers[BGFX_CONFIG_MAX_INDEX_BUFFERS];
@@ -2625,20 +2713,19 @@ data.NumQualityLevels = 0;
void* ScratchBufferD3D12::allocCbv(D3D12_GPU_VIRTUAL_ADDRESS& _gpuAddress, uint32_t _size)
{
_gpuAddress = m_gpuVA + m_pos;
- D3D12_CONSTANT_BUFFER_VIEW_DESC desc;
- desc.BufferLocation = _gpuAddress;
- desc.SizeInBytes = _size;
-
void* data = &m_data[m_pos];
m_pos += BX_ALIGN_256(_size);
- ID3D12Device* device = s_renderD3D12->m_device;
- device->CreateConstantBufferView(&desc
- , m_cpuHandle
- );
- m_cpuHandle.ptr += m_incrementSize;
- m_gpuHandle.ptr += m_incrementSize;
+// D3D12_CONSTANT_BUFFER_VIEW_DESC desc;
+// desc.BufferLocation = _gpuAddress;
+// desc.SizeInBytes = _size;
+// ID3D12Device* device = s_renderD3D12->m_device;
+// device->CreateConstantBufferView(&desc
+// , m_cpuHandle
+// );
+// m_cpuHandle.ptr += m_incrementSize;
+// m_gpuHandle.ptr += m_incrementSize;
return data;
}
@@ -3641,7 +3728,10 @@ data.NumQualityLevels = 0;
const uint32_t textureWidth = bx::uint32_max(blockInfo.blockWidth, imageContainer.m_width >>startLod);
const uint32_t textureHeight = bx::uint32_max(blockInfo.blockHeight, imageContainer.m_height>>startLod);
- m_flags = _flags;
+ m_flags = _flags;
+ m_width = textureWidth;
+ m_height = textureHeight;
+ m_depth = imageContainer.m_depth;
m_requestedFormat = (uint8_t)imageContainer.m_format;
m_textureFormat = (uint8_t)imageContainer.m_format;
@@ -4273,12 +4363,19 @@ data.NumQualityLevels = 0;
uint16_t currentSamplerStateIdx = invalidHandle;
uint16_t currentProgramIdx = invalidHandle;
+ uint32_t currentBindHash = 0;
bool hasPredefined = false;
- uint32_t currentBindHash = 0;
+ bool commandListChanged = false;
ID3D12PipelineState* currentPso = NULL;
SortKey key;
uint16_t view = UINT16_MAX;
FrameBufferHandle fbh = BGFX_INVALID_HANDLE;
+
+ BlitKey blitKey;
+ blitKey.decode(_render->m_blitKeys[0]);
+ uint16_t numBlitItems = _render->m_numBlitItems;
+ uint16_t blitItem = 0;
+
uint32_t blendFactor = 0;
const uint64_t primType = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0;
@@ -4384,6 +4481,75 @@ data.NumQualityLevels = 0;
}
prim = s_primInfo[BX_COUNTOF(s_primName)]; // Force primitive type update.
+
+ for (; blitItem < numBlitItems && blitKey.m_view <= view; blitItem++)
+ {
+ const BlitItem& blit = _render->m_blitItem[blitItem];
+ blitKey.decode(_render->m_blitKeys[blitItem+1]);
+
+ const TextureD3D12& src = m_textures[blit.m_src.idx];
+ const TextureD3D12& dst = m_textures[blit.m_dst.idx];
+
+ uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX;
+ uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY;
+ uint32_t srcDepth = bx::uint32_min(src.m_depth, blit.m_srcZ + blit.m_depth) - blit.m_srcZ;
+ uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX;
+ uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY;
+ uint32_t dstDepth = bx::uint32_min(dst.m_depth, blit.m_dstZ + blit.m_depth) - blit.m_dstZ;
+ uint32_t width = bx::uint32_min(srcWidth, dstWidth);
+ uint32_t height = bx::uint32_min(srcHeight, dstHeight);
+ uint32_t depth = bx::uint32_min(srcDepth, dstDepth);
+
+ if (TextureD3D12::Texture3D == src.m_type)
+ {
+ D3D12_BOX box;
+ box.left = blit.m_srcX;
+ box.top = blit.m_srcY;
+ box.front = blit.m_srcZ;
+ box.right = blit.m_srcX + width;
+ box.bottom = blit.m_srcY + height;;
+ box.back = blit.m_srcZ + bx::uint32_imax(1, depth);
+
+ D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { 0 } };
+ D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { 0 } };
+ m_commandList->CopyTextureRegion(&dstLocation
+ , blit.m_dstX
+ , blit.m_dstY
+ , blit.m_dstZ
+ , &srcLocation
+ , &box
+ );
+ }
+ else
+ {
+ D3D12_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.back = 1;
+
+ const uint32_t srcZ = TextureD3D12::TextureCube == src.m_type
+ ? blit.m_srcZ
+ : 0
+ ;
+ const uint32_t dstZ = TextureD3D12::TextureCube == dst.m_type
+ ? blit.m_dstZ
+ : 0
+ ;
+
+ D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { dstZ*dst.m_numMips+blit.m_dstMip } };
+ D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { srcZ*src.m_numMips+blit.m_srcMip } };
+ m_commandList->CopyTextureRegion(&dstLocation
+ , blit.m_dstX
+ , blit.m_dstY
+ , 0
+ , &srcLocation
+ , &box
+ );
+ }
+ }
}
if (isCompute)
@@ -4577,8 +4743,12 @@ data.NumQualityLevels = 0;
// PIX_BEGINEVENT(D3DCOLOR_RGBA(0xff, 0x00, 0x00, 0xff), viewNameW);
}
- currentSamplerStateIdx = invalidHandle;
- currentProgramIdx = invalidHandle;
+ commandListChanged = true;
+ }
+
+ if (commandListChanged)
+ {
+ commandListChanged = false;
m_commandList->SetGraphicsRootSignature(m_rootSignature);
ID3D12DescriptorHeap* heaps[] = {
@@ -4587,6 +4757,10 @@ data.NumQualityLevels = 0;
};
m_commandList->SetDescriptorHeaps(BX_COUNTOF(heaps), heaps);
+ currentPso = NULL;
+ currentBindHash = 0;
+ currentSamplerStateIdx = invalidHandle;
+ currentProgramIdx = invalidHandle;
currentState.clear();
currentState.m_scissor = !draw.m_scissor;
changedFlags = BGFX_STATE_MASK;
diff --git a/3rdparty/bgfx/src/renderer_d3d12.h b/3rdparty/bgfx/src/renderer_d3d12.h
index 00f9a17f89a..bf03858375a 100644
--- a/3rdparty/bgfx/src/renderer_d3d12.h
+++ b/3rdparty/bgfx/src/renderer_d3d12.h
@@ -272,6 +272,9 @@ namespace bgfx { namespace d3d12
ID3D12Resource* m_ptr;
D3D12_RESOURCE_STATES m_state;
uint32_t m_flags;
+ uint32_t m_width;
+ uint32_t m_height;
+ uint32_t m_depth;
uint16_t m_samplerIdx;
uint8_t m_type;
uint8_t m_requestedFormat;
@@ -341,9 +344,9 @@ namespace bgfx { namespace d3d12
uint64_t m_currentFence;
uint64_t m_completedFence;
ID3D12Fence* m_fence;
- CommandList m_commandList[32];
+ CommandList m_commandList[256];
typedef stl::vector<ID3D12Resource*> ResourceArray;
- ResourceArray m_release[32];
+ ResourceArray m_release[256];
bx::RingBufferControl m_control;
};
diff --git a/3rdparty/bgfx/src/renderer_d3d9.cpp b/3rdparty/bgfx/src/renderer_d3d9.cpp
index d14956ab49d..63423aa6a2b 100644
--- a/3rdparty/bgfx/src/renderer_d3d9.cpp
+++ b/3rdparty/bgfx/src/renderer_d3d9.cpp
@@ -258,13 +258,11 @@ namespace bgfx { namespace d3d9
{ D3DFMT_RAWZ, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, false },
};
-#if BGFX_CONFIG_RENDERER_DIRECT3D9EX
static const GUID IID_IDirect3D9 = { 0x81bdcbca, 0x64d4, 0x426d, { 0xae, 0x8d, 0xad, 0x1, 0x47, 0xf4, 0x27, 0x5c } };
static const GUID IID_IDirect3DDevice9Ex = { 0xb18b10ce, 0x2649, 0x405a, { 0x87, 0xf, 0x95, 0xf7, 0x77, 0xd4, 0x31, 0x3a } };
typedef HRESULT (WINAPI *Direct3DCreate9ExFn)(UINT SDKVersion, IDirect3D9Ex**);
static Direct3DCreate9ExFn Direct3DCreate9Ex;
-#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX
typedef IDirect3D9* (WINAPI *Direct3DCreate9Fn)(UINT SDKVersion);
static Direct3DCreate9Fn Direct3DCreate9;
static PFN_D3DPERF_SET_MARKER D3DPERF_SetMarker;
@@ -281,7 +279,6 @@ namespace bgfx { namespace d3d9
, m_captureTexture(NULL)
, m_captureSurface(NULL)
, m_captureResolve(NULL)
- , m_flags(BGFX_RESET_NONE)
, m_maxAnisotropy(1)
, m_initialized(false)
, m_amd(false)
@@ -362,18 +359,19 @@ namespace bgfx { namespace d3d9
, "Failed to initialize PIX events."
);
}
-#if BGFX_CONFIG_RENDERER_DIRECT3D9EX
- m_d3d9ex = NULL;
+
+ m_d3d9ex = NULL;
+ m_deviceEx = NULL;
Direct3DCreate9Ex = (Direct3DCreate9ExFn)bx::dlsym(m_d3d9dll, "Direct3DCreate9Ex");
- if (NULL != Direct3DCreate9Ex)
+ if (BX_ENABLED(BGFX_CONFIG_RENDERER_DIRECT3D9EX)
+ && NULL != Direct3DCreate9Ex)
{
Direct3DCreate9Ex(D3D_SDK_VERSION, &m_d3d9ex);
DX_CHECK(m_d3d9ex->QueryInterface(IID_IDirect3D9, (void**)&m_d3d9) );
m_pool = D3DPOOL_DEFAULT;
}
else
-#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX
{
Direct3DCreate9 = (Direct3DCreate9Fn)bx::dlsym(m_d3d9dll, "Direct3DCreate9");
BX_WARN(NULL != Direct3DCreate9, "Function Direct3DCreate9 not found.");
@@ -461,24 +459,29 @@ namespace bgfx { namespace d3d9
for (uint32_t ii = 0; ii < BX_COUNTOF(behaviorFlags) && NULL == m_device; ++ii)
{
-#if 0 // BGFX_CONFIG_RENDERER_DIRECT3D9EX
- DX_CHECK(m_d3d9->CreateDeviceEx(m_adapter
- , m_deviceType
- , g_platformHooks.nwh
- , behaviorFlags[ii]
- , &m_params
- , NULL
- , &m_device
- ) );
-#else
- DX_CHECK(m_d3d9->CreateDevice(m_adapter
- , m_deviceType
- , (HWND)g_platformData.nwh
- , behaviorFlags[ii]
- , &m_params
- , &m_device
- ));
-#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX
+ if (NULL != m_d3d9ex)
+ {
+ DX_CHECK(m_d3d9ex->CreateDeviceEx(m_adapter
+ , m_deviceType
+ , (HWND)g_platformData.nwh
+ , behaviorFlags[ii]
+ , &m_params
+ , NULL
+ , &m_deviceEx
+ ) );
+
+ m_device = m_deviceEx;
+ }
+ else
+ {
+ DX_CHECK(m_d3d9->CreateDevice(m_adapter
+ , m_deviceType
+ , (HWND)g_platformData.nwh
+ , behaviorFlags[ii]
+ , &m_params
+ , &m_device
+ ) );
+ }
}
}
@@ -493,12 +496,10 @@ namespace bgfx { namespace d3d9
m_numWindows = 1;
-#if BGFX_CONFIG_RENDERER_DIRECT3D9EX
if (NULL != m_d3d9ex)
{
DX_CHECK(m_device->QueryInterface(IID_IDirect3DDevice9Ex, (void**)&m_deviceEx) );
}
-#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX
DX_CHECK(m_device->GetDeviceCaps(&m_caps) );
@@ -528,14 +529,16 @@ namespace bgfx { namespace d3d9
BX_TRACE("Max vertex index: %d", m_caps.MaxVertexIndex);
g_caps.supported |= ( 0
- | BGFX_CAPS_TEXTURE_3D
- | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL
- | BGFX_CAPS_VERTEX_ATTRIB_HALF
- | BGFX_CAPS_VERTEX_ATTRIB_UINT10
- | BGFX_CAPS_FRAGMENT_DEPTH
- | BGFX_CAPS_SWAP_CHAIN
- | ( (UINT16_MAX < m_caps.MaxVertexIndex) ? BGFX_CAPS_INDEX32 : 0)
- );
+ | BGFX_CAPS_TEXTURE_3D
+ | BGFX_CAPS_TEXTURE_COMPARE_LEQUAL
+ | BGFX_CAPS_VERTEX_ATTRIB_HALF
+ | BGFX_CAPS_VERTEX_ATTRIB_UINT10
+ | BGFX_CAPS_FRAGMENT_DEPTH
+ | BGFX_CAPS_SWAP_CHAIN
+ | ( (UINT16_MAX < m_caps.MaxVertexIndex) ? BGFX_CAPS_INDEX32 : 0)
+ | ( (m_caps.DevCaps2 & D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES) ? BGFX_CAPS_TEXTURE_BLIT : 0)
+ | BGFX_CAPS_TEXTURE_READ_BACK
+ );
g_caps.maxTextureSize = uint16_t(bx::uint32_min(m_caps.MaxTextureWidth, m_caps.MaxTextureHeight) );
// g_caps.maxVertexIndex = m_caps.MaxVertexIndex;
@@ -580,13 +583,15 @@ namespace bgfx { namespace d3d9
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
{
- uint8_t support = SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter
+ 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_COLOR : BGFX_CAPS_FORMAT_TEXTURE_NONE;
+ ) ) ? BGFX_CAPS_FORMAT_TEXTURE_2D : BGFX_CAPS_FORMAT_TEXTURE_NONE;
support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter
, m_deviceType
@@ -594,7 +599,39 @@ namespace bgfx { namespace d3d9
, D3DUSAGE_QUERY_SRGBREAD
, D3DRTYPE_TEXTURE
, s_textureFormat[ii].m_fmt
- ) ) ? BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE;
+ ) ) ? 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
+ , 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
+ , 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
@@ -690,6 +727,17 @@ namespace bgfx { namespace d3d9
mbstowcs(s_viewNameW[ii], name, BGFX_CONFIG_MAX_VIEW_NAME_RESERVED);
}
+ if (NULL != m_deviceEx)
+ {
+ int32_t gpuPriority;
+ DX_CHECK(m_deviceEx->GetGPUThreadPriority(&gpuPriority) );
+ BX_TRACE("GPU thread priority: %d", gpuPriority);
+
+ uint32_t maxLatency;
+ DX_CHECK(m_deviceEx->GetMaximumFrameLatency(&maxLatency) );
+ BX_TRACE("GPU max frame latency: %d", maxLatency);
+ }
+
postReset();
m_initialized = true;
@@ -700,27 +748,23 @@ namespace bgfx { namespace d3d9
switch (errorState)
{
case ErrorState::CreatedDevice:
-#if BGFX_CONFIG_RENDERER_DIRECT3D9EX
if (NULL != m_d3d9ex)
{
DX_RELEASE(m_deviceEx, 1);
DX_RELEASE(m_device, 0);
}
else
-#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX
{
DX_RELEASE(m_device, 0);
}
case ErrorState::CreatedD3D9:
-#if BGFX_CONFIG_RENDERER_DIRECT3D9EX
if (NULL != m_d3d9ex)
{
DX_RELEASE(m_d3d9, 1);
DX_RELEASE(m_d3d9ex, 0);
}
else
-#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX
{
DX_RELEASE(m_d3d9, 0);
}
@@ -766,7 +810,6 @@ namespace bgfx { namespace d3d9
m_vertexDecls[ii].destroy();
}
-#if BGFX_CONFIG_RENDERER_DIRECT3D9EX
if (NULL != m_d3d9ex)
{
DX_RELEASE(m_deviceEx, 1);
@@ -775,7 +818,6 @@ namespace bgfx { namespace d3d9
DX_RELEASE(m_d3d9ex, 0);
}
else
-#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX
{
DX_RELEASE(m_device, 0);
DX_RELEASE(m_d3d9, 0);
@@ -795,6 +837,11 @@ namespace bgfx { namespace d3d9
const char* getRendererName() const BX_OVERRIDE
{
+ if (NULL != m_d3d9ex)
+ {
+ return BGFX_RENDERER_DIRECT3D9_NAME " Ex";
+ }
+
return BGFX_RENDERER_DIRECT3D9_NAME;
}
@@ -901,6 +948,37 @@ namespace bgfx { namespace d3d9
m_updateTexture = NULL;
}
+ void readTexture(TextureHandle _handle, void* _data) BX_OVERRIDE
+ {
+ TextureD3D9& texture = m_textures[_handle.idx];
+
+ D3DLOCKED_RECT lockedRect;
+ DX_CHECK(texture.m_texture2d->LockRect(0
+ , &lockedRect
+ , NULL
+ , D3DLOCK_NO_DIRTY_UPDATE|D3DLOCK_NOSYSLOCK|D3DLOCK_READONLY
+ ) );
+
+ uint32_t srcPitch = lockedRect.Pitch;
+ uint8_t* src = (uint8_t*)lockedRect.pBits;
+
+ const uint8_t bpp = getBitsPerPixel(TextureFormat::Enum(texture.m_textureFormat) );
+ uint8_t* dst = (uint8_t*)_data;
+ uint32_t dstPitch = texture.m_width*bpp/8;
+
+ uint32_t pitch = bx::uint32_min(srcPitch, dstPitch);
+
+ for (uint32_t yy = 0, height = texture.m_height; yy < height; ++yy)
+ {
+ memcpy(dst, src, pitch);
+
+ src += srcPitch;
+ dst += dstPitch;
+ }
+
+ DX_CHECK(texture.m_texture2d->UnlockRect(0) );
+ }
+
void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE
{
TextureD3D9& texture = m_textures[_handle.idx];
@@ -1141,11 +1219,14 @@ namespace bgfx { namespace d3d9
;
uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY);
- if (m_params.BackBufferWidth != _resolution.m_width
- || m_params.BackBufferHeight != _resolution.m_height
- || m_flags != flags)
+ if (m_resolution.m_width != _resolution.m_width
+ || m_resolution.m_height != _resolution.m_height
+ || m_resolution.m_flags != flags)
{
- m_flags = flags;
+ flags &= ~BGFX_RESET_FORCE;
+
+ m_resolution = _resolution;
+ m_resolution.m_flags = flags;
m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
m_textVideoMem.clear();
@@ -1162,17 +1243,15 @@ namespace bgfx { namespace d3d9
m_params.BackBufferWidth = _resolution.m_width;
m_params.BackBufferHeight = _resolution.m_height;
- m_params.FullScreen_RefreshRateInHz = BGFX_RESET_FULLSCREEN == (m_flags&BGFX_RESET_FULLSCREEN_MASK) ? 60 : 0;
- m_params.PresentationInterval = !!(m_flags&BGFX_RESET_VSYNC) ? D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE;
+ m_params.FullScreen_RefreshRateInHz = BGFX_RESET_FULLSCREEN == (m_resolution.m_flags&BGFX_RESET_FULLSCREEN_MASK) ? 60 : 0;
+ m_params.PresentationInterval = !!(m_resolution.m_flags&BGFX_RESET_VSYNC) ? D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE;
updateMsaa();
- Msaa& msaa = s_msaa[(m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT];
+ Msaa& msaa = s_msaa[(m_resolution.m_flags&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT];
m_params.MultiSampleType = msaa.m_type;
m_params.MultiSampleQuality = msaa.m_quality;
- m_resolution = _resolution;
-
preReset();
DX_CHECK(m_device->Reset(&m_params) );
postReset();
@@ -1198,7 +1277,7 @@ namespace bgfx { namespace d3d9
}
DX_CHECK(m_device->SetDepthStencilSurface(m_backBufferDepthStencil) );
- DX_CHECK(m_device->SetRenderState(D3DRS_SRGBWRITEENABLE, 0 != (m_flags & BGFX_RESET_SRGB_BACKBUFFER) ) );
+ DX_CHECK(m_device->SetRenderState(D3DRS_SRGBWRITEENABLE, 0 != (m_resolution.m_flags & BGFX_RESET_SRGB_BACKBUFFER) ) );
}
else
{
@@ -1279,12 +1358,10 @@ namespace bgfx { namespace d3d9
{
if (NULL != m_swapChain)
{
-#if BGFX_CONFIG_RENDERER_DIRECT3D9EX
if (NULL != m_deviceEx)
{
DX_CHECK(m_deviceEx->WaitForVBlank(0) );
}
-#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX
for (uint32_t ii = 0, num = m_numWindows; ii < num; ++ii)
{
@@ -1481,7 +1558,7 @@ namespace bgfx { namespace d3d9
void capturePostReset()
{
- if (m_flags&BGFX_RESET_CAPTURE)
+ if (m_resolution.m_flags&BGFX_RESET_CAPTURE)
{
uint32_t width = m_params.BackBufferWidth;
uint32_t height = m_params.BackBufferHeight;
@@ -1857,10 +1934,8 @@ namespace bgfx { namespace d3d9
D3DCAPS9 m_caps;
#endif // BX_PLATFORM_WINDOWS
-#if BGFX_CONFIG_RENDERER_DIRECT3D9EX
IDirect3D9Ex* m_d3d9ex;
IDirect3DDevice9Ex* m_deviceEx;
-#endif // BGFX_CONFIG_RENDERER_DIRECT3D9EX
IDirect3D9* m_d3d9;
IDirect3DDevice9* m_device;
@@ -1885,7 +1960,6 @@ namespace bgfx { namespace d3d9
uint32_t m_adapter;
D3DDEVTYPE m_deviceType;
D3DPRESENT_PARAMETERS m_params;
- uint32_t m_flags;
uint32_t m_maxAnisotropy;
D3DADAPTER_IDENTIFIER9 m_identifier;
Resolution m_resolution;
@@ -2290,27 +2364,31 @@ namespace bgfx { namespace d3d9
void TextureD3D9::createTexture(uint32_t _width, uint32_t _height, uint8_t _numMips)
{
- m_width = (uint16_t)_width;
- m_height = (uint16_t)_height;
- m_numMips = _numMips;
m_type = Texture2D;
const TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat;
DWORD usage = 0;
- D3DPOOL pool = s_renderD3D9->m_pool;
+ D3DPOOL pool = D3DPOOL_DEFAULT;
const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK);
+ const bool blit = 0 != (m_flags&BGFX_TEXTURE_BLIT_DST);
+ const bool readBack = 0 != (m_flags&BGFX_TEXTURE_READ_BACK);
if (isDepth(fmt) )
{
usage = D3DUSAGE_DEPTHSTENCIL;
- pool = D3DPOOL_DEFAULT;
}
- else if (renderTarget)
+ else if (readBack)
+ {
+ usage = 0;
+ pool = D3DPOOL_SYSTEMMEM;
+ }
+ else if (renderTarget || blit)
{
usage = D3DUSAGE_RENDERTARGET;
- pool = D3DPOOL_DEFAULT;
}
+ IDirect3DDevice9* device = s_renderD3D9->m_device;
+
if (renderTarget)
{
uint32_t msaaQuality = ( (m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT);
@@ -2325,7 +2403,7 @@ namespace bgfx { namespace d3d9
if (isDepth(fmt) )
{
- DX_CHECK(s_renderD3D9->m_device->CreateDepthStencilSurface(
+ DX_CHECK(device->CreateDepthStencilSurface(
m_width
, m_height
, s_textureFormat[m_textureFormat].m_fmt
@@ -2338,7 +2416,7 @@ namespace bgfx { namespace d3d9
}
else
{
- DX_CHECK(s_renderD3D9->m_device->CreateRenderTarget(
+ DX_CHECK(device->CreateRenderTarget(
m_width
, m_height
, s_textureFormat[m_textureFormat].m_fmt
@@ -2359,7 +2437,7 @@ namespace bgfx { namespace d3d9
}
}
- DX_CHECK(s_renderD3D9->m_device->CreateTexture(_width
+ DX_CHECK(device->CreateTexture(_width
, _height
, _numMips
, usage
@@ -2369,6 +2447,28 @@ namespace bgfx { namespace d3d9
, NULL
) );
+ if (!renderTarget
+ && !readBack)
+ {
+ if (NULL == m_staging)
+ {
+ DX_CHECK(device->CreateTexture(_width
+ , _height
+ , _numMips
+ , 0
+ , s_textureFormat[fmt].m_fmt
+ , D3DPOOL_SYSTEMMEM
+ , &m_staging2d
+ , NULL
+ ) );
+ }
+ else
+ {
+ DX_CHECK(m_staging2d->AddDirtyRect(NULL));
+ DX_CHECK(device->UpdateTexture(m_staging2d, m_texture2d));
+ }
+ }
+
BGFX_FATAL(NULL != m_texture2d, Fatal::UnableToCreateTexture, "Failed to create texture (size: %dx%d, mips: %d, fmt: %d)."
, _width
, _height
@@ -2377,22 +2477,42 @@ namespace bgfx { namespace d3d9
);
}
- void TextureD3D9::createVolumeTexture(uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _numMips)
+ void TextureD3D9::createVolumeTexture(uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips)
{
m_type = Texture3D;
const TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat;
- DX_CHECK(s_renderD3D9->m_device->CreateVolumeTexture(_width
+ IDirect3DDevice9* device = s_renderD3D9->m_device;
+ DX_CHECK(device->CreateVolumeTexture(_width
, _height
, _depth
, _numMips
, 0
, s_textureFormat[fmt].m_fmt
- , s_renderD3D9->m_pool
+ , D3DPOOL_DEFAULT
, &m_texture3d
, NULL
) );
+ if (NULL == m_staging)
+ {
+ DX_CHECK(device->CreateVolumeTexture(_width
+ , _height
+ , _depth
+ , _numMips
+ , 0
+ , s_textureFormat[fmt].m_fmt
+ , D3DPOOL_SYSTEMMEM
+ , &m_staging3d
+ , NULL
+ ) );
+ }
+ else
+ {
+ DX_CHECK(m_staging3d->AddDirtyBox(NULL) );
+ DX_CHECK(device->UpdateTexture(m_staging3d, m_texture3d) );
+ }
+
BGFX_FATAL(NULL != m_texture3d, Fatal::UnableToCreateTexture, "Failed to create volume texture (size: %dx%dx%d, mips: %d, fmt: %s)."
, _width
, _height
@@ -2402,22 +2522,59 @@ namespace bgfx { namespace d3d9
);
}
- void TextureD3D9::createCubeTexture(uint32_t _edge, uint32_t _numMips)
+ void TextureD3D9::createCubeTexture(uint32_t _width, uint8_t _numMips)
{
m_type = TextureCube;
const TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat;
- DX_CHECK(s_renderD3D9->m_device->CreateCubeTexture(_edge
+ DWORD usage = 0;
+
+ const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK);
+ const bool blit = 0 != (m_flags&BGFX_TEXTURE_BLIT_DST);
+ if (isDepth(fmt) )
+ {
+ usage = D3DUSAGE_DEPTHSTENCIL;
+ }
+ else if (renderTarget || blit)
+ {
+ usage = D3DUSAGE_RENDERTARGET;
+ }
+
+ IDirect3DDevice9* device = s_renderD3D9->m_device;
+ DX_CHECK(device->CreateCubeTexture(_width
, _numMips
- , 0
+ , usage
, s_textureFormat[fmt].m_fmt
- , s_renderD3D9->m_pool
+ , D3DPOOL_DEFAULT
, &m_textureCube
, NULL
) );
+ if (!renderTarget)
+ {
+ if (NULL == m_staging)
+ {
+ DX_CHECK(device->CreateCubeTexture(_width
+ , _numMips
+ , 0
+ , s_textureFormat[fmt].m_fmt
+ , D3DPOOL_SYSTEMMEM
+ , &m_stagingCube
+ , NULL
+ ) );
+ }
+ else
+ {
+ for (uint8_t ii = 0; ii < 6; ++ii)
+ {
+ DX_CHECK(m_stagingCube->AddDirtyRect(D3DCUBEMAP_FACES(ii), NULL) );
+ }
+ DX_CHECK(device->UpdateTexture(m_stagingCube, m_textureCube) );
+ }
+ }
+
BGFX_FATAL(NULL != m_textureCube, Fatal::UnableToCreateTexture, "Failed to create cube texture (edge: %d, mips: %d, fmt: %s)."
- , _edge
+ , _width
, _numMips
, getName(fmt)
);
@@ -2438,11 +2595,13 @@ namespace bgfx { namespace d3d9
rect.top = _rect->m_y;
rect.right = rect.left + _rect->m_width;
rect.bottom = rect.top + _rect->m_height;
- DX_CHECK(m_texture2d->LockRect(_lod, &lockedRect, &rect, 0) );
+ DX_CHECK(m_staging2d->LockRect(_lod, &lockedRect, &rect, 0) );
+ DX_CHECK(m_staging2d->AddDirtyRect(&rect) );
}
else
{
- DX_CHECK(m_texture2d->LockRect(_lod, &lockedRect, NULL, 0) );
+ DX_CHECK(m_staging2d->LockRect(_lod, &lockedRect, NULL, 0) );
+ DX_CHECK(m_staging2d->AddDirtyRect(NULL) );
}
_pitch = lockedRect.Pitch;
@@ -2453,8 +2612,9 @@ namespace bgfx { namespace d3d9
case Texture3D:
{
D3DLOCKED_BOX box;
- DX_CHECK(m_texture3d->LockBox(_lod, &box, NULL, 0) );
- _pitch = box.RowPitch;
+ DX_CHECK(m_staging3d->LockBox(_lod, &box, NULL, 0) );
+ DX_CHECK(m_staging3d->AddDirtyBox(NULL) );
+ _pitch = box.RowPitch;
_slicePitch = box.SlicePitch;
return (uint8_t*)box.pBits;
}
@@ -2466,15 +2626,17 @@ namespace bgfx { namespace d3d9
if (NULL != _rect)
{
RECT rect;
- rect.left = _rect->m_x;
- rect.top = _rect->m_y;
- rect.right = rect.left + _rect->m_width;
+ rect.left = _rect->m_x;
+ rect.top = _rect->m_y;
+ rect.right = rect.left + _rect->m_width;
rect.bottom = rect.top + _rect->m_height;
- DX_CHECK(m_textureCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, &rect, 0) );
+ DX_CHECK(m_stagingCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, &rect, 0) );
+ DX_CHECK(m_textureCube->AddDirtyRect(D3DCUBEMAP_FACES(_side), &rect) );
}
else
{
- DX_CHECK(m_textureCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, NULL, 0) );
+ DX_CHECK(m_stagingCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, NULL, 0) );
+ DX_CHECK(m_textureCube->AddDirtyRect(D3DCUBEMAP_FACES(_side), NULL) );
}
_pitch = lockedRect.Pitch;
@@ -2484,30 +2646,35 @@ namespace bgfx { namespace d3d9
}
BX_CHECK(false, "You should not be here.");
- _pitch = 0;
+ _pitch = 0;
_slicePitch = 0;
return NULL;
}
void TextureD3D9::unlock(uint8_t _side, uint8_t _lod)
{
+ IDirect3DDevice9* device = s_renderD3D9->m_device;
+
switch (m_type)
{
case Texture2D:
{
- DX_CHECK(m_texture2d->UnlockRect(_lod) );
+ DX_CHECK(m_staging2d->UnlockRect(_lod) );
+ DX_CHECK(device->UpdateTexture(m_staging2d, m_texture2d) );
}
return;
case Texture3D:
{
- DX_CHECK(m_texture3d->UnlockBox(_lod) );
+ DX_CHECK(m_staging3d->UnlockBox(_lod) );
+ DX_CHECK(device->UpdateTexture(m_staging3d, m_texture3d) );
}
return;
case TextureCube:
{
- DX_CHECK(m_textureCube->UnlockRect(D3DCUBEMAP_FACES(_side), _lod) );
+ DX_CHECK(m_stagingCube->UnlockRect(D3DCUBEMAP_FACES(_side), _lod) );
+ DX_CHECK(device->UpdateTexture(m_stagingCube, m_textureCube) );
}
return;
}
@@ -2522,9 +2689,9 @@ namespace bgfx { namespace d3d9
case Texture2D:
{
RECT rect;
- rect.left = _rect.m_x;
- rect.top = _rect.m_y;
- rect.right = rect.left + _rect.m_width;
+ rect.left = _rect.m_x;
+ rect.top = _rect.m_y;
+ rect.right = rect.left + _rect.m_width;
rect.bottom = rect.top + _rect.m_height;
DX_CHECK(m_texture2d->AddDirtyRect(&rect) );
}
@@ -2533,12 +2700,12 @@ namespace bgfx { namespace d3d9
case Texture3D:
{
D3DBOX box;
- box.Left = _rect.m_x;
- box.Top = _rect.m_y;
- box.Right = box.Left + _rect.m_width;
+ box.Left = _rect.m_x;
+ box.Top = _rect.m_y;
+ box.Right = box.Left + _rect.m_width;
box.Bottom = box.Top + _rect.m_height;
- box.Front = _z;
- box.Back = box.Front + _depth;
+ box.Front = _z;
+ box.Back = box.Front + _depth;
DX_CHECK(m_texture3d->AddDirtyBox(&box) );
}
return;
@@ -2546,9 +2713,9 @@ namespace bgfx { namespace d3d9
case TextureCube:
{
RECT rect;
- rect.left = _rect.m_x;
- rect.top = _rect.m_y;
- rect.right = rect.left + _rect.m_width;
+ rect.left = _rect.m_x;
+ rect.top = _rect.m_y;
+ rect.right = rect.left + _rect.m_width;
rect.bottom = rect.top + _rect.m_height;
DX_CHECK(m_textureCube->AddDirtyRect(D3DCUBEMAP_FACES(_side), &rect) );
}
@@ -2558,6 +2725,28 @@ namespace bgfx { namespace d3d9
BX_CHECK(false, "You should not be here.");
}
+ IDirect3DSurface9* TextureD3D9::getSurface(uint8_t _side, uint8_t _mip) const
+ {
+ IDirect3DSurface9* surface = NULL;
+
+ switch (m_type)
+ {
+ case Texture2D:
+ DX_CHECK(m_texture2d->GetSurfaceLevel(_mip, &surface) );
+ break;
+
+ case Texture3D:
+ BX_CHECK(false, "");
+ break;
+
+ case TextureCube:
+ DX_CHECK(m_textureCube->GetCubeMapSurface(D3DCUBEMAP_FACES(_side), _mip, &surface) );
+ break;
+ }
+
+ return surface;
+ }
+
void TextureD3D9::create(const Memory* _mem, uint32_t _flags, uint8_t _skip)
{
ImageContainer imageContainer;
@@ -2571,7 +2760,11 @@ namespace bgfx { namespace d3d9
const uint32_t textureWidth = bx::uint32_max(blockInfo.blockWidth, imageContainer.m_width >>startLod);
const uint32_t textureHeight = bx::uint32_max(blockInfo.blockHeight, imageContainer.m_height>>startLod);
- m_flags = _flags;
+ m_flags = _flags;
+ m_width = textureWidth;
+ m_height = textureHeight;
+ m_depth = imageContainer.m_depth;
+ m_numMips = numMips;
m_requestedFormat = imageContainer.m_format;
m_textureFormat = imageContainer.m_format;
@@ -2777,8 +2970,7 @@ namespace bgfx { namespace d3d9
if (NULL != m_surface
&& NULL != m_texture2d)
{
- IDirect3DSurface9* surface;
- DX_CHECK(m_texture2d->GetSurfaceLevel(0, &surface) );
+ IDirect3DSurface9* surface = getSurface();
DX_CHECK(s_renderD3D9->m_device->StretchRect(m_surface
, NULL
, surface
@@ -2792,8 +2984,7 @@ namespace bgfx { namespace d3d9
void TextureD3D9::preReset()
{
TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat;
- if (TextureFormat::Unknown != fmt
- && (isDepth(fmt) || !!(m_flags&BGFX_TEXTURE_RT_MASK) ) )
+ if (TextureFormat::Unknown != fmt)
{
DX_RELEASE(m_ptr, 0);
DX_RELEASE(m_surface, 0);
@@ -2803,10 +2994,23 @@ namespace bgfx { namespace d3d9
void TextureD3D9::postReset()
{
TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat;
- if (TextureFormat::Unknown != fmt
- && (isDepth(fmt) || !!(m_flags&BGFX_TEXTURE_RT_MASK) ) )
+ if (TextureFormat::Unknown != fmt)
{
- createTexture(m_width, m_height, m_numMips);
+ switch (m_type)
+ {
+ default:
+ case Texture2D:
+ createTexture(m_width, m_height, m_numMips);
+ break;
+
+ case Texture3D:
+ createVolumeTexture(m_width, m_height, m_depth, m_numMips);
+ break;
+
+ case TextureCube:
+ createCubeTexture(m_width, m_numMips);
+ break;
+ }
}
}
@@ -2837,7 +3041,7 @@ namespace bgfx { namespace d3d9
}
else
{
- DX_CHECK(texture.m_texture2d->GetSurfaceLevel(0, &m_depthStencil) );
+ m_depthStencil = texture.getSurface();
}
}
else
@@ -2850,7 +3054,7 @@ namespace bgfx { namespace d3d9
}
else
{
- DX_CHECK(texture.m_texture2d->GetSurfaceLevel(0, &m_color[m_num]) );
+ m_color[m_num] = texture.getSurface();
}
m_num++;
}
@@ -3038,7 +3242,7 @@ namespace bgfx { namespace d3d9
}
else
{
- DX_CHECK(texture.m_texture2d->GetSurfaceLevel(0, &m_color[ii]) );
+ m_color[ii] = texture.getSurface();
}
}
}
@@ -3053,7 +3257,7 @@ namespace bgfx { namespace d3d9
}
else
{
- DX_CHECK(texture.m_texture2d->GetSurfaceLevel(0, &m_depthStencil) );
+ m_depthStencil = texture.getSurface();
}
if (0 == m_num)
@@ -3124,8 +3328,8 @@ namespace bgfx { namespace d3d9
{
Frame& frame = m_frame[m_control.m_current];
frame.m_disjoint->Issue(D3DISSUE_END);
- frame.m_end->Issue(D3DISSUE_END);
frame.m_freq->Issue(D3DISSUE_END);
+ frame.m_end->Issue(D3DISSUE_END);
m_control.commit(1);
}
@@ -3135,8 +3339,8 @@ namespace bgfx { namespace d3d9
{
Frame& frame = m_frame[m_control.m_read];
- uint64_t freq;
- HRESULT hr = frame.m_freq->GetData(&freq, sizeof(freq), 0);
+ uint64_t timeEnd;
+ HRESULT hr = frame.m_end->GetData(&timeEnd, sizeof(timeEnd), 0);
if (S_OK == hr)
{
m_control.consume(1);
@@ -3144,8 +3348,8 @@ namespace bgfx { namespace d3d9
uint64_t timeStart;
DX_CHECK(frame.m_start->GetData(&timeStart, sizeof(timeStart), 0) );
- uint64_t timeEnd;
- DX_CHECK(frame.m_end->GetData(&timeEnd, sizeof(timeEnd), 0) );
+ uint64_t freq;
+ DX_CHECK(frame.m_freq->GetData(&freq, sizeof(freq), 0) );
m_frequency = freq;
m_elapsed = timeEnd - timeStart;
@@ -3202,6 +3406,11 @@ namespace bgfx { namespace d3d9
FrameBufferHandle fbh = BGFX_INVALID_HANDLE;
uint32_t blendFactor = 0;
+ BlitKey blitKey;
+ blitKey.decode(_render->m_blitKeys[0]);
+ uint16_t numBlitItems = _render->m_numBlitItems;
+ uint16_t blitItem = 0;
+
uint8_t primIndex;
{
const uint64_t pt = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0;
@@ -3293,6 +3502,57 @@ namespace bgfx { namespace d3d9
DX_CHECK(device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE) );
DX_CHECK(device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE) );
DX_CHECK(device->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATER) );
+
+ for (; blitItem < numBlitItems && blitKey.m_view <= view; blitItem++)
+ {
+ const BlitItem& blit = _render->m_blitItem[blitItem];
+ blitKey.decode(_render->m_blitKeys[blitItem+1]);
+
+ const TextureD3D9& src = m_textures[blit.m_src.idx];
+ const TextureD3D9& dst = m_textures[blit.m_dst.idx];
+
+ uint32_t srcWidth = bx::uint32_min(src.m_width, blit.m_srcX + blit.m_width) - blit.m_srcX;
+ uint32_t srcHeight = bx::uint32_min(src.m_height, blit.m_srcY + blit.m_height) - blit.m_srcY;
+ uint32_t dstWidth = bx::uint32_min(dst.m_width, blit.m_dstX + blit.m_width) - blit.m_dstX;
+ uint32_t dstHeight = bx::uint32_min(dst.m_height, blit.m_dstY + blit.m_height) - blit.m_dstY;
+ uint32_t width = bx::uint32_min(srcWidth, dstWidth);
+ uint32_t height = bx::uint32_min(srcHeight, dstHeight);
+
+ RECT srcRect = { LONG(blit.m_srcX), LONG(blit.m_srcY), LONG(blit.m_srcX + width), LONG(blit.m_srcY + height) };
+ RECT dstRect = { LONG(blit.m_dstX), LONG(blit.m_dstY), LONG(blit.m_dstX + width), LONG(blit.m_dstY + height) };
+
+ IDirect3DSurface9* srcSurface = src.getSurface(uint8_t(blit.m_srcZ), blit.m_srcMip);
+ IDirect3DSurface9* dstSurface = dst.getSurface(uint8_t(blit.m_dstZ), blit.m_dstMip);
+
+ // UpdateSurface (pool src: SYSTEMMEM, dst: DEFAULT)
+ // s/d T RTT RT
+ // T y y y
+ // RTT - - -
+ // RT - - -
+ //
+ // StretchRect (pool src and dst must be DEFAULT)
+ // s/d T RTT RT
+ // T - y y
+ // RTT - y y
+ // RT - y y
+ //
+ // GetRenderTargetData (dst must be SYSTEMMEM)
+
+ HRESULT hr = m_device->StretchRect(srcSurface
+ , &srcRect
+ , dstSurface
+ , &dstRect
+ , D3DTEXF_NONE
+ );
+ if (FAILED(hr) )
+ {
+ hr = m_device->GetRenderTargetData(srcSurface, dstSurface);
+ BX_WARN(SUCCEEDED(hr), "StretchRect and GetRenderTargetData failed %x.", hr);
+ }
+
+ srcSurface->Release();
+ dstSurface->Release();
+ }
}
uint16_t scissor = draw.m_scissor;
diff --git a/3rdparty/bgfx/src/renderer_d3d9.h b/3rdparty/bgfx/src/renderer_d3d9.h
index 58676cec900..ea649dd8f15 100644
--- a/3rdparty/bgfx/src/renderer_d3d9.h
+++ b/3rdparty/bgfx/src/renderer_d3d9.h
@@ -6,13 +6,10 @@
#ifndef BGFX_RENDERER_D3D9_H_HEADER_GUARD
#define BGFX_RENDERER_D3D9_H_HEADER_GUARD
-#define BGFX_CONFIG_RENDERER_DIRECT3D9EX (BX_PLATFORM_WINDOWS && 0)
+#define BGFX_CONFIG_RENDERER_DIRECT3D9EX BX_PLATFORM_WINDOWS
#if BX_PLATFORM_WINDOWS
# include <sal.h>
-# if !BGFX_CONFIG_RENDERER_DIRECT3D9EX
-//# define D3D_DISABLE_9EX
-# endif // !BGFX_CONFIG_RENDERER_DIRECT3D9EX
# include <d3d9.h>
#elif BX_PLATFORM_XBOX360
@@ -310,17 +307,19 @@ namespace bgfx { namespace d3d9
TextureD3D9()
: m_ptr(NULL)
, m_surface(NULL)
+ , m_staging(NULL)
, m_textureFormat(TextureFormat::Unknown)
{
}
void createTexture(uint32_t _width, uint32_t _height, uint8_t _numMips);
- void createVolumeTexture(uint32_t _width, uint32_t _height, uint32_t _depth, uint32_t _numMips);
- void createCubeTexture(uint32_t _edge, uint32_t _numMips);
+ void createVolumeTexture(uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _numMips);
+ void createCubeTexture(uint32_t _width, uint8_t _numMips);
uint8_t* lock(uint8_t _side, uint8_t _lod, uint32_t& _pitch, uint32_t& _slicePitch, const Rect* _rect = NULL);
void unlock(uint8_t _side, uint8_t _lod);
void dirty(uint8_t _side, const Rect& _rect, uint16_t _z, uint16_t _depth);
+ IDirect3DSurface9* getSurface(uint8_t _side = 0, uint8_t _mip = 0) const;
void create(const Memory* _mem, uint32_t _flags, uint8_t _skip);
@@ -328,6 +327,7 @@ namespace bgfx { namespace d3d9
{
DX_RELEASE(m_ptr, 0);
DX_RELEASE(m_surface, 0);
+ DX_RELEASE(m_staging, 0);
m_textureFormat = TextureFormat::Unknown;
}
@@ -349,9 +349,18 @@ namespace bgfx { namespace d3d9
};
IDirect3DSurface9* m_surface;
+
+ union
+ {
+ IDirect3DBaseTexture9* m_staging;
+ IDirect3DTexture9* m_staging2d;
+ IDirect3DVolumeTexture9* m_staging3d;
+ IDirect3DCubeTexture9* m_stagingCube;
+ };
uint32_t m_flags;
- uint16_t m_width;
- uint16_t m_height;
+ uint32_t m_width;
+ uint32_t m_height;
+ uint32_t m_depth;
uint8_t m_numMips;
uint8_t m_type;
uint8_t m_requestedFormat;
diff --git a/3rdparty/bgfx/src/renderer_gl.cpp b/3rdparty/bgfx/src/renderer_gl.cpp
index 557614ef960..0a684f57c22 100644
--- a/3rdparty/bgfx/src/renderer_gl.cpp
+++ b/3rdparty/bgfx/src/renderer_gl.cpp
@@ -441,6 +441,7 @@ namespace bgfx { namespace gl
ARB_compute_shader,
ARB_conservative_depth,
+ ARB_copy_image,
ARB_debug_label,
ARB_debug_output,
ARB_depth_buffer_float,
@@ -499,6 +500,7 @@ namespace bgfx { namespace gl
EXT_blend_subtract,
EXT_color_buffer_half_float,
EXT_color_buffer_float,
+ EXT_copy_image,
EXT_compressed_ETC1_RGB8_sub_texture,
EXT_debug_label,
EXT_debug_marker,
@@ -554,10 +556,12 @@ namespace bgfx { namespace gl
MOZ_WEBGL_compressed_texture_s3tc,
MOZ_WEBGL_depth_texture,
- NV_texture_border_clamp,
+ NV_copy_image,
NV_draw_buffers,
+ NV_texture_border_clamp,
NVX_gpu_memory_info,
+ OES_copy_image,
OES_compressed_ETC1_RGB8_texture,
OES_depth24,
OES_depth32,
@@ -640,6 +644,7 @@ namespace bgfx { namespace gl
{ "ARB_compute_shader", BGFX_CONFIG_RENDERER_OPENGL >= 43, true },
{ "ARB_conservative_depth", BGFX_CONFIG_RENDERER_OPENGL >= 42, true },
+ { "ARB_copy_image", BGFX_CONFIG_RENDERER_OPENGL >= 42, true },
{ "ARB_debug_label", false, true },
{ "ARB_debug_output", BGFX_CONFIG_RENDERER_OPENGL >= 43, true },
{ "ARB_depth_buffer_float", BGFX_CONFIG_RENDERER_OPENGL >= 33, true },
@@ -698,6 +703,7 @@ namespace bgfx { namespace gl
{ "EXT_blend_subtract", BGFX_CONFIG_RENDERER_OPENGL >= 14, true },
{ "EXT_color_buffer_half_float", false, true }, // GLES2 extension.
{ "EXT_color_buffer_float", false, true }, // GLES2 extension.
+ { "EXT_copy_image", false, true }, // GLES2 extension.
{ "EXT_compressed_ETC1_RGB8_sub_texture", false, true }, // GLES2 extension.
{ "EXT_debug_label", false, true },
{ "EXT_debug_marker", false, true },
@@ -753,10 +759,12 @@ namespace bgfx { namespace gl
{ "MOZ_WEBGL_compressed_texture_s3tc", false, true },
{ "MOZ_WEBGL_depth_texture", false, true },
- { "NV_texture_border_clamp", false, true }, // GLES2 extension.
+ { "NV_copy_image", false, true },
{ "NV_draw_buffers", false, true }, // GLES2 extension.
+ { "NV_texture_border_clamp", false, true }, // GLES2 extension.
{ "NVX_gpu_memory_info", false, true },
+ { "OES_copy_image", false, true },
{ "OES_compressed_ETC1_RGB8_texture", false, true },
{ "OES_depth24", false, true },
{ "OES_depth32", false, true },
@@ -1195,6 +1203,8 @@ namespace bgfx { namespace gl
, m_maxAnisotropyDefault(0.0f)
, m_maxMsaa(0)
, m_vao(0)
+ , m_blitSupported(false)
+ , m_readBackSupported(BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL) )
, m_vaoSupport(false)
, m_samplerObjectSupport(false)
, m_shadowSamplersSupport(false)
@@ -1584,12 +1594,16 @@ namespace bgfx { namespace gl
{
uint8_t supported = 0;
supported |= s_textureFormat[ii].m_supported
- ? BGFX_CAPS_FORMAT_TEXTURE_COLOR
+ ? BGFX_CAPS_FORMAT_TEXTURE_2D
+ | BGFX_CAPS_FORMAT_TEXTURE_3D
+ | BGFX_CAPS_FORMAT_TEXTURE_CUBE
: BGFX_CAPS_FORMAT_TEXTURE_NONE
;
supported |= isTextureFormatValid(TextureFormat::Enum(ii), true)
- ? BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB
+ ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB
+ | BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB
+ | BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB
: BGFX_CAPS_FORMAT_TEXTURE_NONE
;
@@ -1697,6 +1711,23 @@ namespace bgfx { namespace gl
: 0
;
+ if (s_extension[Extension::ARB_copy_image].m_supported
+ || s_extension[Extension::EXT_copy_image].m_supported
+ || s_extension[Extension:: NV_copy_image].m_supported
+ || s_extension[Extension::OES_copy_image].m_supported)
+ {
+ m_blitSupported = NULL != glCopyImageSubData;
+ g_caps.supported |= m_blitSupported
+ ? BGFX_CAPS_TEXTURE_BLIT
+ : 0
+ ;
+ }
+
+ g_caps.supported |= m_readBackSupported
+ ? BGFX_CAPS_TEXTURE_READ_BACK
+ : 0
+ ;
+
g_caps.maxTextureSize = uint16_t(glGet(GL_MAX_TEXTURE_SIZE) );
if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL)
@@ -2072,6 +2103,36 @@ namespace bgfx { namespace gl
{
}
+ void readTexture(TextureHandle _handle, void* _data) BX_OVERRIDE
+ {
+ if (m_readBackSupported)
+ {
+ const TextureGL& texture = m_textures[_handle.idx];
+ const bool compressed = isCompressed(TextureFormat::Enum(texture.m_textureFormat) );
+
+ GL_CHECK(glBindTexture(texture.m_target, texture.m_id) );
+
+ if (compressed)
+ {
+ GL_CHECK(glGetCompressedTexImage(texture.m_target
+ , 0
+ , _data
+ ) );
+ }
+ else
+ {
+ GL_CHECK(glGetTexImage(texture.m_target
+ , 0
+ , texture.m_fmt
+ , texture.m_type
+ , _data
+ ) );
+ }
+
+ GL_CHECK(glBindTexture(texture.m_target, 0) );
+ }
+ }
+
void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE
{
TextureGL& texture = m_textures[_handle.idx];
@@ -2289,12 +2350,14 @@ namespace bgfx { namespace gl
|| m_resolution.m_height != _resolution.m_height
|| m_resolution.m_flags != flags)
{
- m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
- m_textVideoMem.clear();
+ flags &= ~BGFX_RESET_FORCE;
m_resolution = _resolution;
m_resolution.m_flags = flags;
+ m_textVideoMem.resize(false, _resolution.m_width, _resolution.m_height);
+ m_textVideoMem.clear();
+
if ( (flags & BGFX_RESET_HMD)
&& m_ovr.isInitialized() )
{
@@ -3084,6 +3147,8 @@ namespace bgfx { namespace gl
float m_maxAnisotropyDefault;
int32_t m_maxMsaa;
GLuint m_vao;
+ bool m_blitSupported;
+ bool m_readBackSupported;
bool m_vaoSupport;
bool m_samplerObjectSupport;
bool m_shadowSamplersSupport;
@@ -4882,9 +4947,14 @@ namespace bgfx { namespace gl
}
else
{
+ GLenum target = GL_TEXTURE_CUBE_MAP == texture.m_target
+ ? GL_TEXTURE_CUBE_MAP_POSITIVE_X
+ : texture.m_target
+ ;
+
GL_CHECK(glFramebufferTexture2D(GL_FRAMEBUFFER
, attachment
- , texture.m_target
+ , target
, texture.m_id
, 0
) );
@@ -5105,7 +5175,13 @@ namespace bgfx { namespace gl
SortKey key;
uint16_t view = UINT16_MAX;
FrameBufferHandle fbh = BGFX_INVALID_HANDLE;
- int32_t height = hmdEnabled
+
+ BlitKey blitKey;
+ blitKey.decode(_render->m_blitKeys[0]);
+ uint16_t numBlitItems = _render->m_numBlitItems;
+ uint16_t blitItem = 0;
+
+ int32_t resolutionHeight = hmdEnabled
? _render->m_hmd.height
: _render->m_resolution.m_height
;
@@ -5177,11 +5253,11 @@ namespace bgfx { namespace gl
if (_render->m_fb[view].idx != fbh.idx)
{
fbh = _render->m_fb[view];
- height = hmdEnabled
+ resolutionHeight = hmdEnabled
? _render->m_hmd.height
: _render->m_resolution.m_height
;
- height = setFrameBuffer(fbh, height, discardFlags);
+ resolutionHeight = setFrameBuffer(fbh, resolutionHeight, discardFlags);
}
viewRestart = ( (BGFX_VIEW_STEREO == (_render->m_viewFlags[view] & BGFX_VIEW_STEREO) ) );
@@ -5239,7 +5315,7 @@ namespace bgfx { namespace gl
viewScissorRect = viewHasScissor ? scissorRect : viewState.m_rect;
GL_CHECK(glViewport(viewState.m_rect.m_x
- , height-viewState.m_rect.m_height-viewState.m_rect.m_y
+ , resolutionHeight-viewState.m_rect.m_height-viewState.m_rect.m_y
, viewState.m_rect.m_width
, viewState.m_rect.m_height
) );
@@ -5249,7 +5325,7 @@ namespace bgfx { namespace gl
if (BGFX_CLEAR_NONE != (clear.m_flags & BGFX_CLEAR_MASK) )
{
- clearQuad(_clearQuad, viewState.m_rect, clear, height, _render->m_colorPalette);
+ clearQuad(_clearQuad, viewState.m_rect, clear, resolutionHeight, _render->m_colorPalette);
}
GL_CHECK(glDisable(GL_STENCIL_TEST) );
@@ -5257,6 +5333,45 @@ namespace bgfx { namespace gl
GL_CHECK(glDepthFunc(GL_LESS) );
GL_CHECK(glEnable(GL_CULL_FACE) );
GL_CHECK(glDisable(GL_BLEND) );
+
+ if (m_blitSupported)
+ {
+ for (; blitItem < numBlitItems && blitKey.m_view <= view; blitItem++)
+ {
+ const BlitItem& bi = _render->m_blitItem[blitItem];
+ blitKey.decode(_render->m_blitKeys[blitItem + 1]);
+
+ const TextureGL& src = m_textures[bi.m_src.idx];
+ const TextureGL& dst = m_textures[bi.m_dst.idx];
+
+ uint32_t srcWidth = bx::uint32_min(src.m_width, bi.m_srcX + bi.m_width) - bi.m_srcX;
+ uint32_t srcHeight = bx::uint32_min(src.m_height, bi.m_srcY + bi.m_height) - bi.m_srcY;
+ uint32_t srcDepth = bx::uint32_min(src.m_depth, bi.m_srcZ + bi.m_depth) - bi.m_srcZ;
+ uint32_t dstWidth = bx::uint32_min(dst.m_width, bi.m_dstX + bi.m_width) - bi.m_dstX;
+ uint32_t dstHeight = bx::uint32_min(dst.m_height, bi.m_dstY + bi.m_height) - bi.m_dstY;
+ uint32_t dstDepth = bx::uint32_min(dst.m_depth, bi.m_dstZ + bi.m_depth) - bi.m_dstZ;
+ uint32_t width = bx::uint32_min(srcWidth, dstWidth);
+ uint32_t height = bx::uint32_min(srcHeight, dstHeight);
+ uint32_t depth = bx::uint32_min(srcDepth, dstDepth);
+
+ GL_CHECK(glCopyImageSubData(src.m_id
+ , src.m_target
+ , bi.m_srcMip
+ , bi.m_srcX
+ , bi.m_srcY
+ , bi.m_srcZ
+ , dst.m_id
+ , dst.m_target
+ , bi.m_dstMip
+ , bi.m_dstX
+ , bi.m_dstY
+ , bi.m_dstZ
+ , width
+ , height
+ , bx::uint32_imax(depth, 1)
+ ) );
+ }
+ }
}
if (isCompute)
@@ -5419,7 +5534,7 @@ namespace bgfx { namespace gl
{
GL_CHECK(glEnable(GL_SCISSOR_TEST) );
GL_CHECK(glScissor(viewScissorRect.m_x
- , height-viewScissorRect.m_height-viewScissorRect.m_y
+ , resolutionHeight-viewScissorRect.m_height-viewScissorRect.m_y
, viewScissorRect.m_width
, viewScissorRect.m_height
) );
@@ -5435,7 +5550,7 @@ namespace bgfx { namespace gl
scissorRect.intersect(viewScissorRect, _render->m_rectCache.m_cache[scissor]);
GL_CHECK(glEnable(GL_SCISSOR_TEST) );
GL_CHECK(glScissor(scissorRect.m_x
- , height-scissorRect.m_height-scissorRect.m_y
+ , resolutionHeight-scissorRect.m_height-scissorRect.m_y
, scissorRect.m_width
, scissorRect.m_height
) );
diff --git a/3rdparty/bgfx/src/renderer_mtl.h b/3rdparty/bgfx/src/renderer_mtl.h
index 495f7abf499..052c7859177 100644
--- a/3rdparty/bgfx/src/renderer_mtl.h
+++ b/3rdparty/bgfx/src/renderer_mtl.h
@@ -58,6 +58,11 @@ namespace bgfx { namespace mtl
return [m_obj computeCommandEncoder];
}
+ id<MTLBlitCommandEncoder> blitCommandEncoder()
+ {
+ return [m_obj blitCommandEncoder];
+ }
+
// Scheduling and Executing Commands
void enqueue()
{
diff --git a/3rdparty/bgfx/src/renderer_mtl.mm b/3rdparty/bgfx/src/renderer_mtl.mm
index 007c2bcb786..f855c5a4ee3 100644
--- a/3rdparty/bgfx/src/renderer_mtl.mm
+++ b/3rdparty/bgfx/src/renderer_mtl.mm
@@ -332,7 +332,6 @@ namespace bgfx { namespace mtl
, m_rtMsaa(false)
, m_drawable(NULL)
{
- m_fbh.idx = invalidHandle;
}
~RendererContextMtl()
@@ -343,6 +342,10 @@ namespace bgfx { namespace mtl
{
BX_TRACE("Init.");
+ m_fbh.idx = invalidHandle;
+ memset(m_uniforms, 0, sizeof(m_uniforms) );
+ memset(&m_resolution, 0, sizeof(m_resolution) );
+
if (NULL != NSClassFromString(@"CAMetalLayer") )
{
//on iOS we need the layer as CAmetalLayer
@@ -397,8 +400,6 @@ namespace bgfx { namespace mtl
m_uniformBufferVertexOffset = 0;
m_uniformBufferFragmentOffset = 0;
- memset(m_uniforms, 0, sizeof(m_uniforms) );
-
g_caps.supported |= (0
| BGFX_CAPS_TEXTURE_COMPARE_LEQUAL
| BGFX_CAPS_TEXTURE_3D
@@ -429,9 +430,21 @@ namespace bgfx { namespace mtl
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
{
- uint8_t support = (s_textureFormat[ii].m_fmt != MTLPixelFormatInvalid) ? BGFX_CAPS_FORMAT_TEXTURE_COLOR : BGFX_CAPS_FORMAT_TEXTURE_NONE;
-
- support |= (s_textureFormat[ii].m_fmtSrgb != MTLPixelFormatInvalid) ? BGFX_CAPS_FORMAT_TEXTURE_COLOR_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE;
+ uint8_t support = 0;
+
+ support |= MTLPixelFormatInvalid != s_textureFormat[ii].m_fmt
+ ? BGFX_CAPS_FORMAT_TEXTURE_2D
+ | BGFX_CAPS_FORMAT_TEXTURE_3D
+ | BGFX_CAPS_FORMAT_TEXTURE_CUBE
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
+
+ support |= MTLPixelFormatInvalid != s_textureFormat[ii].m_fmtSrgb
+ ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB
+ | BGFX_CAPS_FORMAT_TEXTURE_3D_SRGB
+ | BGFX_CAPS_FORMAT_TEXTURE_CUBE_SRGB
+ : BGFX_CAPS_FORMAT_TEXTURE_NONE
+ ;
//TODO: additional caps flags
// support |= BGFX_CAPS_FORMAT_TEXTURE_VERTEX : BGFX_CAPS_FORMAT_TEXTURE_NONE;
@@ -441,6 +454,29 @@ namespace bgfx { namespace mtl
g_caps.formats[ii] = support;
}
+ if (BX_ENABLED(BX_PLATFORM_OSX) )
+ {
+ g_caps.formats[TextureFormat::ETC1 ] =
+ g_caps.formats[TextureFormat::ETC2 ] =
+ g_caps.formats[TextureFormat::ETC2A ] =
+ g_caps.formats[TextureFormat::ETC2A1] =
+ g_caps.formats[TextureFormat::PTC12 ] =
+ g_caps.formats[TextureFormat::PTC14 ] =
+ g_caps.formats[TextureFormat::PTC12A] =
+ g_caps.formats[TextureFormat::PTC14A] =
+ g_caps.formats[TextureFormat::PTC22 ] =
+ g_caps.formats[TextureFormat::PTC24 ] = BGFX_CAPS_FORMAT_TEXTURE_NONE;
+ }
+
+ for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
+ {
+ if (BGFX_CAPS_FORMAT_TEXTURE_NONE == g_caps.formats[ii])
+ {
+ s_textureFormat[ii].m_fmt = MTLPixelFormatInvalid;
+ s_textureFormat[ii].m_fmtSrgb = MTLPixelFormatInvalid;
+ }
+ }
+
// Init reserved part of view name.
for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii)
{
@@ -590,6 +626,10 @@ namespace bgfx { namespace mtl
{
}
+ void readTexture(TextureHandle /*_handle*/, void* /*_data*/) BX_OVERRIDE
+ {
+ }
+
void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE
{
TextureMtl& texture = m_textures[_handle.idx];
@@ -752,9 +792,11 @@ namespace bgfx { namespace mtl
rce.setScissorRect(rc);
rce.setCullMode(MTLCullModeNone);
- uint64_t state = BGFX_STATE_RGB_WRITE
- | BGFX_STATE_ALPHA_WRITE
- | BGFX_STATE_DEPTH_TEST_ALWAYS;
+ uint64_t state = 0
+ | BGFX_STATE_RGB_WRITE
+ | BGFX_STATE_ALPHA_WRITE
+ | BGFX_STATE_DEPTH_TEST_ALWAYS
+ ;
setDepthStencilState(state);
@@ -858,10 +900,16 @@ namespace bgfx { namespace mtl
//TODO: there should be a way to specify if backbuffer needs stencil/depth.
//TODO: support msaa
- if (NULL == m_backBufferDepth
+ if (NULL == m_backBufferDepth
|| width != m_backBufferDepth.width()
- || height != m_backBufferDepth.height() )
+ || height != m_backBufferDepth.height()
+ || m_resolution.m_width != _resolution.m_width
+ || m_resolution.m_height != _resolution.m_height
+ || m_resolution.m_flags != _resolution.m_flags)
{
+ m_resolution = _resolution;
+ m_resolution.m_flags &= ~BGFX_RESET_FORCE;
+
m_textureDescriptor.textureType = MTLTextureType2D;
m_textureDescriptor.pixelFormat = MTLPixelFormatDepth32Float_Stencil8;
@@ -1192,6 +1240,8 @@ namespace bgfx { namespace mtl
FrameBufferHandle m_fbh;
bool m_rtMsaa;
+ Resolution m_resolution;
+
// descriptors
RenderPipelineDescriptor m_renderPipelineDescriptor;
DepthStencilDescriptor m_depthStencilDescriptor;
@@ -1697,13 +1747,11 @@ namespace bgfx { namespace mtl
}
else if (arg.type == MTLArgumentTypeTexture)
{
- const char* name = utf8String(arg.name);
- BX_TRACE("texture: %s index:%d", name, arg.index);
+ BX_TRACE("texture: %s index:%d", utf8String(arg.name), arg.index);
}
else if (arg.type == MTLArgumentTypeSampler)
{
- const char* name = utf8String(arg.name);
- BX_TRACE("sampler: %s index:%d", name, arg.index);
+ BX_TRACE("sampler: %s index:%d", utf8String(arg.name), arg.index);
}
}
}
@@ -1774,10 +1822,12 @@ namespace bgfx { namespace mtl
m_flags = _flags;
m_requestedFormat = (uint8_t)imageContainer.m_format;
- m_textureFormat = (uint8_t)imageContainer.m_format;
+ m_textureFormat = MTLPixelFormatInvalid == s_textureFormat[m_requestedFormat].m_fmt
+ ? uint8_t(TextureFormat::BGRA8)
+ : m_requestedFormat
+ ;
- const TextureFormatInfo& tfi = s_textureFormat[m_requestedFormat];
- const bool convert = MTLPixelFormatInvalid == tfi.m_fmt;
+ const bool convert = m_requestedFormat != m_textureFormat;
uint8_t bpp = getBitsPerPixel(TextureFormat::Enum(m_textureFormat) );
if (convert)
@@ -1815,9 +1865,8 @@ namespace bgfx { namespace mtl
, 0 != (_flags&BGFX_TEXTURE_RT_MASK) ? " (render target)" : ""
);
-
const bool bufferOnly = 0 != (_flags&BGFX_TEXTURE_RT_BUFFER_ONLY);
- const bool computeWrite = 0 != (_flags&BGFX_TEXTURE_COMPUTE_WRITE);
+// 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;
// const uint32_t msaaQuality = bx::uint32_satsub( (_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT, 1);
@@ -1826,14 +1875,17 @@ namespace bgfx { namespace mtl
MTLPixelFormat format = MTLPixelFormatInvalid;
if (srgb)
{
- format = s_textureFormat[m_textureFormat].m_fmtSrgb;
- BX_WARN(format != MTLPixelFormatInvalid, "sRGB not supported for texture format %d", m_textureFormat);
+ format = s_textureFormat[m_textureFormat].m_fmtSrgb;
+ BX_WARN(format != MTLPixelFormatInvalid
+ , "sRGB not supported for texture format %d"
+ , m_textureFormat
+ );
}
if (format == MTLPixelFormatInvalid)
{
// not swizzled and not sRGB, or sRGB unsupported
- format = s_textureFormat[m_textureFormat].m_fmt;
+ format = s_textureFormat[m_textureFormat].m_fmt;
}
desc.pixelFormat = format;
@@ -1844,8 +1896,15 @@ namespace bgfx { namespace mtl
desc.sampleCount = 1; //TODO: set samplecount - If textureType is not MTLTextureType2DMultisample, the value must be 1.
desc.resourceOptions = MTLResourceStorageModePrivate;
desc.cpuCacheMode = MTLCPUCacheModeDefaultCache;
- desc.storageMode = bufferOnly ? 1 /*MTLStorageModeManaged*/ : 2 /*MTLStorageModePrivate*/;
- desc.usage = MTLTextureUsageShaderRead;
+
+ desc.storageMode = bufferOnly
+ ? 2 /*MTLStorageModePrivate*/
+ : 1 /*MTLStorageModeManaged*/
+ ;
+ desc.usage = bufferOnly
+ ? MTLTextureUsageShaderWrite
+ : MTLTextureUsageShaderRead
+ ;
//TODO: set resource flags depending on usage(renderTarget/computeWrite/etc) on iOS9/OSX
@@ -1883,46 +1942,48 @@ namespace bgfx { namespace mtl
if (convert)
{
imageDecodeToRgba8(temp
- , mip.m_data
- , mip.m_width
- , mip.m_height
- , mip.m_width*4
- , mip.m_format
- );
+ , mip.m_data
+ , mip.m_width
+ , mip.m_height
+ , mip.m_width*4
+ , mip.m_format
+ );
data = temp;
}
MTLRegion region = { { 0, 0, 0 }, { width, height, depth } };
- uint32_t bytesPerRow;
- uint32_t bytesPerImage;
+ uint32_t bytesPerRow = 0;
+ uint32_t bytesPerImage = 0;
if (compressed && !convert)
{
if (format >= 160 /*MTLPixelFormatPVRTC_RGB_2BPP*/
&& format <= 167 /*MTLPixelFormatPVRTC_RGBA_4BPP_sRGB*/)
{
- bytesPerRow = 0;
+ bytesPerRow = 0;
bytesPerImage = 0;
}
else
{
- bytesPerRow = (mip.m_width / blockInfo.blockWidth )*mip.m_blockSize;
- bytesPerImage = (desc.textureType == MTLTextureType3D) ? (mip.m_height/blockInfo.blockHeight)*bytesPerRow : 0;
+ bytesPerRow = (mip.m_width / blockInfo.blockWidth)*mip.m_blockSize;
+ bytesPerImage = desc.textureType == MTLTextureType3D
+ ? (mip.m_height/blockInfo.blockHeight)*bytesPerRow
+ : 0
+ ;
}
}
else
{
- bytesPerRow = width * bpp / 8;
- bytesPerImage = (desc.textureType == MTLTextureType3D) ? width * height * bpp / 8 : 0;
+ bytesPerRow = width * bpp / 8;
+ bytesPerImage = desc.textureType == MTLTextureType3D
+ ? bytesPerRow * height
+ : 0
+ ;
}
m_ptr.replaceRegion(region, lod, side, data, bytesPerRow, bytesPerImage);
}
- else if (!computeWrite)
- {
- //TODO: do we need to clear to zero??
- }
width >>= 1;
height >>= 1;
@@ -1939,9 +2000,13 @@ namespace bgfx { namespace mtl
void TextureMtl::update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem)
{
- MTLRegion region = { { _rect.m_x, _rect.m_y, _z }, { _rect.m_width, _rect.m_height, _depth } };
+ MTLRegion region =
+ {
+ { _rect.m_x, _rect.m_y, _z },
+ { _rect.m_width, _rect.m_height, _depth },
+ };
- const uint32_t bpp = getBitsPerPixel(TextureFormat::Enum(m_textureFormat) );
+ const uint32_t bpp = getBitsPerPixel(TextureFormat::Enum(m_textureFormat) );
const uint32_t rectpitch = _rect.m_width*bpp/8;
const uint32_t srcpitch = UINT16_MAX == _pitch ? rectpitch : _pitch;
diff --git a/3rdparty/bgfx/src/renderer_null.cpp b/3rdparty/bgfx/src/renderer_null.cpp
index 5a86523fc57..db6777bdab0 100644
--- a/3rdparty/bgfx/src/renderer_null.cpp
+++ b/3rdparty/bgfx/src/renderer_null.cpp
@@ -113,6 +113,10 @@ namespace bgfx { namespace noop
{
}
+ void readTexture(TextureHandle /*_handle*/, void* /*_data*/) BX_OVERRIDE
+ {
+ }
+
void resizeTexture(TextureHandle /*_handle*/, uint16_t /*_width*/, uint16_t /*_height*/) BX_OVERRIDE
{
}
diff --git a/3rdparty/bgfx/src/shader_dxbc.cpp b/3rdparty/bgfx/src/shader_dxbc.cpp
index 34e50c14424..e0f8f6ef504 100644
--- a/3rdparty/bgfx/src/shader_dxbc.cpp
+++ b/3rdparty/bgfx/src/shader_dxbc.cpp
@@ -1785,13 +1785,18 @@ namespace bgfx
size += read(_reader, _dxbc.outputSignature);
break;
- case BX_MAKEFOURCC('R', 'D', 'E', 'F'):
- case BX_MAKEFOURCC('I', 'F', 'C', 'E'):
- case BX_MAKEFOURCC('P', 'C', 'S', 'G'):
- case BX_MAKEFOURCC('S', 'T', 'A', 'T'):
- case BX_MAKEFOURCC('S', 'F', 'I', '0'):
- case BX_MAKEFOURCC('P', 'S', 'O', '1'):
- case BX_MAKEFOURCC('P', 'S', 'O', '2'):
+ case BX_MAKEFOURCC('A', 'o', 'n', '9'): // Contains DX9BC for feature level 9.x (*s_4_0_level_9_*) shaders.
+ case BX_MAKEFOURCC('I', 'F', 'C', 'E'): // Interface.
+ case BX_MAKEFOURCC('R', 'D', 'E', 'F'): // Resource definition.
+ case BX_MAKEFOURCC('S', 'D', 'G', 'B'): // Shader debugging info (old).
+ case BX_MAKEFOURCC('S', 'P', 'D', 'B'): // Shader debugging info (new).
+ case BX_MAKEFOURCC('S', 'F', 'I', '0'): // ?
+ case BX_MAKEFOURCC('S', 'T', 'A', 'T'): // Statistics.
+ case BX_MAKEFOURCC('P', 'C', 'S', 'G'): // Patch constant signature.
+ case BX_MAKEFOURCC('P', 'S', 'O', '1'): // Pipeline State Object 1
+ case BX_MAKEFOURCC('P', 'S', 'O', '2'): // Pipeline State Object 2
+ case BX_MAKEFOURCC('X', 'N', 'A', 'P'): // ?
+ case BX_MAKEFOURCC('X', 'N', 'A', 'S'): // ?
size += chunkSize;
break;
diff --git a/3rdparty/bgfx/tools/shaderc/shaderc.cpp b/3rdparty/bgfx/tools/shaderc/shaderc.cpp
index a8c854d2c4e..50c2c0f5efd 100644
--- a/3rdparty/bgfx/tools/shaderc/shaderc.cpp
+++ b/3rdparty/bgfx/tools/shaderc/shaderc.cpp
@@ -67,6 +67,17 @@ static const char* s_OES_texture_3D[] =
NULL
};
+static const char* s_130[] =
+{
+ "uint",
+ "uint2",
+ "uint3",
+ "uint4",
+ "isampler3D",
+ "usampler3D",
+ NULL
+};
+
const char* s_uniformTypeName[UniformType::Count] =
{
"int",
@@ -1666,13 +1677,17 @@ int main(int _argc, const char* _argv[])
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", profile);
+ bx::stringPrintf(code, "#version %s\n", need130 ? "130" : profile);
}
bx::stringPrintf(code
diff --git a/3rdparty/bx/include/bx/radixsort.h b/3rdparty/bx/include/bx/radixsort.h
index 9ed4011fbf0..d28f65102fd 100644
--- a/3rdparty/bx/include/bx/radixsort.h
+++ b/3rdparty/bx/include/bx/radixsort.h
@@ -14,8 +14,69 @@ namespace bx
#define BX_RADIXSORT_HISTOGRAM_SIZE (1<<BX_RADIXSORT_BITS)
#define BX_RADIXSORT_BIT_MASK (BX_RADIXSORT_HISTOGRAM_SIZE-1)
+ inline void radixSort32(uint32_t* __restrict _keys, uint32_t* __restrict _tempKeys, uint32_t _size)
+ {
+ uint32_t* __restrict keys = _keys;
+ uint32_t* __restrict tempKeys = _tempKeys;
+
+ uint32_t histogram[BX_RADIXSORT_HISTOGRAM_SIZE];
+ uint16_t shift = 0;
+ uint32_t pass = 0;
+ for (; pass < 3; ++pass)
+ {
+ memset(histogram, 0, sizeof(uint32_t)*BX_RADIXSORT_HISTOGRAM_SIZE);
+
+ bool sorted = true;
+ {
+ uint32_t key = keys[0];
+ uint32_t prevKey = key;
+ for (uint32_t ii = 0; ii < _size; ++ii, prevKey = key)
+ {
+ key = keys[ii];
+ uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK;
+ ++histogram[index];
+ sorted &= prevKey <= key;
+ }
+ }
+
+ if (sorted)
+ {
+ goto done;
+ }
+
+ uint32_t offset = 0;
+ for (uint32_t ii = 0; ii < BX_RADIXSORT_HISTOGRAM_SIZE; ++ii)
+ {
+ uint32_t count = histogram[ii];
+ histogram[ii] = offset;
+ offset += count;
+ }
+
+ for (uint32_t ii = 0; ii < _size; ++ii)
+ {
+ uint32_t key = keys[ii];
+ uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK;
+ uint32_t dest = histogram[index]++;
+ tempKeys[dest] = key;
+ }
+
+ uint32_t* swapKeys = tempKeys;
+ tempKeys = keys;
+ keys = swapKeys;
+
+ shift += BX_RADIXSORT_BITS;
+ }
+
+done:
+ if (0 != (pass&1) )
+ {
+ // Odd number of passes needs to do copy to the destination.
+ memcpy(_keys, _tempKeys, _size*sizeof(uint32_t) );
+ }
+ }
+
template <typename Ty>
- void radixSort32(uint32_t* __restrict _keys, uint32_t* __restrict _tempKeys, Ty* __restrict _values, Ty* __restrict _tempValues, uint32_t _size)
+ inline void radixSort32(uint32_t* __restrict _keys, uint32_t* __restrict _tempKeys, Ty* __restrict _values, Ty* __restrict _tempValues, uint32_t _size)
{
uint32_t* __restrict keys = _keys;
uint32_t* __restrict tempKeys = _tempKeys;
@@ -87,8 +148,69 @@ done:
}
}
+ inline void radixSort64(uint64_t* __restrict _keys, uint64_t* __restrict _tempKeys, uint32_t _size)
+ {
+ uint64_t* __restrict keys = _keys;
+ uint64_t* __restrict tempKeys = _tempKeys;
+
+ uint32_t histogram[BX_RADIXSORT_HISTOGRAM_SIZE];
+ uint16_t shift = 0;
+ uint32_t pass = 0;
+ for (; pass < 6; ++pass)
+ {
+ memset(histogram, 0, sizeof(uint32_t)*BX_RADIXSORT_HISTOGRAM_SIZE);
+
+ bool sorted = true;
+ {
+ uint64_t key = keys[0];
+ uint64_t prevKey = key;
+ for (uint32_t ii = 0; ii < _size; ++ii, prevKey = key)
+ {
+ key = keys[ii];
+ uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK;
+ ++histogram[index];
+ sorted &= prevKey <= key;
+ }
+ }
+
+ if (sorted)
+ {
+ goto done;
+ }
+
+ uint32_t offset = 0;
+ for (uint32_t ii = 0; ii < BX_RADIXSORT_HISTOGRAM_SIZE; ++ii)
+ {
+ uint32_t count = histogram[ii];
+ histogram[ii] = offset;
+ offset += count;
+ }
+
+ for (uint32_t ii = 0; ii < _size; ++ii)
+ {
+ uint64_t key = keys[ii];
+ uint16_t index = (key>>shift)&BX_RADIXSORT_BIT_MASK;
+ uint32_t dest = histogram[index]++;
+ tempKeys[dest] = key;
+ }
+
+ uint64_t* swapKeys = tempKeys;
+ tempKeys = keys;
+ keys = swapKeys;
+
+ shift += BX_RADIXSORT_BITS;
+ }
+
+done:
+ if (0 != (pass&1) )
+ {
+ // Odd number of passes needs to do copy to the destination.
+ memcpy(_keys, _tempKeys, _size*sizeof(uint64_t) );
+ }
+ }
+
template <typename Ty>
- void radixSort64(uint64_t* __restrict _keys, uint64_t* __restrict _tempKeys, Ty* __restrict _values, Ty* __restrict _tempValues, uint32_t _size)
+ inline void radixSort64(uint64_t* __restrict _keys, uint64_t* __restrict _tempKeys, Ty* __restrict _values, Ty* __restrict _tempValues, uint32_t _size)
{
uint64_t* __restrict keys = _keys;
uint64_t* __restrict tempKeys = _tempKeys;
diff --git a/3rdparty/bx/include/compat/msvc/pre1600/stdint.h b/3rdparty/bx/include/compat/msvc/pre1600/stdint.h
index 4fe0ef9a9b2..3a5535cb0bd 100644
--- a/3rdparty/bx/include/compat/msvc/pre1600/stdint.h
+++ b/3rdparty/bx/include/compat/msvc/pre1600/stdint.h
@@ -37,6 +37,23 @@
#ifndef _MSC_STDINT_H_ // [
#define _MSC_STDINT_H_
+#define _In_reads_(size)
+#define _In_reads_opt_(size)
+#define _In_reads_bytes_(size)
+#define _In_reads_bytes_opt_(size)
+#define _Out_writes_(size)
+#define _Out_writes_opt_(size)
+#define _Out_writes_to_opt_(size,count)
+#define _Out_writes_bytes_(size)
+#define _Out_writes_bytes_opt_(size)
+#define _Outptr_
+#define _Outptr_result_maybenull_
+#define _Outptr_opt_result_maybenull_
+#define _COM_Outptr_
+#define _COM_Outptr_opt_
+#define _COM_Outptr_opt_result_maybenull_
+#define _Field_size_bytes_full_(size)
+
#if _MSC_VER > 1000
#pragma once
#endif
diff --git a/3rdparty/bx/include/tinystl/buffer.h b/3rdparty/bx/include/tinystl/buffer.h
index 5fac2291486..4351ec202a9 100644
--- a/3rdparty/bx/include/tinystl/buffer.h
+++ b/3rdparty/bx/include/tinystl/buffer.h
@@ -179,9 +179,11 @@ namespace tinystl {
Alloc::static_deallocate(b->first, sizeof(T)*capacity);
b->capacity = b->first;
} else if (b->capacity != b->last) {
+ const size_t capacity = (size_t)(b->capacity - b->first);
const size_t size = (size_t)(b->last - b->first);
T* newfirst = (T*)Alloc::static_allocate(sizeof(T) * size);
buffer_move_urange(newfirst, b->first, b->last);
+ Alloc::static_deallocate(b->first, sizeof(T) * capacity);
b->first = newfirst;
b->last = newfirst + size;
b->capacity = b->last;
@@ -225,6 +227,26 @@ namespace tinystl {
new(placeholder(), where) T();
}
+ template<typename T, typename Alloc, typename Param>
+ static inline void buffer_append(buffer<T, Alloc>* b, const Param* param) {
+ if (b->capacity != b->last) {
+ new(placeholder(), b->last) T(*param);
+ ++b->last;
+ } else {
+ buffer_insert(b, b->last, param, param + 1);
+ }
+ }
+
+ template<typename T, typename Alloc>
+ static inline void buffer_append(buffer<T, Alloc>* b) {
+ if (b->capacity != b->last) {
+ new(placeholder(), b->last) T();
+ ++b->last;
+ } else {
+ buffer_insert(b, b->last, 1);
+ }
+ }
+
template<typename T, typename Alloc>
static inline T* buffer_erase(buffer<T, Alloc>* b, T* first, T* last) {
typedef T* pointer;
diff --git a/3rdparty/bx/include/tinystl/vector.h b/3rdparty/bx/include/tinystl/vector.h
index 96fe1b4ef62..6885feb4f89 100644
--- a/3rdparty/bx/include/tinystl/vector.h
+++ b/3rdparty/bx/include/tinystl/vector.h
@@ -228,20 +228,18 @@ namespace tinystl {
template<typename T, typename Alloc>
inline void vector<T, Alloc>::push_back(const T& t) {
- buffer_insert(&m_buffer, m_buffer.last, &t, &t + 1);
+ buffer_append(&m_buffer, &t);
}
template<typename T, typename Alloc>
- inline void vector<T, Alloc>::emplace_back()
- {
- buffer_insert(&m_buffer, m_buffer.last, 1);
+ inline void vector<T, Alloc>::emplace_back() {
+ buffer_append(&m_buffer);
}
template<typename T, typename Alloc>
template<typename Param>
- inline void vector<T, Alloc>::emplace_back(const Param& param)
- {
- buffer_insert(&m_buffer, m_buffer.last, &param, &param + 1);
+ inline void vector<T, Alloc>::emplace_back(const Param& param) {
+ buffer_append(&m_buffer, &param);
}
template<typename T, typename Alloc>
diff --git a/3rdparty/bx/scripts/toolchain.lua b/3rdparty/bx/scripts/toolchain.lua
index 3f62914a71f..a6a201709aa 100644
--- a/3rdparty/bx/scripts/toolchain.lua
+++ b/3rdparty/bx/scripts/toolchain.lua
@@ -170,26 +170,26 @@ function toolchain(_buildDir, _libDir)
location (path.join(_buildDir, "projects", _ACTION .. "-freebsd"))
elseif "ios-arm" == _OPTIONS["gcc"] then
- premake.gcc.cc = "clang"
- premake.gcc.cxx = "clang++"
+ premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
+ premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
premake.gcc.ar = "ar"
location (path.join(_buildDir, "projects", _ACTION .. "-ios-arm"))
elseif "ios-simulator" == _OPTIONS["gcc"] then
- premake.gcc.cc = "clang"
- premake.gcc.cxx = "clang++"
+ premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
+ premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
premake.gcc.ar = "ar"
location (path.join(_buildDir, "projects", _ACTION .. "-ios-simulator"))
elseif "tvos-arm64" == _OPTIONS["gcc"] then
- premake.gcc.cc = "clang"
- premake.gcc.cxx = "clang++"
+ premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
+ premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
premake.gcc.ar = "ar"
location (path.join(_buildDir, "projects", _ACTION .. "-tvos-arm64"))
elseif "tvos-simulator" == _OPTIONS["gcc"] then
- premake.gcc.cc = "clang"
- premake.gcc.cxx = "clang++"
+ premake.gcc.cc = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
+ premake.gcc.cxx = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
premake.gcc.ar = "ar"
location (path.join(_buildDir, "projects", _ACTION .. "-tvos-simulator"))
@@ -489,6 +489,7 @@ function toolchain(_buildDir, _libDir)
}
linkoptions {
"-Wl,--gc-sections",
+ "-static",
"-static-libgcc",
"-static-libstdc++",
}