From 05dfc7fb460eb9dff1a5525ebb6ea93d10bdfa29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Fri, 3 Nov 2023 18:51:18 -0700 Subject: [PATCH] Removed D3D9. --- bindings/bf/bgfx.bf | 5 - bindings/cs/bgfx.cs | 5 - bindings/d/fakeenum.d | 7 +- bindings/d/package.d | 3 +- bindings/zig/bgfx.zig | 3 - docs/overview.rst | 1 - examples/09-hdr/hdr.cpp | 41 +- examples/10-font/font.cpp | 13 +- examples/11-fontsdf/fontsdf.cpp | 7 +- examples/14-shadowvolumes/shadowvolumes.cpp | 4 +- examples/16-shadowmaps/shadowmaps.cpp | 50 +- examples/21-deferred/deferred.cpp | 22 +- examples/23-vectordisplay/main.cpp | 6 +- examples/23-vectordisplay/vectordisplay.cpp | 24 +- examples/23-vectordisplay/vectordisplay.h | 4 +- examples/30-picking/picking.cpp | 8 - examples/31-rsm/reflectiveshadowmap.cpp | 19 +- examples/38-bloom/bloom.cpp | 22 +- examples/39-assao/assao.cpp | 22 +- examples/43-denoise/denoise.cpp | 38 +- examples/44-sss/screen_space_shadows.cpp | 24 +- examples/45-bokeh/bokeh.cpp | 38 +- examples/46-fsr/app.cpp | 23 +- examples/common/bgfx_utils.cpp | 6 - examples/common/nanovg/nanovg_bgfx.cpp | 21 - .../runtime/shaders/dx9/fs_albedo_output.bin | Bin 195 -> 0 bytes .../runtime/shaders/dx9/fs_bloom_combine.bin | Bin 444 -> 0 bytes .../runtime/shaders/dx9/fs_bokeh_copy.bin | Bin 211 -> 0 bytes .../dx9/fs_bokeh_copy_linear_to_gamma.bin | Bin 335 -> 0 bytes .../shaders/dx9/fs_bokeh_dof_combine.bin | Bin 474 -> 0 bytes .../shaders/dx9/fs_bokeh_dof_debug.bin | Bin 712 -> 0 bytes .../shaders/dx9/fs_bokeh_dof_downsample.bin | Bin 504 -> 0 bytes .../shaders/dx9/fs_bokeh_dof_second_pass.bin | Bin 1467 -> 0 bytes .../shaders/dx9/fs_bokeh_dof_single_pass.bin | Bin 1823 -> 0 bytes .../runtime/shaders/dx9/fs_bokeh_forward.bin | Bin 1227 -> 0 bytes .../shaders/dx9/fs_bokeh_forward_grid.bin | Bin 769 -> 0 bytes .../shaders/dx9/fs_bokeh_linear_depth.bin | Bin 320 -> 0 bytes examples/runtime/shaders/dx9/fs_bump.bin | Bin 2244 -> 0 bytes examples/runtime/shaders/dx9/fs_bunnylod.bin | Bin 551 -> 0 bytes examples/runtime/shaders/dx9/fs_callback.bin | Bin 551 -> 0 bytes examples/runtime/shaders/dx9/fs_cubes.bin | Bin 135 -> 0 bytes .../shaders/dx9/fs_deferred_combine.bin | Bin 620 -> 0 bytes .../runtime/shaders/dx9/fs_deferred_debug.bin | Bin 218 -> 0 bytes .../shaders/dx9/fs_deferred_debug_line.bin | Bin 135 -> 0 bytes .../runtime/shaders/dx9/fs_deferred_geom.bin | Bin 700 -> 0 bytes .../runtime/shaders/dx9/fs_deferred_light.bin | Bin 1096 -> 0 bytes .../shaders/dx9/fs_denoise_apply_lighting.bin | Bin 532 -> 0 bytes .../runtime/shaders/dx9/fs_denoise_copy.bin | Bin 211 -> 0 bytes .../dx9/fs_denoise_deferred_combine.bin | Bin 1169 -> 0 bytes .../shaders/dx9/fs_denoise_gbuffer.bin | Bin 1217 -> 0 bytes .../shaders/dx9/fs_denoise_spatial_3x3.bin | Bin 2685 -> 0 bytes .../shaders/dx9/fs_denoise_spatial_5x5.bin | Bin 6633 -> 0 bytes .../shaders/dx9/fs_denoise_temporal.bin | Bin 1683 -> 0 bytes .../runtime/shaders/dx9/fs_denoise_txaa.bin | Bin 3103 -> 0 bytes .../runtime/shaders/dx9/fs_downsample.bin | Bin 973 -> 0 bytes examples/runtime/shaders/dx9/fs_hdr_blur.bin | Bin 618 -> 0 bytes .../runtime/shaders/dx9/fs_hdr_bright.bin | Bin 1666 -> 0 bytes examples/runtime/shaders/dx9/fs_hdr_lum.bin | Bin 1471 -> 0 bytes .../runtime/shaders/dx9/fs_hdr_lumavg.bin | Bin 1795 -> 0 bytes examples/runtime/shaders/dx9/fs_hdr_mesh.bin | Bin 1379 -> 0 bytes .../runtime/shaders/dx9/fs_hdr_skybox.bin | Bin 527 -> 0 bytes .../runtime/shaders/dx9/fs_hdr_tonemap.bin | Bin 1679 -> 0 bytes examples/runtime/shaders/dx9/fs_ibl_mesh.bin | Bin 2027 -> 0 bytes .../runtime/shaders/dx9/fs_ibl_skybox.bin | Bin 1023 -> 0 bytes .../runtime/shaders/dx9/fs_instancing.bin | Bin 135 -> 0 bytes examples/runtime/shaders/dx9/fs_mesh.bin | Bin 1202 -> 0 bytes examples/runtime/shaders/dx9/fs_oit.bin | Bin 183 -> 0 bytes examples/runtime/shaders/dx9/fs_oit_wb.bin | Bin 459 -> 0 bytes .../runtime/shaders/dx9/fs_oit_wb_blit.bin | Bin 431 -> 0 bytes .../shaders/dx9/fs_oit_wb_separate.bin | Bin 431 -> 0 bytes .../shaders/dx9/fs_oit_wb_separate_blit.bin | Bin 431 -> 0 bytes examples/runtime/shaders/dx9/fs_particle.bin | Bin 404 -> 0 bytes .../runtime/shaders/dx9/fs_picking_id.bin | Bin 224 -> 0 bytes .../runtime/shaders/dx9/fs_picking_shaded.bin | Bin 663 -> 0 bytes examples/runtime/shaders/dx9/fs_pom.bin | Bin 5668 -> 0 bytes .../runtime/shaders/dx9/fs_raymarching.bin | Bin 47440 -> 0 bytes .../runtime/shaders/dx9/fs_rsm_combine.bin | Bin 2447 -> 0 bytes .../runtime/shaders/dx9/fs_rsm_gbuffer.bin | Bin 234 -> 0 bytes .../runtime/shaders/dx9/fs_rsm_lbuffer.bin | Bin 905 -> 0 bytes .../runtime/shaders/dx9/fs_rsm_shadow.bin | Bin 206 -> 0 bytes .../shaders/dx9/fs_screen_space_shadows.bin | Bin 1632 -> 0 bytes .../shaders/dx9/fs_shadowmaps_color_black.bin | Bin 147 -> 0 bytes .../dx9/fs_shadowmaps_color_lighting_esm.bin | Bin 2750 -> 0 bytes .../fs_shadowmaps_color_lighting_esm_csm.bin | Bin 4537 -> 0 bytes ...s_shadowmaps_color_lighting_esm_linear.bin | Bin 2746 -> 0 bytes ...adowmaps_color_lighting_esm_linear_csm.bin | Bin 4501 -> 0 bytes ...dowmaps_color_lighting_esm_linear_omni.bin | Bin 3804 -> 0 bytes .../fs_shadowmaps_color_lighting_esm_omni.bin | Bin 3808 -> 0 bytes .../dx9/fs_shadowmaps_color_lighting_hard.bin | Bin 2710 -> 0 bytes .../fs_shadowmaps_color_lighting_hard_csm.bin | Bin 4405 -> 0 bytes ..._shadowmaps_color_lighting_hard_linear.bin | Bin 2706 -> 0 bytes ...dowmaps_color_lighting_hard_linear_csm.bin | Bin 4449 -> 0 bytes ...owmaps_color_lighting_hard_linear_omni.bin | Bin 3776 -> 0 bytes ...fs_shadowmaps_color_lighting_hard_omni.bin | Bin 3760 -> 0 bytes .../dx9/fs_shadowmaps_color_lighting_pcf.bin | Bin 7613 -> 0 bytes .../fs_shadowmaps_color_lighting_pcf_csm.bin | Bin 24524 -> 0 bytes ...s_shadowmaps_color_lighting_pcf_linear.bin | Bin 7289 -> 0 bytes ...adowmaps_color_lighting_pcf_linear_csm.bin | Bin 22344 -> 0 bytes ...dowmaps_color_lighting_pcf_linear_omni.bin | Bin 7995 -> 0 bytes .../fs_shadowmaps_color_lighting_pcf_omni.bin | Bin 8699 -> 0 bytes .../dx9/fs_shadowmaps_color_lighting_vsm.bin | Bin 2830 -> 0 bytes .../fs_shadowmaps_color_lighting_vsm_csm.bin | Bin 4921 -> 0 bytes ...s_shadowmaps_color_lighting_vsm_linear.bin | Bin 2814 -> 0 bytes ...adowmaps_color_lighting_vsm_linear_csm.bin | Bin 4857 -> 0 bytes ...dowmaps_color_lighting_vsm_linear_omni.bin | Bin 3904 -> 0 bytes .../fs_shadowmaps_color_lighting_vsm_omni.bin | Bin 3920 -> 0 bytes .../dx9/fs_shadowmaps_color_texture.bin | Bin 574 -> 0 bytes .../shaders/dx9/fs_shadowmaps_hblur.bin | Bin 960 -> 0 bytes .../shaders/dx9/fs_shadowmaps_hblur_vsm.bin | Bin 1152 -> 0 bytes .../shaders/dx9/fs_shadowmaps_packdepth.bin | Bin 267 -> 0 bytes .../dx9/fs_shadowmaps_packdepth_linear.bin | Bin 219 -> 0 bytes .../dx9/fs_shadowmaps_packdepth_vsm.bin | Bin 331 -> 0 bytes .../fs_shadowmaps_packdepth_vsm_linear.bin | Bin 259 -> 0 bytes .../shaders/dx9/fs_shadowmaps_texture.bin | Bin 218 -> 0 bytes .../shaders/dx9/fs_shadowmaps_unpackdepth.bin | Bin 382 -> 0 bytes .../dx9/fs_shadowmaps_unpackdepth_vsm.bin | Bin 386 -> 0 bytes .../shaders/dx9/fs_shadowmaps_vblur.bin | Bin 960 -> 0 bytes .../shaders/dx9/fs_shadowmaps_vblur_vsm.bin | Bin 1152 -> 0 bytes .../dx9/fs_shadowvolume_color_lighting.bin | Bin 1932 -> 0 bytes .../dx9/fs_shadowvolume_color_texture.bin | Bin 574 -> 0 bytes .../dx9/fs_shadowvolume_svbackblank.bin | Bin 147 -> 0 bytes .../dx9/fs_shadowvolume_svbackcolor.bin | Bin 227 -> 0 bytes .../dx9/fs_shadowvolume_svbacktex1.bin | Bin 179 -> 0 bytes .../dx9/fs_shadowvolume_svbacktex2.bin | Bin 179 -> 0 bytes .../dx9/fs_shadowvolume_svfrontblank.bin | Bin 147 -> 0 bytes .../dx9/fs_shadowvolume_svfrontcolor.bin | Bin 227 -> 0 bytes .../dx9/fs_shadowvolume_svfronttex1.bin | Bin 179 -> 0 bytes .../dx9/fs_shadowvolume_svfronttex2.bin | Bin 179 -> 0 bytes .../shaders/dx9/fs_shadowvolume_svside.bin | Bin 255 -> 0 bytes .../dx9/fs_shadowvolume_svsideblank.bin | Bin 147 -> 0 bytes .../dx9/fs_shadowvolume_svsidecolor.bin | Bin 227 -> 0 bytes .../shaders/dx9/fs_shadowvolume_svsidetex.bin | Bin 354 -> 0 bytes .../shaders/dx9/fs_shadowvolume_texture.bin | Bin 218 -> 0 bytes .../dx9/fs_shadowvolume_texture_lighting.bin | Bin 2083 -> 0 bytes examples/runtime/shaders/dx9/fs_sky.bin | Bin 651 -> 0 bytes .../shaders/dx9/fs_sky_color_banding_fix.bin | Bin 1287 -> 0 bytes .../runtime/shaders/dx9/fs_sky_landscape.bin | Bin 1439 -> 0 bytes examples/runtime/shaders/dx9/fs_sms_mesh.bin | Bin 2466 -> 0 bytes .../runtime/shaders/dx9/fs_sms_mesh_pd.bin | Bin 3302 -> 0 bytes .../runtime/shaders/dx9/fs_sms_shadow.bin | Bin 147 -> 0 bytes .../runtime/shaders/dx9/fs_sms_shadow_pd.bin | Bin 350 -> 0 bytes .../shaders/dx9/fs_sss_deferred_combine.bin | Bin 1471 -> 0 bytes .../runtime/shaders/dx9/fs_sss_gbuffer.bin | Bin 1401 -> 0 bytes .../shaders/dx9/fs_sss_linear_depth.bin | Bin 320 -> 0 bytes examples/runtime/shaders/dx9/fs_sss_unlit.bin | Bin 563 -> 0 bytes .../shaders/dx9/fs_stencil_color_black.bin | Bin 147 -> 0 bytes .../shaders/dx9/fs_stencil_color_lighting.bin | Bin 1990 -> 0 bytes .../shaders/dx9/fs_stencil_color_texture.bin | Bin 574 -> 0 bytes .../shaders/dx9/fs_stencil_texture.bin | Bin 218 -> 0 bytes .../dx9/fs_stencil_texture_lighting.bin | Bin 2185 -> 0 bytes examples/runtime/shaders/dx9/fs_terrain.bin | Bin 195 -> 0 bytes examples/runtime/shaders/dx9/fs_tree.bin | Bin 1024 -> 0 bytes examples/runtime/shaders/dx9/fs_update.bin | Bin 217 -> 0 bytes examples/runtime/shaders/dx9/fs_update_3d.bin | Bin 429 -> 0 bytes .../runtime/shaders/dx9/fs_update_cmp.bin | Bin 262 -> 0 bytes examples/runtime/shaders/dx9/fs_upsample.bin | Bin 801 -> 0 bytes .../shaders/dx9/fs_vectordisplay_blit.bin | Bin 327 -> 0 bytes .../shaders/dx9/fs_vectordisplay_blur.bin | Bin 815 -> 0 bytes .../shaders/dx9/fs_vectordisplay_fb.bin | Bin 339 -> 0 bytes examples/runtime/shaders/dx9/fs_vt_mip.bin | Bin 667 -> 0 bytes examples/runtime/shaders/dx9/fs_vt_unlit.bin | Bin 950 -> 0 bytes examples/runtime/shaders/dx9/fs_wf_mesh.bin | Bin 1016 -> 0 bytes .../runtime/shaders/dx9/fs_wf_wireframe.bin | Bin 520 -> 0 bytes .../runtime/shaders/dx9/vs_albedo_output.bin | Bin 586 -> 0 bytes .../runtime/shaders/dx9/vs_bokeh_forward.bin | Bin 789 -> 0 bytes .../shaders/dx9/vs_bokeh_screenquad.bin | Bin 319 -> 0 bytes examples/runtime/shaders/dx9/vs_bump.bin | Bin 973 -> 0 bytes .../runtime/shaders/dx9/vs_bump_instanced.bin | Bin 941 -> 0 bytes examples/runtime/shaders/dx9/vs_bunnylod.bin | Bin 495 -> 0 bytes examples/runtime/shaders/dx9/vs_callback.bin | Bin 463 -> 0 bytes examples/runtime/shaders/dx9/vs_cubes.bin | Bin 319 -> 0 bytes .../shaders/dx9/vs_deferred_combine.bin | Bin 319 -> 0 bytes .../runtime/shaders/dx9/vs_deferred_debug.bin | Bin 319 -> 0 bytes .../shaders/dx9/vs_deferred_debug_line.bin | Bin 319 -> 0 bytes .../runtime/shaders/dx9/vs_deferred_geom.bin | Bin 1093 -> 0 bytes .../runtime/shaders/dx9/vs_deferred_light.bin | Bin 319 -> 0 bytes .../shaders/dx9/vs_denoise_gbuffer.bin | Bin 970 -> 0 bytes .../shaders/dx9/vs_denoise_screenquad.bin | Bin 319 -> 0 bytes .../runtime/shaders/dx9/vs_fullscreen.bin | Bin 319 -> 0 bytes examples/runtime/shaders/dx9/vs_hdr_blur.bin | Bin 667 -> 0 bytes .../runtime/shaders/dx9/vs_hdr_bright.bin | Bin 319 -> 0 bytes examples/runtime/shaders/dx9/vs_hdr_lum.bin | Bin 319 -> 0 bytes .../runtime/shaders/dx9/vs_hdr_lumavg.bin | Bin 319 -> 0 bytes examples/runtime/shaders/dx9/vs_hdr_mesh.bin | Bin 579 -> 0 bytes .../runtime/shaders/dx9/vs_hdr_skybox.bin | Bin 319 -> 0 bytes .../runtime/shaders/dx9/vs_hdr_tonemap.bin | Bin 655 -> 0 bytes examples/runtime/shaders/dx9/vs_ibl_mesh.bin | Bin 632 -> 0 bytes .../runtime/shaders/dx9/vs_ibl_skybox.bin | Bin 607 -> 0 bytes .../runtime/shaders/dx9/vs_instancing.bin | Bin 476 -> 0 bytes examples/runtime/shaders/dx9/vs_mesh.bin | Bin 986 -> 0 bytes examples/runtime/shaders/dx9/vs_oit.bin | Bin 557 -> 0 bytes examples/runtime/shaders/dx9/vs_oit_blit.bin | Bin 319 -> 0 bytes examples/runtime/shaders/dx9/vs_particle.bin | Bin 686 -> 0 bytes .../runtime/shaders/dx9/vs_picking_shaded.bin | Bin 678 -> 0 bytes examples/runtime/shaders/dx9/vs_pom.bin | Bin 1033 -> 0 bytes .../runtime/shaders/dx9/vs_raymarching.bin | Bin 355 -> 0 bytes .../runtime/shaders/dx9/vs_rsm_combine.bin | Bin 319 -> 0 bytes .../runtime/shaders/dx9/vs_rsm_gbuffer.bin | Bin 499 -> 0 bytes .../runtime/shaders/dx9/vs_rsm_lbuffer.bin | Bin 912 -> 0 bytes .../runtime/shaders/dx9/vs_rsm_shadow.bin | Bin 503 -> 0 bytes .../shaders/dx9/vs_shadowmaps_color.bin | Bin 283 -> 0 bytes .../dx9/vs_shadowmaps_color_lighting.bin | Bin 808 -> 0 bytes .../dx9/vs_shadowmaps_color_lighting_csm.bin | Bin 1465 -> 0 bytes .../vs_shadowmaps_color_lighting_linear.bin | Bin 824 -> 0 bytes ...s_shadowmaps_color_lighting_linear_csm.bin | Bin 1529 -> 0 bytes ..._shadowmaps_color_lighting_linear_omni.bin | Bin 1476 -> 0 bytes .../dx9/vs_shadowmaps_color_lighting_omni.bin | Bin 1412 -> 0 bytes .../dx9/vs_shadowmaps_color_texture.bin | Bin 319 -> 0 bytes .../shaders/dx9/vs_shadowmaps_depth.bin | Bin 283 -> 0 bytes .../shaders/dx9/vs_shadowmaps_hblur.bin | Bin 758 -> 0 bytes .../shaders/dx9/vs_shadowmaps_packdepth.bin | Bin 319 -> 0 bytes .../dx9/vs_shadowmaps_packdepth_linear.bin | Bin 351 -> 0 bytes .../shaders/dx9/vs_shadowmaps_texture.bin | Bin 319 -> 0 bytes .../dx9/vs_shadowmaps_texture_lighting.bin | Bin 579 -> 0 bytes .../shaders/dx9/vs_shadowmaps_unpackdepth.bin | Bin 319 -> 0 bytes .../shaders/dx9/vs_shadowmaps_vblur.bin | Bin 758 -> 0 bytes .../dx9/vs_shadowvolume_color_lighting.bin | Bin 543 -> 0 bytes .../dx9/vs_shadowvolume_color_texture.bin | Bin 319 -> 0 bytes .../shaders/dx9/vs_shadowvolume_svback.bin | Bin 439 -> 0 bytes .../shaders/dx9/vs_shadowvolume_svfront.bin | Bin 283 -> 0 bytes .../shaders/dx9/vs_shadowvolume_svside.bin | Bin 547 -> 0 bytes .../shaders/dx9/vs_shadowvolume_texture.bin | Bin 319 -> 0 bytes .../dx9/vs_shadowvolume_texture_lighting.bin | Bin 579 -> 0 bytes examples/runtime/shaders/dx9/vs_sky.bin | Bin 2124 -> 0 bytes .../runtime/shaders/dx9/vs_sky_landscape.bin | Bin 503 -> 0 bytes examples/runtime/shaders/dx9/vs_sms_mesh.bin | Bin 742 -> 0 bytes .../runtime/shaders/dx9/vs_sms_shadow.bin | Bin 283 -> 0 bytes .../runtime/shaders/dx9/vs_sms_shadow_pd.bin | Bin 319 -> 0 bytes .../runtime/shaders/dx9/vs_sss_gbuffer.bin | Bin 643 -> 0 bytes .../runtime/shaders/dx9/vs_sss_screenquad.bin | Bin 319 -> 0 bytes .../runtime/shaders/dx9/vs_stencil_color.bin | Bin 283 -> 0 bytes .../shaders/dx9/vs_stencil_color_lighting.bin | Bin 543 -> 0 bytes .../shaders/dx9/vs_stencil_color_texture.bin | Bin 319 -> 0 bytes .../shaders/dx9/vs_stencil_texture.bin | Bin 319 -> 0 bytes .../dx9/vs_stencil_texture_lighting.bin | Bin 579 -> 0 bytes examples/runtime/shaders/dx9/vs_terrain.bin | Bin 343 -> 0 bytes .../shaders/dx9/vs_terrain_height_texture.bin | Bin 515 -> 0 bytes examples/runtime/shaders/dx9/vs_tree.bin | Bin 631 -> 0 bytes examples/runtime/shaders/dx9/vs_update.bin | Bin 319 -> 0 bytes .../shaders/dx9/vs_vectordisplay_fb.bin | Bin 355 -> 0 bytes .../runtime/shaders/dx9/vs_vt_generic.bin | Bin 442 -> 0 bytes examples/runtime/shaders/dx9/vs_wf_mesh.bin | Bin 668 -> 0 bytes .../runtime/shaders/dx9/vs_wf_wireframe.bin | Bin 544 -> 0 bytes include/bgfx/bgfx.h | 1 - include/bgfx/c99/bgfx.h | 31 +- include/bgfx/defines.h | 2 +- include/bgfx/embedded_shader.h | 12 - scripts/bgfx.idl | 3 +- src/amalgamated.cpp | 2 - src/bgfx.cpp | 26 +- src/makefile | 28 +- src/renderer_d3d9.cpp | 4606 ----------------- src/renderer_d3d9.h | 513 -- src/shader.cpp | 19 +- src/shader.h | 3 + src/shader_dx9bc.cpp | 755 --- src/shader_dx9bc.h | 268 - src/shader_spirv.cpp | 6 +- src/shader_spirv.h | 3 - src/version.h | 4 +- src/vertexlayout.cpp | 14 +- tools/shaderc/shaderc.cpp | 1 - 262 files changed, 185 insertions(+), 6528 deletions(-) delete mode 100644 examples/runtime/shaders/dx9/fs_albedo_output.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bloom_combine.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bokeh_copy.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bokeh_copy_linear_to_gamma.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bokeh_dof_combine.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bokeh_dof_debug.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bokeh_dof_downsample.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bokeh_dof_second_pass.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bokeh_dof_single_pass.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bokeh_forward.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bokeh_forward_grid.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bokeh_linear_depth.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bump.bin delete mode 100644 examples/runtime/shaders/dx9/fs_bunnylod.bin delete mode 100644 examples/runtime/shaders/dx9/fs_callback.bin delete mode 100644 examples/runtime/shaders/dx9/fs_cubes.bin delete mode 100644 examples/runtime/shaders/dx9/fs_deferred_combine.bin delete mode 100644 examples/runtime/shaders/dx9/fs_deferred_debug.bin delete mode 100644 examples/runtime/shaders/dx9/fs_deferred_debug_line.bin delete mode 100644 examples/runtime/shaders/dx9/fs_deferred_geom.bin delete mode 100644 examples/runtime/shaders/dx9/fs_deferred_light.bin delete mode 100644 examples/runtime/shaders/dx9/fs_denoise_apply_lighting.bin delete mode 100644 examples/runtime/shaders/dx9/fs_denoise_copy.bin delete mode 100644 examples/runtime/shaders/dx9/fs_denoise_deferred_combine.bin delete mode 100644 examples/runtime/shaders/dx9/fs_denoise_gbuffer.bin delete mode 100644 examples/runtime/shaders/dx9/fs_denoise_spatial_3x3.bin delete mode 100644 examples/runtime/shaders/dx9/fs_denoise_spatial_5x5.bin delete mode 100644 examples/runtime/shaders/dx9/fs_denoise_temporal.bin delete mode 100644 examples/runtime/shaders/dx9/fs_denoise_txaa.bin delete mode 100644 examples/runtime/shaders/dx9/fs_downsample.bin delete mode 100644 examples/runtime/shaders/dx9/fs_hdr_blur.bin delete mode 100644 examples/runtime/shaders/dx9/fs_hdr_bright.bin delete mode 100644 examples/runtime/shaders/dx9/fs_hdr_lum.bin delete mode 100644 examples/runtime/shaders/dx9/fs_hdr_lumavg.bin delete mode 100644 examples/runtime/shaders/dx9/fs_hdr_mesh.bin delete mode 100644 examples/runtime/shaders/dx9/fs_hdr_skybox.bin delete mode 100644 examples/runtime/shaders/dx9/fs_hdr_tonemap.bin delete mode 100644 examples/runtime/shaders/dx9/fs_ibl_mesh.bin delete mode 100644 examples/runtime/shaders/dx9/fs_ibl_skybox.bin delete mode 100644 examples/runtime/shaders/dx9/fs_instancing.bin delete mode 100644 examples/runtime/shaders/dx9/fs_mesh.bin delete mode 100644 examples/runtime/shaders/dx9/fs_oit.bin delete mode 100644 examples/runtime/shaders/dx9/fs_oit_wb.bin delete mode 100644 examples/runtime/shaders/dx9/fs_oit_wb_blit.bin delete mode 100644 examples/runtime/shaders/dx9/fs_oit_wb_separate.bin delete mode 100644 examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.bin delete mode 100644 examples/runtime/shaders/dx9/fs_particle.bin delete mode 100644 examples/runtime/shaders/dx9/fs_picking_id.bin delete mode 100644 examples/runtime/shaders/dx9/fs_picking_shaded.bin delete mode 100644 examples/runtime/shaders/dx9/fs_pom.bin delete mode 100644 examples/runtime/shaders/dx9/fs_raymarching.bin delete mode 100644 examples/runtime/shaders/dx9/fs_rsm_combine.bin delete mode 100644 examples/runtime/shaders/dx9/fs_rsm_gbuffer.bin delete mode 100644 examples/runtime/shaders/dx9/fs_rsm_lbuffer.bin delete mode 100644 examples/runtime/shaders/dx9/fs_rsm_shadow.bin delete mode 100644 examples/runtime/shaders/dx9/fs_screen_space_shadows.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_black.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm_csm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm_linear.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm_linear_csm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm_linear_omni.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm_omni.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard_csm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard_linear.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard_linear_csm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard_linear_omni.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard_omni.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_csm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_linear.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_linear_csm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_linear_omni.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_omni.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_csm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_linear.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_linear_csm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_linear_omni.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_omni.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_hblur.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_packdepth.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm_linear.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_texture.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_vblur.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_color_lighting.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex1.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex1.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svside.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_svsidetex.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_texture.bin delete mode 100644 examples/runtime/shaders/dx9/fs_shadowvolume_texture_lighting.bin delete mode 100644 examples/runtime/shaders/dx9/fs_sky.bin delete mode 100644 examples/runtime/shaders/dx9/fs_sky_color_banding_fix.bin delete mode 100644 examples/runtime/shaders/dx9/fs_sky_landscape.bin delete mode 100644 examples/runtime/shaders/dx9/fs_sms_mesh.bin delete mode 100644 examples/runtime/shaders/dx9/fs_sms_mesh_pd.bin delete mode 100644 examples/runtime/shaders/dx9/fs_sms_shadow.bin delete mode 100644 examples/runtime/shaders/dx9/fs_sms_shadow_pd.bin delete mode 100644 examples/runtime/shaders/dx9/fs_sss_deferred_combine.bin delete mode 100644 examples/runtime/shaders/dx9/fs_sss_gbuffer.bin delete mode 100644 examples/runtime/shaders/dx9/fs_sss_linear_depth.bin delete mode 100644 examples/runtime/shaders/dx9/fs_sss_unlit.bin delete mode 100644 examples/runtime/shaders/dx9/fs_stencil_color_black.bin delete mode 100644 examples/runtime/shaders/dx9/fs_stencil_color_lighting.bin delete mode 100644 examples/runtime/shaders/dx9/fs_stencil_color_texture.bin delete mode 100644 examples/runtime/shaders/dx9/fs_stencil_texture.bin delete mode 100644 examples/runtime/shaders/dx9/fs_stencil_texture_lighting.bin delete mode 100644 examples/runtime/shaders/dx9/fs_terrain.bin delete mode 100644 examples/runtime/shaders/dx9/fs_tree.bin delete mode 100644 examples/runtime/shaders/dx9/fs_update.bin delete mode 100644 examples/runtime/shaders/dx9/fs_update_3d.bin delete mode 100644 examples/runtime/shaders/dx9/fs_update_cmp.bin delete mode 100644 examples/runtime/shaders/dx9/fs_upsample.bin delete mode 100644 examples/runtime/shaders/dx9/fs_vectordisplay_blit.bin delete mode 100644 examples/runtime/shaders/dx9/fs_vectordisplay_blur.bin delete mode 100644 examples/runtime/shaders/dx9/fs_vectordisplay_fb.bin delete mode 100644 examples/runtime/shaders/dx9/fs_vt_mip.bin delete mode 100644 examples/runtime/shaders/dx9/fs_vt_unlit.bin delete mode 100644 examples/runtime/shaders/dx9/fs_wf_mesh.bin delete mode 100644 examples/runtime/shaders/dx9/fs_wf_wireframe.bin delete mode 100644 examples/runtime/shaders/dx9/vs_albedo_output.bin delete mode 100644 examples/runtime/shaders/dx9/vs_bokeh_forward.bin delete mode 100644 examples/runtime/shaders/dx9/vs_bokeh_screenquad.bin delete mode 100644 examples/runtime/shaders/dx9/vs_bump.bin delete mode 100644 examples/runtime/shaders/dx9/vs_bump_instanced.bin delete mode 100644 examples/runtime/shaders/dx9/vs_bunnylod.bin delete mode 100644 examples/runtime/shaders/dx9/vs_callback.bin delete mode 100644 examples/runtime/shaders/dx9/vs_cubes.bin delete mode 100644 examples/runtime/shaders/dx9/vs_deferred_combine.bin delete mode 100644 examples/runtime/shaders/dx9/vs_deferred_debug.bin delete mode 100644 examples/runtime/shaders/dx9/vs_deferred_debug_line.bin delete mode 100644 examples/runtime/shaders/dx9/vs_deferred_geom.bin delete mode 100644 examples/runtime/shaders/dx9/vs_deferred_light.bin delete mode 100644 examples/runtime/shaders/dx9/vs_denoise_gbuffer.bin delete mode 100644 examples/runtime/shaders/dx9/vs_denoise_screenquad.bin delete mode 100644 examples/runtime/shaders/dx9/vs_fullscreen.bin delete mode 100644 examples/runtime/shaders/dx9/vs_hdr_blur.bin delete mode 100644 examples/runtime/shaders/dx9/vs_hdr_bright.bin delete mode 100644 examples/runtime/shaders/dx9/vs_hdr_lum.bin delete mode 100644 examples/runtime/shaders/dx9/vs_hdr_lumavg.bin delete mode 100644 examples/runtime/shaders/dx9/vs_hdr_mesh.bin delete mode 100644 examples/runtime/shaders/dx9/vs_hdr_skybox.bin delete mode 100644 examples/runtime/shaders/dx9/vs_hdr_tonemap.bin delete mode 100644 examples/runtime/shaders/dx9/vs_ibl_mesh.bin delete mode 100644 examples/runtime/shaders/dx9/vs_ibl_skybox.bin delete mode 100644 examples/runtime/shaders/dx9/vs_instancing.bin delete mode 100644 examples/runtime/shaders/dx9/vs_mesh.bin delete mode 100644 examples/runtime/shaders/dx9/vs_oit.bin delete mode 100644 examples/runtime/shaders/dx9/vs_oit_blit.bin delete mode 100644 examples/runtime/shaders/dx9/vs_particle.bin delete mode 100644 examples/runtime/shaders/dx9/vs_picking_shaded.bin delete mode 100644 examples/runtime/shaders/dx9/vs_pom.bin delete mode 100644 examples/runtime/shaders/dx9/vs_raymarching.bin delete mode 100644 examples/runtime/shaders/dx9/vs_rsm_combine.bin delete mode 100644 examples/runtime/shaders/dx9/vs_rsm_gbuffer.bin delete mode 100644 examples/runtime/shaders/dx9/vs_rsm_lbuffer.bin delete mode 100644 examples/runtime/shaders/dx9/vs_rsm_shadow.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_color.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_csm.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_linear.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_linear_csm.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_linear_omni.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_omni.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_depth.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_hblur.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_packdepth.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_packdepth_linear.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_texture.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_texture_lighting.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowmaps_vblur.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowvolume_color_lighting.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowvolume_color_texture.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowvolume_svback.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowvolume_svfront.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowvolume_svside.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowvolume_texture.bin delete mode 100644 examples/runtime/shaders/dx9/vs_shadowvolume_texture_lighting.bin delete mode 100644 examples/runtime/shaders/dx9/vs_sky.bin delete mode 100644 examples/runtime/shaders/dx9/vs_sky_landscape.bin delete mode 100644 examples/runtime/shaders/dx9/vs_sms_mesh.bin delete mode 100644 examples/runtime/shaders/dx9/vs_sms_shadow.bin delete mode 100644 examples/runtime/shaders/dx9/vs_sms_shadow_pd.bin delete mode 100644 examples/runtime/shaders/dx9/vs_sss_gbuffer.bin delete mode 100644 examples/runtime/shaders/dx9/vs_sss_screenquad.bin delete mode 100644 examples/runtime/shaders/dx9/vs_stencil_color.bin delete mode 100644 examples/runtime/shaders/dx9/vs_stencil_color_lighting.bin delete mode 100644 examples/runtime/shaders/dx9/vs_stencil_color_texture.bin delete mode 100644 examples/runtime/shaders/dx9/vs_stencil_texture.bin delete mode 100644 examples/runtime/shaders/dx9/vs_stencil_texture_lighting.bin delete mode 100644 examples/runtime/shaders/dx9/vs_terrain.bin delete mode 100644 examples/runtime/shaders/dx9/vs_terrain_height_texture.bin delete mode 100644 examples/runtime/shaders/dx9/vs_tree.bin delete mode 100644 examples/runtime/shaders/dx9/vs_update.bin delete mode 100644 examples/runtime/shaders/dx9/vs_vectordisplay_fb.bin delete mode 100644 examples/runtime/shaders/dx9/vs_vt_generic.bin delete mode 100644 examples/runtime/shaders/dx9/vs_wf_mesh.bin delete mode 100644 examples/runtime/shaders/dx9/vs_wf_wireframe.bin delete mode 100644 src/renderer_d3d9.cpp delete mode 100644 src/renderer_d3d9.h delete mode 100644 src/shader_dx9bc.cpp delete mode 100644 src/shader_dx9bc.h diff --git a/bindings/bf/bgfx.bf b/bindings/bf/bgfx.bf index cc13110fcc1..8863838bbc5 100644 --- a/bindings/bf/bgfx.bf +++ b/bindings/bf/bgfx.bf @@ -1374,11 +1374,6 @@ public static class bgfx /// Agc, - /// - /// Direct3D 9.0 - /// - Direct3D9, - /// /// Direct3D 11.0 /// diff --git a/bindings/cs/bgfx.cs b/bindings/cs/bgfx.cs index baccff2c34d..ba23a0e8904 100644 --- a/bindings/cs/bgfx.cs +++ b/bindings/cs/bgfx.cs @@ -1371,11 +1371,6 @@ public enum RendererType /// Agc, - /// - /// Direct3D 9.0 - /// - Direct3D9, - /// /// Direct3D 11.0 /// diff --git a/bindings/d/fakeenum.d b/bindings/d/fakeenum.d index 4fdc6135462..6cc10fa5cbb 100644 --- a/bindings/d/fakeenum.d +++ b/bindings/d/fakeenum.d @@ -14,7 +14,7 @@ extern(C++, "bgfx") package final abstract class Fatal{ } extern(C++, "bgfx") package final abstract class RendererType{ enum Enum{ - noop,agc,direct3D9,direct3D11,direct3D12,gnm,metal,nvn,openGLES,openGL,vulkan,webGPU,count + noop,agc,direct3D11,direct3D12,gnm,metal,nvn,openGLES,openGL,vulkan,webGPU,count } } extern(C++, "bgfx") package final abstract class Access{ @@ -72,6 +72,11 @@ extern(C++, "bgfx") package final abstract class ViewMode{ default_,sequential,depthAscending,depthDescending,count } } +extern(C++, "bgfx") package final abstract class NativeWindowHandleType{ + enum Enum{ + default_,wayland,count + } +} extern(C++, "bgfx") package final abstract class RenderFrame{ enum Enum{ noContext,render,timeout,exiting,count diff --git a/bindings/d/package.d b/bindings/d/package.d index 606959c60fa..67e94e890d0 100644 --- a/bindings/d/package.d +++ b/bindings/d/package.d @@ -10,7 +10,7 @@ import bindbc.bgfx.config; import bindbc.common.types: va_list; static import bgfx.fakeenum; -enum uint apiVersion = 122; +enum uint apiVersion = 123; alias ViewID = ushort; deprecated("Please use `ViewID` instead.") alias ViewId = ushort; @@ -592,7 +592,6 @@ enum Fatal: bgfx.fakeenum.Fatal.Enum{ enum RendererType: bgfx.fakeenum.RendererType.Enum{ noop = bgfx.fakeenum.RendererType.Enum.noop, agc = bgfx.fakeenum.RendererType.Enum.agc, - direct3D9 = bgfx.fakeenum.RendererType.Enum.direct3D9, direct3D11 = bgfx.fakeenum.RendererType.Enum.direct3D11, direct3D12 = bgfx.fakeenum.RendererType.Enum.direct3D12, gnm = bgfx.fakeenum.RendererType.Enum.gnm, diff --git a/bindings/zig/bgfx.zig b/bindings/zig/bgfx.zig index 5929268583d..e4c8ef4566f 100644 --- a/bindings/zig/bgfx.zig +++ b/bindings/zig/bgfx.zig @@ -840,9 +840,6 @@ pub const RendererType = enum(c_int) { /// AGC Agc, - /// Direct3D 9.0 - Direct3D9, - /// Direct3D 11.0 Direct3D11, diff --git a/docs/overview.rst b/docs/overview.rst index 58335373c87..e7b3c71979c 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -17,7 +17,6 @@ licensed under permissive BSD-2 clause open source license. Supported rendering backends ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- Direct3D 9 - Direct3D 11 - Direct3D 12 - GNM (only for licensed PS4 developers, search DevNet forums for source) diff --git a/examples/09-hdr/hdr.cpp b/examples/09-hdr/hdr.cpp index 626f10aabd6..6db19d1c830 100644 --- a/examples/09-hdr/hdr.cpp +++ b/examples/09-hdr/hdr.cpp @@ -11,8 +11,6 @@ namespace { -static float s_texelHalf = 0.0f; - struct PosColorTexCoord0Vertex { float m_x; @@ -37,7 +35,7 @@ struct PosColorTexCoord0Vertex bgfx::VertexLayout PosColorTexCoord0Vertex::ms_layout; -void screenSpaceQuad(float _textureWidth, float _textureHeight, bool _originBottomLeft = false, float _width = 1.0f, float _height = 1.0f) +void screenSpaceQuad(bool _originBottomLeft = false, float _width = 1.0f, float _height = 1.0f) { if (3 == bgfx::getAvailTransientVertexBuffer(3, PosColorTexCoord0Vertex::ms_layout) ) { @@ -52,13 +50,11 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, bool _originBott const float miny = 0.0f; const float maxy = _height*2.0f; - const float texelHalfW = s_texelHalf/_textureWidth; - const float texelHalfH = s_texelHalf/_textureHeight; - const float minu = -1.0f + texelHalfW; - const float maxu = 1.0f + texelHalfW; + const float minu = -1.0f; + const float maxu = 1.0f; - float minv = texelHalfH; - float maxv = 2.0f + texelHalfH; + float minv = 0.0f; + float maxv = 2.0f; if (_originBottomLeft) { @@ -107,8 +103,8 @@ void setOffsets2x2Lum(bgfx::UniformHandle _handle, uint32_t _width, uint32_t _he { for (uint32_t xx = 0; xx < 3; ++xx) { - offsets[num][0] = (xx - s_texelHalf) * du; - offsets[num][1] = (yy - s_texelHalf) * dv; + offsets[num][0] = xx * du; + offsets[num][1] = yy * dv; ++num; } } @@ -128,8 +124,8 @@ void setOffsets4x4Lum(bgfx::UniformHandle _handle, uint32_t _width, uint32_t _he { for (uint32_t xx = 0; xx < 4; ++xx) { - offsets[num][0] = (xx - 1.0f - s_texelHalf) * du; - offsets[num][1] = (yy - 1.0f - s_texelHalf) * dv; + offsets[num][0] = (xx - 1.0f) * du; + offsets[num][1] = (yy - 1.0f) * dv; ++num; } } @@ -221,7 +217,6 @@ class ExampleHDR : public entry::AppI imguiCreate(); m_caps = bgfx::getCaps(); - s_texelHalf = bgfx::RendererType::Direct3D9 == m_caps->rendererType ? 0.5f : 0.0f; m_oldWidth = 0; m_oldHeight = 0; @@ -496,7 +491,7 @@ class ExampleHDR : public entry::AppI bgfx::setTexture(0, s_texCube, m_uffizi); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); bgfx::setUniform(u_mtx, mtx); - screenSpaceQuad( (float)m_width, (float)m_height, true); + screenSpaceQuad(true); bgfx::submit(hdrSkybox, m_skyProgram); // Render m_mesh into view hdrMesh. @@ -508,35 +503,35 @@ class ExampleHDR : public entry::AppI setOffsets2x2Lum(u_offset, 128, 128); bgfx::setTexture(0, s_texColor, m_fbtextures[0]); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad(128.0f, 128.0f, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(hdrLuminance, m_lumProgram); // Downscale luminance 0. setOffsets4x4Lum(u_offset, 128, 128); bgfx::setTexture(0, s_texColor, bgfx::getTexture(m_lum[0]) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad(64.0f, 64.0f, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(hdrLumScale0, m_lumAvgProgram); // Downscale luminance 1. setOffsets4x4Lum(u_offset, 64, 64); bgfx::setTexture(0, s_texColor, bgfx::getTexture(m_lum[1]) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad(16.0f, 16.0f, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(hdrLumScale1, m_lumAvgProgram); // Downscale luminance 2. setOffsets4x4Lum(u_offset, 16, 16); bgfx::setTexture(0, s_texColor, bgfx::getTexture(m_lum[2]) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad(4.0f, 4.0f, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(hdrLumScale2, m_lumAvgProgram); // Downscale luminance 3. setOffsets4x4Lum(u_offset, 4, 4); bgfx::setTexture(0, s_texColor, bgfx::getTexture(m_lum[3]) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad(1.0f, 1.0f, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(hdrLumScale3, m_lumAvgProgram); // m_bright pass m_threshold is tonemap[3]. @@ -545,14 +540,14 @@ class ExampleHDR : public entry::AppI bgfx::setTexture(1, s_texLum, bgfx::getTexture(m_lum[4]) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); bgfx::setUniform(u_tonemap, tonemap); - screenSpaceQuad( (float)m_width/2.0f, (float)m_height/2.0f, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(hdrBrightness, m_brightProgram); // m_blur m_bright pass vertically. bgfx::setTexture(0, s_texColor, bgfx::getTexture(m_bright) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); bgfx::setUniform(u_tonemap, tonemap); - screenSpaceQuad( (float)m_width/8.0f, (float)m_height/8.0f, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(hdrVBlur, m_blurProgram); // m_blur m_bright pass horizontally, do tonemaping and combine. @@ -560,7 +555,7 @@ class ExampleHDR : public entry::AppI bgfx::setTexture(1, s_texLum, bgfx::getTexture(m_lum[4]) ); bgfx::setTexture(2, s_texBlur, bgfx::getTexture(m_blur) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad( (float)m_width, (float)m_height, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(hdrHBlurTonemap, m_tonemapProgram); if (bgfx::isValid(m_rb) ) diff --git a/examples/10-font/font.cpp b/examples/10-font/font.cpp index 0a886594ce0..71921ca3d03 100644 --- a/examples/10-font/font.cpp +++ b/examples/10-font/font.cpp @@ -269,21 +269,16 @@ class ExampleFont : public entry::AppI float view[16]; bx::mtxLookAt(view, eye, at); - float centering = 0.0f; - if (bgfx::getRendererType() == bgfx::RendererType::Direct3D9) { - centering = -0.5f; - } - // Setup a top-left ortho matrix for screen space drawing. const bgfx::Caps* caps = bgfx::getCaps(); { float ortho[16]; bx::mtxOrtho( ortho - , centering - , m_width + centering - , m_height + centering - , centering + , 0.0f + , m_width + , m_height + , 0.0f , 0.0f , 100.0f , 0.0f diff --git a/examples/11-fontsdf/fontsdf.cpp b/examples/11-fontsdf/fontsdf.cpp index 08a2dbf5372..8154e356b89 100644 --- a/examples/11-fontsdf/fontsdf.cpp +++ b/examples/11-fontsdf/fontsdf.cpp @@ -256,16 +256,11 @@ class ExampleFontSDF : public entry::AppI float view[16]; bx::mtxLookAt(view, eye, at); - float centering = 0.0f; - if (bgfx::getRendererType() == bgfx::RendererType::Direct3D9) { - centering = -0.5f; - } - // Setup a top-left ortho matrix for screen space drawing. const bgfx::Caps* caps = bgfx::getCaps(); { float ortho[16]; - bx::mtxOrtho(ortho, centering, m_width + centering, m_height + centering, centering, -1.0f, 1.0f, 0.0f, caps->homogeneousDepth); + bx::mtxOrtho(ortho, 0.0f, m_width, m_height, 0.0f, -1.0f, 1.0f, 0.0f, caps->homogeneousDepth); bgfx::setViewTransform(0, view, ortho); bgfx::setViewRect(0, 0, 0, uint16_t(m_width), uint16_t(m_height) ); } diff --git a/examples/14-shadowvolumes/shadowvolumes.cpp b/examples/14-shadowvolumes/shadowvolumes.cpp index 48828eba6a1..f90aec05dfa 100644 --- a/examples/14-shadowvolumes/shadowvolumes.cpp +++ b/examples/14-shadowvolumes/shadowvolumes.cpp @@ -89,7 +89,6 @@ static const uint16_t s_planeIndices[] = }; static bool s_oglNdc = false; -static float s_texelHalf = 0.0f; static uint32_t s_viewMask = 0; @@ -1797,7 +1796,6 @@ class ExampleShadowVolumes : public entry::AppI const bgfx::Caps* caps = bgfx::getCaps(); s_oglNdc = caps->homogeneousDepth; - s_texelHalf = bgfx::RendererType::Direct3D9 == caps->rendererType ? 0.5f : 0.0f; // Imgui imguiCreate(); @@ -2187,7 +2185,7 @@ class ExampleShadowVolumes : public entry::AppI //update settings s_uniforms.m_params.m_ambientPass = 1.0f; s_uniforms.m_params.m_lightingPass = 1.0f; - s_uniforms.m_params.m_texelHalf = s_texelHalf; + s_uniforms.m_params.m_texelHalf = 0.0f; s_uniforms.m_svparams.m_useStencilTex = float(m_useStencilTexture); //set picked bunny model diff --git a/examples/16-shadowmaps/shadowmaps.cpp b/examples/16-shadowmaps/shadowmaps.cpp index e85f6dfab81..03ef90e9963 100644 --- a/examples/16-shadowmaps/shadowmaps.cpp +++ b/examples/16-shadowmaps/shadowmaps.cpp @@ -177,8 +177,7 @@ static const uint16_t s_planeIndices[] = 1, 3, 2, }; -static bool s_flipV = false; -static float s_texelHalf = 0.0f; +static bool s_originBottomLeft = false; static bgfx::UniformHandle s_texColor; static bgfx::UniformHandle s_shadowMap[ShadowMapRenderTargets::Count]; @@ -858,7 +857,7 @@ struct PosColorTexCoord0Vertex bgfx::VertexLayout PosColorTexCoord0Vertex::ms_layout; -void screenSpaceQuad(float _textureWidth, float _textureHeight, bool _originBottomLeft = true, float _width = 1.0f, float _height = 1.0f) +void screenSpaceQuad(bool _originBottomLeft = true, float _width = 1.0f, float _height = 1.0f) { if (3 == bgfx::getAvailTransientVertexBuffer(3, PosColorTexCoord0Vertex::ms_layout) ) { @@ -873,13 +872,11 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, bool _originBott const float miny = 0.0f; const float maxy = _height*2.0f; - const float texelHalfW = s_texelHalf/_textureWidth; - const float texelHalfH = s_texelHalf/_textureHeight; - const float minu = -1.0f + texelHalfW; - const float maxu = 1.0f + texelHalfW; + const float minu = -1.0f; + const float maxu = 1.0f; - float minv = texelHalfH; - float maxv = 2.0f + texelHalfH; + float minv = 0.0f; + float maxv = 2.0f; if (_originBottomLeft) { @@ -1168,22 +1165,7 @@ class ExampleShadowmaps : public entry::AppI // Enable debug text. bgfx::setDebug(m_debug); - // Setup root path for binary shaders. Shader binaries are different - // for each renderer. - switch (bgfx::getRendererType() ) - { - case bgfx::RendererType::Direct3D9: - s_texelHalf = 0.5f; - break; - - case bgfx::RendererType::OpenGL: - case bgfx::RendererType::OpenGLES: - s_flipV = true; - break; - - default: - break; - } + s_originBottomLeft = bgfx::getCaps()->originBottomLeft; // Imgui. imguiCreate(); @@ -2784,12 +2766,12 @@ class ExampleShadowmaps : public entry::AppI { bgfx::setTexture(4, s_shadowMap[0], bgfx::getTexture(s_rtShadowMap[0]) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); + screenSpaceQuad(s_originBottomLeft); bgfx::submit(RENDERVIEW_VBLUR_0_ID, s_programs.m_vBlur[depthType]); bgfx::setTexture(4, s_shadowMap[0], bgfx::getTexture(s_rtBlur) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); + screenSpaceQuad(s_originBottomLeft); bgfx::submit(RENDERVIEW_HBLUR_0_ID, s_programs.m_hBlur[depthType]); if (LightType::DirectionalLight == m_settings.m_lightType) @@ -2800,12 +2782,12 @@ class ExampleShadowmaps : public entry::AppI bgfx::setTexture(4, s_shadowMap[0], bgfx::getTexture(s_rtShadowMap[ii]) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); + screenSpaceQuad(s_originBottomLeft); bgfx::submit(viewId, s_programs.m_vBlur[depthType]); bgfx::setTexture(4, s_shadowMap[0], bgfx::getTexture(s_rtBlur) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); + screenSpaceQuad(s_originBottomLeft); bgfx::submit(viewId+1, s_programs.m_hBlur[depthType]); } } @@ -2816,7 +2798,7 @@ class ExampleShadowmaps : public entry::AppI // Setup shadow mtx. float mtxShadow[16]; - const float ymul = (s_flipV) ? 0.5f : -0.5f; + const float ymul = (s_originBottomLeft) ? 0.5f : -0.5f; float zadd = (DepthImpl::Linear == m_settings.m_depthImpl) ? 0.0f : 0.5f; const float mtxBias[16] = @@ -2835,7 +2817,7 @@ class ExampleShadowmaps : public entry::AppI } else if (LightType::PointLight == m_settings.m_lightType) { - const float s = (s_flipV) ? 1.0f : -1.0f; //sign + const float s = (s_originBottomLeft) ? 1.0f : -1.0f; //sign zadd = (DepthImpl::Linear == m_settings.m_depthImpl) ? 0.0f : 0.5f; const float mtxCropBias[2][TetrahedronFaces::Count][16] = @@ -2912,7 +2894,7 @@ class ExampleShadowmaps : public entry::AppI for (uint8_t ii = 0; ii < TetrahedronFaces::Count; ++ii) { ProjType::Enum projType = (m_settings.m_stencilPack) ? ProjType::Enum(ii>1) : ProjType::Horizontal; - uint8_t biasIndex = cropBiasIndices[m_settings.m_stencilPack][uint8_t(s_flipV)][ii]; + uint8_t biasIndex = cropBiasIndices[m_settings.m_stencilPack][uint8_t(s_originBottomLeft)][ii]; float mtxTmp[16]; bx::mtxMul(mtxTmp, mtxYpr[ii], lightProj[projType]); @@ -3040,7 +3022,7 @@ class ExampleShadowmaps : public entry::AppI { bgfx::setTexture(4, s_shadowMap[0], bgfx::getTexture(s_rtShadowMap[0]) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); + screenSpaceQuad(s_originBottomLeft); bgfx::submit(RENDERVIEW_DRAWDEPTH_0_ID, s_programs.m_drawDepth[depthType]); if (LightType::DirectionalLight == m_settings.m_lightType) @@ -3049,7 +3031,7 @@ class ExampleShadowmaps : public entry::AppI { bgfx::setTexture(4, s_shadowMap[0], bgfx::getTexture(s_rtShadowMap[ii]) ); bgfx::setState(BGFX_STATE_WRITE_RGB|BGFX_STATE_WRITE_A); - screenSpaceQuad(currentShadowMapSizef, currentShadowMapSizef, s_flipV); + screenSpaceQuad(s_originBottomLeft); bgfx::submit(RENDERVIEW_DRAWDEPTH_0_ID+ii, s_programs.m_drawDepth[depthType]); } } diff --git a/examples/21-deferred/deferred.cpp b/examples/21-deferred/deferred.cpp index 5fa1636c190..c77c4f79b3f 100644 --- a/examples/21-deferred/deferred.cpp +++ b/examples/21-deferred/deferred.cpp @@ -19,8 +19,6 @@ constexpr bgfx::ViewId kRenderPassCombine = 3; constexpr bgfx::ViewId kRenderPassDebugLights = 4; constexpr bgfx::ViewId kRenderPassDebugGBuffer = 5; -static float s_texelHalf = 0.0f; - struct PosNormalTangentTexcoordVertex { float m_x; @@ -136,7 +134,7 @@ static const uint16_t s_cubeIndices[36] = 21, 23, 22, }; -void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf, bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) +void screenSpaceQuad(bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) { if (3 == bgfx::getAvailTransientVertexBuffer(3, PosTexCoord0Vertex::ms_layout) ) { @@ -149,15 +147,13 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf const float miny = 0.0f; const float maxy = _height*2.0f; - const float texelHalfW = _texelHalf/_textureWidth; - const float texelHalfH = _texelHalf/_textureHeight; - const float minu = -1.0f + texelHalfW; - const float maxu = 1.0f + texelHalfH; + const float minu = -1.0f; + const float maxu = 1.0f; const float zz = 0.0f; - float minv = texelHalfH; - float maxv = 2.0f + texelHalfH; + float minv = 0.0f; + float maxv = 2.0f; if (_originBottomLeft) { @@ -334,8 +330,6 @@ class ExampleDeferred : public entry::AppI imguiCreate(); m_timeOffset = bx::getHPCounter(); - const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); - s_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f; // Get renderer capabilities info. m_caps = bgfx::getCaps(); @@ -690,7 +684,7 @@ class ExampleDeferred : public entry::AppI // Clear UAV texture if (m_useUav) { - screenSpaceQuad( (float)m_width, (float)m_height, s_texelHalf, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::setViewFrameBuffer(kRenderPassClearUav, BGFX_INVALID_HANDLE); bgfx::setState(0); bgfx::setImage(2, m_lightBufferTex, 0, bgfx::Access::ReadWrite, bgfx::TextureFormat::RGBA8); @@ -817,7 +811,7 @@ class ExampleDeferred : public entry::AppI | BGFX_STATE_WRITE_A | BGFX_STATE_BLEND_ADD ); - screenSpaceQuad( (float)m_width, (float)m_height, s_texelHalf, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); if (bgfx::isValid(m_lightTaProgram) && m_useTArray) @@ -846,7 +840,7 @@ class ExampleDeferred : public entry::AppI | BGFX_STATE_WRITE_RGB | BGFX_STATE_WRITE_A ); - screenSpaceQuad( (float)m_width, (float)m_height, s_texelHalf, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); if (bgfx::isValid(m_lightTaProgram) && m_useTArray) diff --git a/examples/23-vectordisplay/main.cpp b/examples/23-vectordisplay/main.cpp index 213f917b617..5b2903d31a4 100644 --- a/examples/23-vectordisplay/main.cpp +++ b/examples/23-vectordisplay/main.cpp @@ -60,11 +60,7 @@ class ExampleVectorDisplay : public entry::AppI init.resolution.reset = m_reset; bgfx::init(init); - const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); - float texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f; - bool originBottomLeft = bgfx::RendererType::OpenGL == renderer - || bgfx::RendererType::OpenGLES == renderer; - m_vd.init(originBottomLeft, texelHalf); + m_vd.init(bgfx::getCaps()->originBottomLeft); m_vd.setup(uint16_t(m_width), uint16_t(m_height) ); // Enable debug text. diff --git a/examples/23-vectordisplay/vectordisplay.cpp b/examples/23-vectordisplay/vectordisplay.cpp index 719556a8996..3b18a98bd54 100644 --- a/examples/23-vectordisplay/vectordisplay.cpp +++ b/examples/23-vectordisplay/vectordisplay.cpp @@ -52,14 +52,12 @@ inline float normalizef(float _a) VectorDisplay::VectorDisplay() : m_originBottomLeft(false) - , m_texelHalf(false) { } -void VectorDisplay::init(bool _originBottomLeft, float _texelHalf) +void VectorDisplay::init(bool _originBottomLeft) { m_originBottomLeft = _originBottomLeft; - m_texelHalf = _texelHalf; } @@ -238,7 +236,7 @@ void VectorDisplay::endFrame() bgfx::setUniform(u_params, ¶ms); bgfx::setViewTransform(viewCounter, NULL, proj); - screenSpaceQuad(m_glowWidth, m_glowHeight); + screenSpaceQuad(); bgfx::setViewName(viewCounter, "BlendPassA"); bgfx::submit(viewCounter, m_blurShader); @@ -249,7 +247,7 @@ void VectorDisplay::endFrame() bgfx::setTexture(0, s_texColor, bgfx::getTexture(m_glow0FrameBuffer) ); bgfx::setViewTransform(viewCounter, NULL, proj); - screenSpaceQuad(m_glowWidth, m_glowHeight); + screenSpaceQuad(); params[0] = 0.0f; params[1] = 1.0f / m_glowHeight; @@ -288,7 +286,7 @@ void VectorDisplay::endFrame() params[3] = 1.0f; bgfx::setUniform(u_params, params); bgfx::setViewName(viewCounter, "BlendVectorToDisplay"); - screenSpaceQuad(m_screenWidth, m_screenHeight); + screenSpaceQuad(); bgfx::submit(viewCounter, m_blitShader); viewCounter++; @@ -307,7 +305,7 @@ void VectorDisplay::endFrame() params[2] = glow_fin_mult; bgfx::setUniform(u_params, params); bgfx::setViewName(viewCounter, "BlendBlurToDisplay"); - screenSpaceQuad(m_screenWidth, m_screenHeight); + screenSpaceQuad(); bgfx::submit(viewCounter, m_blitShader); viewCounter++; } @@ -767,7 +765,7 @@ void VectorDisplay::getSize(float* _outWidth, float* _outHeight) *_outHeight = m_screenHeight; } -void VectorDisplay::screenSpaceQuad(float _textureWidth, float _textureHeight, float _width, float _height) +void VectorDisplay::screenSpaceQuad(float _width, float _height) { if (3 == getAvailTransientVertexBuffer(3, PosColorUvVertex::ms_layout) ) { @@ -782,13 +780,11 @@ void VectorDisplay::screenSpaceQuad(float _textureWidth, float _textureHeight, f const float miny = 0.0f; const float maxy = _height * 2.0f; - const float texelHalfW = m_texelHalf / _textureWidth; - const float texelHalfH = m_texelHalf / _textureHeight; - const float minu = -1.0f + texelHalfW; - const float maxu = 1.0f + texelHalfW; + const float minu = -1.0f; + const float maxu = 1.0f; - float minv = texelHalfH; - float maxv = 2.0f + texelHalfH; + float minv = 0.0f; + float maxv = 2.0f; if (m_originBottomLeft) { diff --git a/examples/23-vectordisplay/vectordisplay.h b/examples/23-vectordisplay/vectordisplay.h index 3cfc57fa525..d98fcce0dca 100644 --- a/examples/23-vectordisplay/vectordisplay.h +++ b/examples/23-vectordisplay/vectordisplay.h @@ -34,7 +34,7 @@ class VectorDisplay { } - void init(bool _originBottomLeft, float _texelHalf); + void init(bool _originBottomLeft); void setup(uint16_t _width, uint16_t _height, uint8_t _view = 2); void resize(uint16_t _width, uint16_t _height); @@ -110,7 +110,7 @@ class VectorDisplay void getSize(float* _outWidth, float* _outHeight); protected: - void screenSpaceQuad(float _textureWidth, float _textureHeight, float _width = 1.0f, float _height = 1.0f); + void screenSpaceQuad(float _width = 1.0f, float _height = 1.0f); struct PendingPoint { diff --git a/examples/30-picking/picking.cpp b/examples/30-picking/picking.cpp index 9a5c36d8fd8..a9387ecfbe3 100644 --- a/examples/30-picking/picking.cpp +++ b/examples/30-picking/picking.cpp @@ -336,14 +336,6 @@ class ExamplePicking : public entry::AppI uint8_t bb = *x++; uint8_t aa = *x++; - if (bgfx::RendererType::Direct3D9 == caps->rendererType) - { - // Comes back as BGRA - uint8_t temp = rr; - rr = bb; - bb = temp; - } - if (0 == (rr|gg|bb) ) // Skip background { continue; diff --git a/examples/31-rsm/reflectiveshadowmap.cpp b/examples/31-rsm/reflectiveshadowmap.cpp index 65dfe345c2e..3d055f80e65 100644 --- a/examples/31-rsm/reflectiveshadowmap.cpp +++ b/examples/31-rsm/reflectiveshadowmap.cpp @@ -128,7 +128,7 @@ struct PosTexCoord0Vertex bgfx::VertexLayout PosTexCoord0Vertex::ms_layout; // Utility function to draw a screen space quad for deferred rendering -void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf, bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) +void screenSpaceQuad(bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) { if (3 == bgfx::getAvailTransientVertexBuffer(3, PosTexCoord0Vertex::ms_layout) ) { @@ -141,15 +141,13 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf const float miny = 0.0f; const float maxy = _height*2.0f; - const float texelHalfW = _texelHalf/_textureWidth; - const float texelHalfH = _texelHalf/_textureHeight; - const float minu = -1.0f + texelHalfW; - const float maxu = 1.0f + texelHalfH; + const float minu = -1.0f; + const float maxu = 1.0f; const float zz = 0.0f; - float minv = texelHalfH; - float maxv = 2.0f + texelHalfH; + float minv = 0.0f; + float maxv = 2.0f; if (_originBottomLeft) { @@ -195,7 +193,6 @@ class ExampleRSM : public entry::AppI , m_lightAzimuth(215.0f) , m_rsmAmount(0.25f) , m_vplRadius(3.0f) - , m_texelHalf(0.0f) { } @@ -374,8 +371,6 @@ class ExampleRSM : public entry::AppI // Get renderer capabilities info. m_caps = bgfx::getCaps(); - const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); - m_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f; imguiCreate(); } @@ -580,7 +575,7 @@ class ExampleRSM : public entry::AppI bgfx::setViewTransform(RENDER_PASS_COMBINE, NULL, orthoProj); bgfx::setViewRect(RENDER_PASS_COMBINE, 0, 0, uint16_t(m_width), uint16_t(m_height) ); // Bind vertex buffer and draw quad - screenSpaceQuad( (float)m_width, (float)m_height, m_texelHalf, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(RENDER_PASS_COMBINE, m_combineProgram); // Draw UI @@ -754,8 +749,6 @@ class ExampleRSM : public entry::AppI float m_rsmAmount; // Amount of rsm float m_vplRadius; // Radius of virtual point light - - float m_texelHalf; }; } // namespace diff --git a/examples/38-bloom/bloom.cpp b/examples/38-bloom/bloom.cpp index 99dcb730730..33a89170a76 100644 --- a/examples/38-bloom/bloom.cpp +++ b/examples/38-bloom/bloom.cpp @@ -32,8 +32,6 @@ namespace // number of downsampled and then upsampled textures(used for bloom.) #define TEX_CHAIN_LEN 5 -static float s_texelHalf = 0.0f; - struct PosVertex { float m_x; @@ -123,7 +121,7 @@ static const uint16_t s_cubeIndices[36] = 21, 23, 22, }; -void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf, bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) +void screenSpaceQuad(bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) { if (3 == bgfx::getAvailTransientVertexBuffer(3, PosTexCoord0Vertex::ms_layout) ) { @@ -136,15 +134,13 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf const float miny = 0.0f; const float maxy = _height*2.0f; - const float texelHalfW = _texelHalf/_textureWidth; - const float texelHalfH = _texelHalf/_textureHeight; - const float minu = -1.0f + texelHalfW; - const float maxu = 1.0f + texelHalfH; + const float minu = -1.0f; + const float maxu = 1.0f; const float zz = 0.0f; - float minv = texelHalfH; - float maxv = 2.0f + texelHalfH; + float minv = 0.0f; + float maxv = 2.0f; if (_originBottomLeft) { @@ -270,8 +266,6 @@ class ExampleBloom : public entry::AppI imguiCreate(); m_timeOffset = bx::getHPCounter(); - const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); - s_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f; // Get renderer capabilities info. m_caps = bgfx::getCaps(); @@ -554,7 +548,7 @@ class ExampleBloom : public entry::AppI | BGFX_STATE_WRITE_A ); - screenSpaceQuad( (float)m_width, (float)m_height, s_texelHalf, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(RENDER_PASS_DOWNSAMPLE0_ID + ii, m_downsampleProgram); } @@ -584,7 +578,7 @@ class ExampleBloom : public entry::AppI | BGFX_STATE_BLEND_ADD ); - screenSpaceQuad( (float)m_width, (float)m_height, s_texelHalf, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(RENDER_PASS_UPSAMPLE0_ID + ii, m_upsampleProgram); } @@ -595,7 +589,7 @@ class ExampleBloom : public entry::AppI | BGFX_STATE_WRITE_RGB | BGFX_STATE_WRITE_A ); - screenSpaceQuad( (float)m_width, (float)m_height, s_texelHalf, m_caps->originBottomLeft); + screenSpaceQuad(m_caps->originBottomLeft); bgfx::submit(RENDER_PASS_COMBINE_ID, m_combineProgram); } diff --git a/examples/39-assao/assao.cpp b/examples/39-assao/assao.cpp index fbff0f29c98..6dc1de27ce5 100644 --- a/examples/39-assao/assao.cpp +++ b/examples/39-assao/assao.cpp @@ -84,7 +84,7 @@ namespace bgfx::VertexLayout PosTexCoord0Vertex::ms_layout; // Utility function to draw a screen space quad for deferred rendering - void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf, bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) + void screenSpaceQuad(bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) { if (3 == bgfx::getAvailTransientVertexBuffer(3, PosTexCoord0Vertex::ms_layout)) { @@ -97,15 +97,13 @@ namespace const float miny = 0.0f; const float maxy = _height * 2.0f; - const float texelHalfW = _texelHalf / _textureWidth; - const float texelHalfH = _texelHalf / _textureHeight; - const float minu = -1.0f + texelHalfW; - const float maxu = 1.0f + texelHalfH; + const float minu = -1.0f; + const float maxu = 1.0f; const float zz = 0.0f; - float minv = texelHalfH; - float maxv = 2.0f + texelHalfH; + float minv = 0.0f; + float maxv = 2.0f; if (_originBottomLeft) { @@ -252,7 +250,6 @@ namespace , m_currFrame(UINT32_MAX) , m_enableSSAO(true) , m_enableTexturing(true) - , m_texelHalf(0.0f) , m_framebufferGutter(true) { } @@ -376,10 +373,6 @@ namespace cameraSetVerticalAngle(-0.3f); m_fovY = 60.0f; - // Get renderer capabilities info. - const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); - m_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f; - imguiCreate(); } @@ -495,7 +488,7 @@ namespace bgfx::setViewTransform(RENDER_PASS_COMBINE, NULL, orthoProj); bgfx::setViewRect(RENDER_PASS_COMBINE, 0, 0, uint16_t(m_width), uint16_t(m_height)); // Bind vertex buffer and draw quad - screenSpaceQuad((float)m_width, (float)m_height, m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); //bgfx::submit(RENDER_PASS_COMBINE, m_combineProgram); bgfx::touch(RENDER_PASS_COMBINE); @@ -754,7 +747,7 @@ namespace (float)(m_size[0]-2*m_border) / (float)m_size[0], (float)(m_size[1] - 2 * m_border) / (float)m_size[1], (float)m_border / (float)m_size[0], (float)m_border / (float)m_size[1] }; bgfx::setUniform(u_combineParams, combineParams, 2); - screenSpaceQuad((float)m_width, (float)m_height, m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::setState(BGFX_STATE_WRITE_RGB | BGFX_STATE_WRITE_A | BGFX_STATE_DEPTH_TEST_ALWAYS); bgfx::submit(view, m_combineProgram); ++view; @@ -1183,7 +1176,6 @@ namespace bool m_enableSSAO; bool m_enableTexturing; - float m_texelHalf; float m_fovY; bool m_framebufferGutter; diff --git a/examples/43-denoise/denoise.cpp b/examples/43-denoise/denoise.cpp index f9ff556a001..3fd2eca7ba0 100644 --- a/examples/43-denoise/denoise.cpp +++ b/examples/43-denoise/denoise.cpp @@ -160,7 +160,7 @@ struct RenderTarget bgfx::FrameBufferHandle m_buffer; }; -void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf, bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) +void screenSpaceQuad(bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) { if (3 == bgfx::getAvailTransientVertexBuffer(3, PosTexCoord0Vertex::ms_layout) ) { @@ -173,15 +173,13 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf const float miny = 0.0f; const float maxy = _height * 2.0f; - const float texelHalfW = _texelHalf / _textureWidth; - const float texelHalfH = _texelHalf / _textureHeight; - const float minu = -1.0f + texelHalfW; - const float maxu = 1.0f + texelHalfW; + const float minu = -1.0f; + const float maxu = 1.0f; const float zz = 0.0f; - float minv = texelHalfH; - float maxv = 2.0f + texelHalfH; + float minv = 0.0f; + float maxv = 2.0f; if (_originBottomLeft) { @@ -235,7 +233,6 @@ class ExampleDenoise : public entry::AppI ExampleDenoise(const char* _name, const char* _description) : entry::AppI(_name, _description) , m_currFrame(UINT32_MAX) - , m_texelHalf(0.0f) { } @@ -329,10 +326,6 @@ class ExampleDenoise : public entry::AppI // Track whether previous results are valid m_havePrevious = false; - // Get renderer capabilities info. - const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); - m_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f; - imguiCreate(); } @@ -480,7 +473,7 @@ class ExampleDenoise : public entry::AppI m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_combineProgram); @@ -512,7 +505,7 @@ class ExampleDenoise : public entry::AppI m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_denoiseTemporalProgram); @@ -558,7 +551,7 @@ class ExampleDenoise : public entry::AppI m_uniforms.m_denoiseStep = denoiseStepScale; m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); const bgfx::ProgramHandle spatialProgram = (0 == m_spatialSampleType) ? m_denoiseSpatialProgram3x3 @@ -593,7 +586,7 @@ class ExampleDenoise : public entry::AppI bgfx::setState(BGFX_STATE_WRITE_RGB | BGFX_STATE_WRITE_A | BGFX_STATE_DEPTH_TEST_ALWAYS); bgfx::setTexture(0, s_color, lastTex); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_copyProgram); ++view; @@ -620,7 +613,7 @@ class ExampleDenoise : public entry::AppI bgfx::setTexture(1, s_albedo, m_gbufferTex[GBUFFER_RT_COLOR]); m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_denoiseApplyLighting); ++view; @@ -651,7 +644,7 @@ class ExampleDenoise : public entry::AppI bgfx::setTexture(3, s_depth, m_gbufferTex[GBUFFER_RT_DEPTH]); m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_txaaProgram); ++view; @@ -671,7 +664,7 @@ class ExampleDenoise : public entry::AppI ); bgfx::setTexture(0, s_color, m_txaaColor.m_texture); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_copyProgram); ++view; @@ -691,7 +684,7 @@ class ExampleDenoise : public entry::AppI ); bgfx::setTexture(0, s_color, m_txaaColor.m_texture); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_copyProgram); ++view; @@ -718,7 +711,7 @@ class ExampleDenoise : public entry::AppI ); bgfx::setTexture(0, s_color, lastTex); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_copyProgram); ++view; @@ -734,7 +727,7 @@ class ExampleDenoise : public entry::AppI bgfx::setState(BGFX_STATE_WRITE_RGB | BGFX_STATE_WRITE_A | BGFX_STATE_DEPTH_TEST_ALWAYS); bgfx::setTexture(0, s_color, m_gbufferTex[GBUFFER_RT_NORMAL]); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_copyProgram); ++view; @@ -1095,7 +1088,6 @@ class ExampleDenoise : public entry::AppI bgfx::TextureHandle m_normalTexture; uint32_t m_currFrame; - float m_texelHalf = 0.0f; float m_fovY = 60.0f; bool m_recreateFrameBuffers = false; bool m_havePrevious = false; diff --git a/examples/44-sss/screen_space_shadows.cpp b/examples/44-sss/screen_space_shadows.cpp index 1bf85b0e973..186a64619d7 100644 --- a/examples/44-sss/screen_space_shadows.cpp +++ b/examples/44-sss/screen_space_shadows.cpp @@ -172,7 +172,7 @@ struct RenderTarget bgfx::FrameBufferHandle m_buffer; }; -void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf, bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) +void screenSpaceQuad(bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) { if (3 == bgfx::getAvailTransientVertexBuffer(3, PosTexCoord0Vertex::ms_layout)) { @@ -185,15 +185,13 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf const float miny = 0.0f; const float maxy = _height * 2.0f; - const float texelHalfW = _texelHalf / _textureWidth; - const float texelHalfH = _texelHalf / _textureHeight; - const float minu = -1.0f + texelHalfW; - const float maxu = 1.0f + texelHalfW; + const float minu = -1.0f; + const float maxu = 1.0f; const float zz = 0.0f; - float minv = texelHalfH; - float maxv = 2.0f + texelHalfH; + float minv = 0.0f; + float maxv = 2.0f; if (_originBottomLeft) { @@ -247,7 +245,6 @@ class ExampleScreenSpaceShadows : public entry::AppI ExampleScreenSpaceShadows(const char* _name, const char* _description) : entry::AppI(_name, _description) , m_currFrame(UINT32_MAX) - , m_texelHalf(0.0f) { } @@ -336,10 +333,6 @@ class ExampleScreenSpaceShadows : public entry::AppI // Track whether previous results are valid m_havePrevious = false; - // Get renderer capabilities info. - const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); - m_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f; - imguiCreate(); } @@ -502,7 +495,7 @@ class ExampleScreenSpaceShadows : public entry::AppI ); bgfx::setTexture(0, s_depth, m_gbufferTex[GBUFFER_RT_DEPTH]); m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_linearDepthProgram); ++view; } @@ -521,7 +514,7 @@ class ExampleScreenSpaceShadows : public entry::AppI ); bgfx::setTexture(0, s_depth, m_linearDepth.m_texture); m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_shadowsProgram); ++view; } @@ -543,7 +536,7 @@ class ExampleScreenSpaceShadows : public entry::AppI bgfx::setTexture(2, s_depth, m_linearDepth.m_texture); bgfx::setTexture(3, s_shadows, m_shadows.m_texture); m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_combineProgram); ++view; } @@ -818,7 +811,6 @@ class ExampleScreenSpaceShadows : public entry::AppI uint32_t m_currFrame; float m_lightRotation = 0.0f; - float m_texelHalf = 0.0f; float m_fovY = 60.0f; bool m_recreateFrameBuffers = false; bool m_havePrevious = false; diff --git a/examples/45-bokeh/bokeh.cpp b/examples/45-bokeh/bokeh.cpp index 965db747586..edb8bc87029 100644 --- a/examples/45-bokeh/bokeh.cpp +++ b/examples/45-bokeh/bokeh.cpp @@ -36,9 +36,9 @@ namespace { -#define FRAMEBUFFER_RT_COLOR 0 -#define FRAMEBUFFER_RT_DEPTH 1 -#define FRAMEBUFFER_RENDER_TARGETS 2 +#define FRAMEBUFFER_RT_COLOR 0 +#define FRAMEBUFFER_RT_DEPTH 1 +#define FRAMEBUFFER_RENDER_TARGETS 2 enum Meshes { @@ -162,7 +162,7 @@ struct RenderTarget bgfx::FrameBufferHandle m_buffer; }; -void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf, bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) +void screenSpaceQuad(bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f) { if (3 == bgfx::getAvailTransientVertexBuffer(3, PosTexCoord0Vertex::ms_layout)) { @@ -175,15 +175,13 @@ void screenSpaceQuad(float _textureWidth, float _textureHeight, float _texelHalf const float miny = 0.0f; const float maxy = _height * 2.0f; - const float texelHalfW = _texelHalf / _textureWidth; - const float texelHalfH = _texelHalf / _textureHeight; - const float minu = -1.0f + texelHalfW; - const float maxu = 1.0f + texelHalfW; + const float minu = -1.0f; + const float maxu = 1.0f; const float zz = 0.0f; - float minv = texelHalfH; - float maxv = 2.0f + texelHalfH; + float minv = 0.0f; + float maxv = 2.0f; if (_originBottomLeft) { @@ -229,7 +227,6 @@ class ExampleBokeh : public entry::AppI ExampleBokeh(const char* _name, const char* _description) : entry::AppI(_name, _description) , m_currFrame(UINT32_MAX) - , m_texelHalf(0.0f) { } @@ -304,10 +301,6 @@ class ExampleBokeh : public entry::AppI cameraGetViewMtx(m_view); bx::mtxProj(m_proj, m_fovY, float(m_size[0]) / float(m_size[1]), 0.01f, 100.0f, bgfx::getCaps()->homogeneousDepth); - // Get renderer capabilities info. - const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); - m_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f; - m_bokehTexture.idx = bgfx::kInvalidHandle; updateDisplayBokehTexture(m_radiusScale, m_maxBlurSize, m_lobeCount, (1.0f-m_lobePinch), 1.0f, m_lobeRotation); @@ -452,7 +445,7 @@ class ExampleBokeh : public entry::AppI ); bgfx::setTexture(0, s_depth, m_frameBufferTex[FRAMEBUFFER_RT_DEPTH]); m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_linearDepthProgram); ++view; } @@ -481,7 +474,7 @@ class ExampleBokeh : public entry::AppI | BGFX_STATE_WRITE_A ); bgfx::setTexture(0, s_color, m_frameBufferTex[FRAMEBUFFER_RT_COLOR]); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_copyLinearToGammaProgram); ++view; } @@ -701,7 +694,7 @@ class ExampleBokeh : public entry::AppI bgfx::setTexture(0, s_color, lastTex); bgfx::setTexture(1, s_depth, m_linearDepth.m_texture); m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, _originBottomLeft); + screenSpaceQuad(_originBottomLeft); bgfx::submit(view, m_dofDebugProgram); ++view; } @@ -719,7 +712,7 @@ class ExampleBokeh : public entry::AppI bgfx::setTexture(0, s_color, lastTex); bgfx::setTexture(1, s_depth, m_linearDepth.m_texture); m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, _originBottomLeft); + screenSpaceQuad(_originBottomLeft); bgfx::submit(view, m_dofSinglePassProgram); ++view; } @@ -740,7 +733,7 @@ class ExampleBokeh : public entry::AppI bgfx::setTexture(0, s_color, lastTex); bgfx::setTexture(1, s_depth, m_linearDepth.m_texture); m_uniforms.submit(); - screenSpaceQuad(float(halfWidth), float(halfHeight), m_texelHalf, _originBottomLeft); + screenSpaceQuad(_originBottomLeft); bgfx::submit(view, m_dofDownsampleProgram); ++view; lastTex = m_dofQuarterInput.m_texture; @@ -763,7 +756,7 @@ class ExampleBokeh : public entry::AppI ); bgfx::setTexture(0, s_color, lastTex); m_uniforms.submit(); - screenSpaceQuad(float(halfWidth), float(halfHeight), m_texelHalf, _originBottomLeft); + screenSpaceQuad(_originBottomLeft); bgfx::submit(view, m_dofQuarterProgram); ++view; lastTex = m_dofQuarterOutput.m_texture; @@ -780,7 +773,7 @@ class ExampleBokeh : public entry::AppI bgfx::setTexture(0, s_color, _colorTexture); bgfx::setTexture(1, s_blurredColor, lastTex); m_uniforms.submit(); - screenSpaceQuad(float(m_width), float(m_height), m_texelHalf, _originBottomLeft); + screenSpaceQuad(_originBottomLeft); bgfx::submit(view, m_dofCombineProgram); ++view; } @@ -1022,7 +1015,6 @@ class ExampleBokeh : public entry::AppI uint32_t m_currFrame; float m_lightRotation = 0.0f; - float m_texelHalf = 0.0f; float m_fovY = 60.0f; bool m_recreateFrameBuffers = false; float m_animationTime = 0.0f; diff --git a/examples/46-fsr/app.cpp b/examples/46-fsr/app.cpp index 4049d3e1e7e..31e009b42c9 100644 --- a/examples/46-fsr/app.cpp +++ b/examples/46-fsr/app.cpp @@ -63,7 +63,7 @@ struct PosTexCoord0Vertex bgfx::VertexLayout PosTexCoord0Vertex::ms_layout; -void screenSpaceTriangle(float _textureWidth, float _textureHeight, float _texelHalf, bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f, float _offsetX = 0.0f, float _offsetY = 0.0f) +void screenSpaceQuad(bool _originBottomLeft, float _width = 1.0f, float _height = 1.0f, float _offsetX = 0.0f, float _offsetY = 0.0f) { if (3 == bgfx::getAvailTransientVertexBuffer(3, PosTexCoord0Vertex::ms_layout) ) { @@ -76,15 +76,13 @@ void screenSpaceTriangle(float _textureWidth, float _textureHeight, float _texel const float miny = 0.0f - _offsetY; const float maxy = _height * 2.0f - _offsetY; - const float texelHalfW = _texelHalf / _textureWidth; - const float texelHalfH = _texelHalf / _textureHeight; - const float minu = -1.0f + texelHalfW; - const float maxu = 1.0f + texelHalfW; + const float minu = -1.0f; + const float maxu = 1.0f; const float zz = 0.0f; - float minv = texelHalfH; - float maxv = 2.0f + texelHalfH; + float minv = 0.0f; + float maxv = 2.0f; if (_originBottomLeft) { @@ -193,7 +191,6 @@ struct AppState uint32_t m_currFrame{UINT32_MAX}; float m_lightRotation = 0.0f; - float m_texelHalf = 0.0f; float m_fovY = 60.0f; float m_animationTime = 0.0f; @@ -262,7 +259,7 @@ struct MagnifierWidget bgfx::setState(0 | BGFX_STATE_WRITE_RGB | BGFX_STATE_WRITE_A | BGFX_STATE_DEPTH_TEST_ALWAYS | BGFX_STATE_BLEND_ALPHA); bgfx::setTexture(0, state.s_color, m_widgetTexture); - screenSpaceTriangle(float(m_widgetWidth), float(m_widgetHeight), state.m_texelHalf, false, scaleX, scaleY, offsetX, offsetY); + screenSpaceQuad(false, scaleX, scaleY, offsetX, offsetY); bgfx::submit(view, state.m_copyLinearToGammaProgram); } @@ -291,7 +288,7 @@ struct MagnifierWidget bgfx::setViewFrameBuffer(view, m_content.m_buffer); bgfx::setState(0 | BGFX_STATE_WRITE_RGB | BGFX_STATE_WRITE_A); bgfx::setTexture(0, state.s_color, srcTexture, BGFX_SAMPLER_MIN_POINT | BGFX_SAMPLER_MAG_POINT | BGFX_SAMPLER_U_CLAMP | BGFX_SAMPLER_V_CLAMP); - screenSpaceTriangle(float(state.m_width), float(state.m_height), state.m_texelHalf, false, scaleX, scaleY, offsetX, offsetY); + screenSpaceQuad(false, scaleX, scaleY, offsetX, offsetY); bgfx::submit(view, state.m_copyLinearToGammaProgram); ++view; } @@ -421,10 +418,6 @@ class ExampleFsr : public entry::AppI cameraGetViewMtx(m_state.m_view); bx::mtxProj(m_state.m_proj, m_state.m_fovY, float(m_state.m_size[0]) / float(m_state.m_size[1]), 0.01f, 100.0f, bgfx::getCaps()->homogeneousDepth); - // Get renderer capabilities info. - const bgfx::RendererType::Enum renderer = bgfx::getRendererType(); - m_state.m_texelHalf = bgfx::RendererType::Direct3D9 == renderer ? 0.5f : 0.0f; - const uint32_t magnifierSize = 32; m_magnifierWidget.init(magnifierSize, magnifierSize); m_magnifierWidget.setPosition(m_state.m_width * 0.5f, m_state.m_height * 0.5f); @@ -600,7 +593,7 @@ class ExampleFsr : public entry::AppI bgfx::setViewFrameBuffer(view, BGFX_INVALID_HANDLE); bgfx::setState(0 | BGFX_STATE_WRITE_RGB | BGFX_STATE_WRITE_A); bgfx::setTexture(0, m_state.s_color, srcTexture, BGFX_SAMPLER_MIN_POINT | BGFX_SAMPLER_MAG_POINT | BGFX_SAMPLER_U_CLAMP | BGFX_SAMPLER_V_CLAMP); - screenSpaceTriangle(float(m_state.m_width), float(m_state.m_height), m_state.m_texelHalf, caps->originBottomLeft); + screenSpaceQuad(caps->originBottomLeft); bgfx::submit(view, m_state.m_copyLinearToGammaProgram); } diff --git a/examples/common/bgfx_utils.cpp b/examples/common/bgfx_utils.cpp index fd9cfe9ab17..f4e5cdb9519 100644 --- a/examples/common/bgfx_utils.cpp +++ b/examples/common/bgfx_utils.cpp @@ -105,7 +105,6 @@ static bgfx::ShaderHandle loadShader(bx::FileReaderI* _reader, const char* _name switch (bgfx::getRendererType() ) { case bgfx::RendererType::Noop: - case bgfx::RendererType::Direct3D9: shaderPath = "shaders/dx9/"; break; case bgfx::RendererType::Direct3D11: case bgfx::RendererType::Direct3D12: shaderPath = "shaders/dx11/"; break; case bgfx::RendererType::Agc: @@ -712,7 +711,6 @@ static RendererTypeRemap s_rendererTypeRemap[] = { { "d3d11", bgfx::RendererType::Direct3D11 }, { "d3d12", bgfx::RendererType::Direct3D12 }, - { "d3d9", bgfx::RendererType::Direct3D9 }, { "gl", bgfx::RendererType::OpenGL }, { "mtl", bgfx::RendererType::Metal }, { "noop", bgfx::RendererType::Noop }, @@ -767,10 +765,6 @@ Args::Args(int _argc, const char* const* _argv) { m_type = bgfx::RendererType::Noop; } - if (cmdLine.hasArg("d3d9") ) - { - m_type = bgfx::RendererType::Direct3D9; - } else if (cmdLine.hasArg("d3d11") ) { m_type = bgfx::RendererType::Direct3D11; diff --git a/examples/common/nanovg/nanovg_bgfx.cpp b/examples/common/nanovg/nanovg_bgfx.cpp index 3446e405834..adcaededca0 100644 --- a/examples/common/nanovg/nanovg_bgfx.cpp +++ b/examples/common/nanovg/nanovg_bgfx.cpp @@ -137,7 +137,6 @@ namespace bgfx::UniformHandle u_scissorExtScale; bgfx::UniformHandle u_extentRadius; bgfx::UniformHandle u_params; - bgfx::UniformHandle u_halfTexel; bgfx::UniformHandle s_tex; @@ -268,15 +267,6 @@ namespace gl->u_params = bgfx::createUniform("u_params", bgfx::UniformType::Vec4); gl->s_tex = bgfx::createUniform("s_tex", bgfx::UniformType::Sampler); - if (bgfx::getRendererType() == bgfx::RendererType::Direct3D9) - { - gl->u_halfTexel = bgfx::createUniform("u_halfTexel", bgfx::UniformType::Vec4); - } - else - { - gl->u_halfTexel.idx = bgfx::kInvalidHandle; - } - s_nvgLayout .begin() .add(bgfx::Attrib::Position, 2, bgfx::AttribType::Float) @@ -549,12 +539,6 @@ namespace if (tex != NULL) { handle = tex->id; - - if (bgfx::isValid(gl->u_halfTexel) ) - { - float halfTexel[4] = { 0.5f / tex->width, 0.5f / tex->height }; - bgfx::setUniform(gl->u_halfTexel, halfTexel); - } } } @@ -1084,11 +1068,6 @@ namespace bgfx::destroy(gl->u_params); bgfx::destroy(gl->s_tex); - if (bgfx::isValid(gl->u_halfTexel) ) - { - bgfx::destroy(gl->u_halfTexel); - } - for (uint32_t ii = 0, num = gl->ntextures; ii < num; ++ii) { if (bgfx::isValid(gl->textures[ii].id) diff --git a/examples/runtime/shaders/dx9/fs_albedo_output.bin b/examples/runtime/shaders/dx9/fs_albedo_output.bin deleted file mode 100644 index 6f1296ea362413a394fec97447095d984546012a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 195 zcmZ<@_TaQUG4Bxr5HK>Zm&PaO=j0a&F@ksu3=2TQ%>V!Y`!CPn9OCFC1LXQc#X#~P zKEp%?1`i-*0K`l{3=+2hVi15D2NYulVivF*NW7pp-Z&_N-8l^_uXbj4=hl078};|(apw{=2VNeJvX{wNh63P+W*%qhdomA&Fnpntu2R41 z9KEOO?h)x1UFRGI&G8L*E;9nVNOXd>or$Wd8rU~gJw{tS9{=;x zJidrS+@-HGnaj6%aQb)_^as%(h?3EGG7Eb0W140J?XcBG^#JSue%V_8bb#W@o(`OF zYZeOr)ly^Tm+<^@iv@Altl_g~!`jAh0m}tBMO^bx*9$@Sc@8%uM~xlgVT~KatAaDB dX_|ial?Uebt;S-jvDj*OCww7~`eCUQRe!0(OpO2l diff --git a/examples/runtime/shaders/dx9/fs_bokeh_copy.bin b/examples/runtime/shaders/dx9/fs_bokeh_copy.bin deleted file mode 100644 index 84f6e01e4efdc1420e283d3fc3ab1b9b37f152fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 211 zcmZ<@_TbEyv$J6U0!9Y*;`rqJoctmKMi7sIVFO5*`Tzfa|K%B+LmZuCfLwp57)Tz( zXPC&q-~przfS4JG85x)uEPyl!K#gNyVc-FZgCGPH6vrFK8!-50CKu%w=ckn@Xas30 zc=!bSC5@H}H9K z@F}|fyU8rG^Zhfkv%9l6YKhMH6*LRYJW0h~WPzm>Fwk2=sejeQbp1AYqFm5*PM5UC z9}qDF^akC6jS-`^dK?_Inb)hbL!P`O0p53MCUWuh>-ScDKbpsLKmPvMerEnu{2X?B zLKqA~T$aEC;1$o;+qfQKLKm=Eki7Y%naLAeub7ypc+8j7W#O^L+o^G^*d}jkcF5-= j-)6&g$x3o2ztWTzN@^63re@B|ip}|&9rm21QtZ3~ubMep diff --git a/examples/runtime/shaders/dx9/fs_bokeh_dof_combine.bin b/examples/runtime/shaders/dx9/fs_bokeh_dof_combine.bin deleted file mode 100644 index b43090a07c8c5876e954682090fc60c07891a5f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 474 zcmZ8cF;2rk5S+6OF%pU;DhdQHK|x&{jivwKGr+HRn56}ML?U6qmMI%3Yyh~=eA7)RBc}mg?PI_4102_c;0rKs7y8kPpn-9`DqpaO;Yf_>EoGih%J28Xxp`0LMb7^=m1h!QQUR ttfXh=2+2OnhFj#5mOJFDC3oTs-J>QZRoA>1 diff --git a/examples/runtime/shaders/dx9/fs_bokeh_dof_debug.bin b/examples/runtime/shaders/dx9/fs_bokeh_dof_debug.bin deleted file mode 100644 index 881abf8960b32f55d7590dc279622684e3818aeb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 712 zcmZWnJxd%>6g_Wec6T%;3&B$2mZpg#LYnA^3Syx}To=-z&K--Mx-kHV1$2{)2=iQHUFEdk_?eRZ(W8kq+Y}S_jO~2t9 zfS>p)t3hksHAa1ByB5?N^{wW|_khiS{hZ__$^YalrWYrt2I$7T!dW!p;|MsV`N1ok zK@Ll_aspn9j6nfA$^ZwnQda68XI!R>T%SgZI60ZVH+)wo;y5LxyoF*vR+?VZIq||tzcu5V8s10g7`a-w^53Q|2%rP&u89l|AhyH zH^S%1U;q6!@%+^C9`5gTjlvhmU;c8(e_vgB?Vr69(s+<#<(bHd4+WDtgj0&T*bq@U0V-7{~3|0QMIld!Iu^n2dMik9nT5pfN!?br=-@;sIhh5_;oTDsj>fgSywri?Xw4*H)C)7agP;Ha diff --git a/examples/runtime/shaders/dx9/fs_bokeh_dof_downsample.bin b/examples/runtime/shaders/dx9/fs_bokeh_dof_downsample.bin deleted file mode 100644 index 66a9c5589c2005b7eb266715675a6e2e20af4e2d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 504 zcmZWlJxjw-6g@9V+vgVnXVHwhNQ&SjiY-WoI%q7o#n4t-Xh}#aIL57G1b;vVC$qZy zXYxCY=RK1_yySB4IrrRmZ|;>h*a-K}&pUIo+ye!=m{3MvbHGkPka~G^Kl#|;p56VyghOTLvQGKvtTlf zoqo8C<_jiW_qdDV254EZb0GbqU)0awfNQo$@DDPTlg}XSyvYUgp8jQ`y0MrvY|vze#S{0lHj`EG+*|H!w9c_rP)yX2d7op(qr_G`VAy3WQwbHTaP8IT>; J%e1OE{RhV4QZWDk diff --git a/examples/runtime/shaders/dx9/fs_bokeh_dof_second_pass.bin b/examples/runtime/shaders/dx9/fs_bokeh_dof_second_pass.bin deleted file mode 100644 index 213a92692874f6aa6842e7e9e7074e53e728dbbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1467 zcmYjQ&ubGw7=1h0WVf*rs22sXLGULiEuI8v(+0FcMQs}pFR|2!g_e}0wH~+FTRp^^ z2Zil5@lWv3qn`BSrPsZ9ksj;C^}U(hHj{kp%=>=5@6GQ0#krC8rKx-1@)2~KEA6#* zXTk&cN4VA8Sne#ZcgN1k4V1Tl>?U+)Pf~p2XlOP%NPm-~IJ?W`6tAteU<5bMt}lfcU$=m!}9#A6CBC z4l552gong;9j@>LpjHz;LOlI=p(Ze2!pp>gXxd?)>%e$@f;dn)O7p<%IZnCgh^Tl^ zd%``0m6)?~e>N&3iRtHclo)eN>&LtU{&oJ@^Kl#lN%Y)ehS=|@#GKMeoUld|@VWvt z;&ZmH!(5%*-={x~uh7qXw>hq_i9F_)=o`+>eXe#tCRuXyn1{%qu`m9r!+plzw{=4D zP_BmxXL}NpcCVS8JqK$VRb1Wpf91p6cDm!!|r_)tX{%>_)&qJ zuj(~Ma&!v?Vtrz;`uWVGpSgXSn@yNcOta*BYPK((vh$u{tf98gG7OxzY-^^G=F0Qb zOL_bfY@cEMg)#QTuYJIpx&9^2Ax!m(-19!UPh!+!L!^ky@G|?F>BXAwKC2 zxfP7PPkY`IZ}~Z+{G3O3D}4=X=9~g@P8ieJVPC~&bM+(X;m+r64f0@&cslLGYe=ss zPx_r!B?RhWdpWIw%$L}i)kk+NE~h;7PKjqDN$4*q*AF`>5l79xK0#)w}1or24S`15aTJ)&Kwi diff --git a/examples/runtime/shaders/dx9/fs_bokeh_dof_single_pass.bin b/examples/runtime/shaders/dx9/fs_bokeh_dof_single_pass.bin deleted file mode 100644 index 4d6eea4035a7e99bd181ebc21fd2e78b39d81205..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1823 zcmZWqJ!n%=6h8Om<>e(-19edlTLgbWO>q*WtroOOMQsg;ODHvBp(Uk1*6|h{ggC^_ zLE*Zli-VI0x(W`RMCh8KF4CccBKZ8ib8~CZOD^x+@BDw~zL(2WtQ zrZLx8tQZmec)nL(Sbk73M$hR=ZDD$GdVZ;YuSg7o(n{^&Y<+dIKC|3!Vzt@hq1*LG z^|^kNSL|&9+gz6Y&aTPW?TeQV;rI)iSRN0a<+;cX9u_-?Z6uPXcyhhK&H*u!h$DdY z20OxL8Sk;VK4V8fSo>E3SXqaYy1q|r=%Yf|a zLcAU-WMQdxu2zxjvonj0rN;f`!4s1w2gfI-CI+V-Oy8?74vsbE7iQ-m3{}ny$@(n} zB$2Wcu_Hc{{qXGjsVl?_z|ViVadBexm2T0;kPp z`Rd0f9v9*zwU>_~qodi2gQI8PZ4Fm|iB zF1AI)Wt>PN;BD%Z^PKd-uj*Jo`(gcp`so)-!S|yaF<%vD=883!ms9kRxnueX=xm=x zibyhG;>dR_DSR^KW4$^LVzFY93o>T)I@m+kL=1;I-JNcXzy}lHC%A9K7%vYwLGO9oCC1CCt^?l;b$4{WdGM3#nJ;UgKRKr?kYT^Zc%iQ_ zU)I7{VZOmP%=fRo=Z*Hf51z+tjdvn1yr z2W#o!+af;hUDbu!yKy;ZyvK~$w!9PAjbg_^JZ<0%rdo5BiO3(TD@y$U diff --git a/examples/runtime/shaders/dx9/fs_bokeh_forward.bin b/examples/runtime/shaders/dx9/fs_bokeh_forward.bin deleted file mode 100644 index d68d902a2eb34ad7758d80183fefcc8fa2686827..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1227 zcmZuwJ&O}j6g_Wd@*(aTw6YLPv4u90#mYilHy~TApvHix5TaReA#s*uw|}X(nFW8q ztCPmg(#m2X+xQQJ0Xti*9M5?#lU3LumpS+2+XTl7_-1dA zwhX|Z0w2=xs6T8O;{)qQy-_;Y8$Rie`=iOV2;dJk5xpq>6!*}6{&4#S-On_|V!q_# z1o*_)3z}kv%mLqe4rwtX231%E_+&KomN}Z9QXb~>d4e_1kW4+L(u;EciDrTE(-PlX z+=EH)Zm)&M`)|kTBzu7Gv=IFJx*Sq zWBZDj+S&Is+aRWP&df9M6CclQjBhpp64k{xRW1E|sv3iJ_5@=e{Y=#ubm`~5cM@i1 znqOg#aX-IGTw!1C6DwX}J+(RYtkKt;Dr1_f+A3?MqsF<486Wd`@_w)M1x}b>XD|K% z)YqGQLtoltm+43Jfr9yhy+Jw37k(Gb2)W$*+D*Q=y2k|J9u4nNnzUlQP=t9zMty! MO`z`2+Z6?XzxoI3od5s; diff --git a/examples/runtime/shaders/dx9/fs_bokeh_forward_grid.bin b/examples/runtime/shaders/dx9/fs_bokeh_forward_grid.bin deleted file mode 100644 index 7d37c87af54583284f3755175299ac513dc96ed2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 769 zcmY*XJxc>Y5Pf@_kP|ebHWq>>T4*B?YcU!T3k5X>?LzPa1;a_A{aI^q{)4qmeuA}K z?EL`&t=DnHO;kK(gBOimWSMV5&-PN1%+4=Q;qt$4(Cj)>#yvv{U z{@c%?azGX&dys=C2rnaUDH`9Ew7+^0OSLVyLi&RP`*wpzx77Tf?MJYi8)$Q z;jMU%_*<{HMojp6W;v!M02EU3^Dv3|^@Aj!&v%ew>BAX(rc?T~QEIjX(;P6k2l`1~ zW6eDTs5#;Ct>g}dT*>v>W9vQ#F5oxUc_vPc)HCGNSP#jGawNth6V9^cy!I~=OWnBE zSALTD0rAez&(Zh8nTqV0at7~;e>9n&X)^z>ra(QY>+9^?i};TA6zZIz<|JRxnL_O+ z@8aGxC;bETQ`w8?B^Ley`Ia$r>IB(hf#Ru}OQFGg=d2tJ6QBqR!ZQ~yB!Aou*1-{Dvt z*P5y6shXbd9y#N3(CGI-6^7e7<^JP@THMD-{HiomGL7nnM zikD*$jT`XC@Jkw`Vqu$6uplK*%J`(m~59( z5C@xs*_^h_vF+HV<9n-hWDbLUxZUy6wK`p-Uu;_d&Yb8fcNV##R80oih*kP`>U+Wm Zj;yG00p>|D%gywe{|)|;H({bR&nJ$;H_-q9 diff --git a/examples/runtime/shaders/dx9/fs_bump.bin b/examples/runtime/shaders/dx9/fs_bump.bin deleted file mode 100644 index 8593e3249378072ec21dba6d6e54b546e491eb8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2244 zcmcgtzfTlV5T3WYcee=Plvr4pNU4oNtSnT7#9)F(!Apn@K|#3W;K&^$lxt@~b0pSg zNvQ7r0b`>j1^fqAW(x~DZERe>Z)P7SXhCA)hb)d}UBgkD9Hu#m1O(YCFHR(5SDhZa!|dXBU_1TkVmE(IS3hcIEkl z_4Vb}>_`;p#(a$3FwcMH(=zq+-sEMd->_(7Aa&Ul`HG(gR*2;!kZt_(^BOCJ#YtJ- zs6}KSzX2BG-xan4wOP$ig{|L{^dcG3EbNS*-=GJP{<|7p@iyF5|>1U z9d$YqS5wAPc91b2$WanYH-&(d4*9!?$@h>GChC%y96-+14|O4DX(ZV$C`VijESWA~ zL|jZ?jdO(zT%pC~>IXjY4It<6t!YjAh+KfqK4~)_>Zr391DE+2F51n9dJRinu@_rbX*Veq+)(H2$c^=C+ypWV zdj~yqlpEY91^>I1V2Apdy^c_eg(7SY%y}3Ep>9?b>Ovi|}qS)qvl diff --git a/examples/runtime/shaders/dx9/fs_bunnylod.bin b/examples/runtime/shaders/dx9/fs_bunnylod.bin deleted file mode 100644 index 3114620167e2d0bf2eba0b9e75c4712d33125ca5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 551 zcmXw$%}T>S6opSFk;Wg)rc1$q8{KG&d$AUzi@MO*l|m7Ju%NWGKEMb*K>7v&ckvB; zgMw~cyX?ZH4K=Z;~*eD|JvXUvE#+8*AI26u#JW4no$V_*SD3O(ez z_5QZ9zw`RFw+@&kz*5VFS!4s$@_-D~$g}CWXJBs6$kdtt$XOd2vg8B45y0g%=4RGl z{ur|c2waWS)!bPU!%Dwua(`);83(RbVic*@>4kBxNZ4ys&y|hjJxAoyb4;$hzeIe9 zR;;o=WIqS9%7)zY9Fa@UF}boFhAXil`_%)i-23lQ*?I8!Nbd3MJXoDEao>lYoCm}@ Rzj#2b{mR;}to`oK{{hkvVp0GA diff --git a/examples/runtime/shaders/dx9/fs_callback.bin b/examples/runtime/shaders/dx9/fs_callback.bin deleted file mode 100644 index 3114620167e2d0bf2eba0b9e75c4712d33125ca5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 551 zcmXw$%}T>S6opSFk;Wg)rc1$q8{KG&d$AUzi@MO*l|m7Ju%NWGKEMb*K>7v&ckvB; zgMw~cyX?ZH4K=Z;~*eD|JvXUvE#+8*AI26u#JW4no$V_*SD3O(ez z_5QZ9zw`RFw+@&kz*5VFS!4s$@_-D~$g}CWXJBs6$kdtt$XOd2vg8B45y0g%=4RGl z{ur|c2waWS)!bPU!%Dwua(`);83(RbVic*@>4kBxNZ4ys&y|hjJxAoyb4;$hzeIe9 zR;;o=WIqS9%7)zY9Fa@UF}boFhAXil`_%)i-23lQ*?I8!Nbd3MJXoDEao>lYoCm}@ Rzj#2b{mR;}to`oK{{hkvVp0GA diff --git a/examples/runtime/shaders/dx9/fs_cubes.bin b/examples/runtime/shaders/dx9/fs_cubes.bin deleted file mode 100644 index 700d4073931da1c3831143ecb2a00ff48b75303d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 135 zcmZ<@_TXI7{oa!S3`#&G^Z)<<{);d;hd4UP0J+LgF%Sg?6B!sl;swR=#_>)wJf62p?*wd|6!MCk|^9bt7Oby%Z&OXwQQx<>0r>c}-6H5-lS-h6wq(GhUT zS)yj+TX3#|y^Cbck7e!0vdep!nt}fgk6haNmA9_(=IQq^emqmJeR`(8ECKuhV7+9c diff --git a/examples/runtime/shaders/dx9/fs_deferred_debug.bin b/examples/runtime/shaders/dx9/fs_deferred_debug.bin deleted file mode 100644 index 3408ef77eb791a0fe4577998c1897efab4dc123b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 218 zcmZ<@_TbEyv$J6U0!9X|;`ox(3g`Ts{2~KJkN^Y27LW|{|NsB~D=;{RI6BDyxxr8| zkUWUbFp+`52S^zJF*6V|GB7cKO$4$LCNivMVc-GEfgl7F6vrFK8!-50CKu%w=ckn@ zXas30c=!bSCiKYxJ7#=@XE?A%wvZWt95z&{oZbr?pyR=1#( z;c_?4;QID7=-e%{#Aa3BlKwRPOt(=v*(D~^@oXrCDS1;<@_;<|JsjXOeQurIsDD~`h(_Hvw(x(A_@oL<vgk zn&J#GJ(wEy#qjc4>IEy}vV00J&zgiVR$lD%^pXHGR|PUBn69KMe;UG_Aj r&v=xaGc~`tsS)48aW=WJ;bix0hUm(Z8S<`FOR(2cp2vKw(-goL=7xj^ diff --git a/examples/runtime/shaders/dx9/fs_deferred_light.bin b/examples/runtime/shaders/dx9/fs_deferred_light.bin deleted file mode 100644 index 61a7797e60d11a81c43c4a3ac0b71adcd2a600ec..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1096 zcmZuuv5FH>6uoa|GBbi~Bv>pcno=9hVk@ief~>HDCI;+=XyPW2WI`qZ%a=~rCU%yy zV6|zjY_#+PEc}2eEc^jMe4g{(B(95(ecAiYJ@?*o&pd1$Tu86&-W8mRL|M}9O=kUu zQlfywSu#$iqt38_7lBLjWH>nL&z_`Nv(p{SvziM2Ni>gMJQ|OC(`HRoY@#wxMzhzK zQ5>NDtB)VwnBS%;`_CTiUB&YX8w0E0AK&s;gnW(AM-L^TydjSB4wo&Ic=DbA&Ieo% z-Pz^~0i18R9u^|@g8Nt z|2Z%Q2_LmVsh_ozEV+|3#*MHce=f4eLo#d215ipjaxgi zdWtU>N;OC6eG&Z$_a4H}#3P5x?T_Dgk+u=xu72~y|>{MOBMg+c;LWtay16x6WTiM14n;AF>*$`xsm1J zy$FzxEuZk)*8!O_YK69T4QLW26D{_V$=pYl+&D=*hk5!&8_>A z@A_`rI=-oKJrlf>5WO77?ZEzSkIlRVXPos$N^cbO(l_+69=lzsqrkj^dLgZb*y$i2 z{zFrdyO~>f8}OF;x&3C$bH|^@@F}lu{1NS954m<32Z*_^^NlkjeCI9Bj1_XCUF>RH O>}ss8IJVvy1Lhyg0>?@K diff --git a/examples/runtime/shaders/dx9/fs_denoise_apply_lighting.bin b/examples/runtime/shaders/dx9/fs_denoise_apply_lighting.bin deleted file mode 100644 index 147f365ad3438eab2cd5c98facfa5a93b7fadaee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 532 zcmb7BK~BO@5PiR`@=b`nfYB~BCR*awpn@?hFi|V(ihzLx^GWN%o!zr3H|Uz)z%%F_ zTy)_ntnZf+)SZ(|=e_C7yqWgGYi+3Q`Y~t*WaxLt_k+H2g@9nH68b$gR)I^R`Gzu)$IcC5!!#Uk#m%uu%be?ucH|c_6Lq=^&O{8gRp;~lk8EvIJ z{^lp4f8@Kk9Q6Vfs)r|M_h!#&wY|3E4ZHn8;560aWHctIxd%0**T5QJC+~07)5F)# zIuM=c`8&LtFCuOgYs^#(X(vl8h#SSqHfyq2$Skp0$E(OOU0{Q_Q(}vFKIKfFS&0NP zawMCpo@jxKo)TNEnMXf$K%L(+vgrT1okAC~*tO7tTS&Wr61QT5BB+R@xDra!CQ&Oy{D>nWLK^(QLSjPV$423WZo7!! zQeld&CjY^9>&}%fx}B|A>&Efi_hyWF%*(uY?z!ilci)h!&CR2|lWVKsNWmGlp7#db zcBgDvun0LXTmAN+-5nNlK$gHmn?LC&`V(D1?e0eP1h+e!f~EM9J>CIt_^NZJDPv&) zw*=?d;uM}}bvR`tMKPI7Y(^wQipxmqOU%-0HfTkU{;+kaRmP3&M}yw5_w+^S?45I^ z%|^3PYCdZ}eljT4dfonZhl`c+#T86$1DPybA5ayea3JrB;5p)#zu(+wy#7!%G3*Pz zWcX{q#~QF)+nt`jCb&y{=l3b%s2sXq*ALz62ZHA{AM30kbDyia;05BJ3Rk{l@4c#g z?!T=Z`*C_z@S^7X#^myKI3UVDu-wf`EYz(^RmpTD<IX3-s-=KfmJI!U>dc$c_DGEKn|UUFs+25^O#mFdq45bPsiJR7T&eEne8eXfD_IG}`7os46urxLk+)w!+xs5^Ie0J?81#(RGXD{8R;e`|lhc_kmwvy^_|EzQ~)ja?J diff --git a/examples/runtime/shaders/dx9/fs_denoise_gbuffer.bin b/examples/runtime/shaders/dx9/fs_denoise_gbuffer.bin deleted file mode 100644 index 69a94009fccc9aa95132ed3c8834c1b5f1f480c4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1217 zcmZuvJ&O}j6us}wBpFFGi=7~t!a^I#Vq>GxU63tep-Dhg2+<@M$eJZtb<4N)HVN1$ z7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x*5c4s4K)w-Na1)&l2ZudrRXv#Hlqq%B4IPA~$9i?bf}h<}77B z|I?hNz7%W5Y--JD=LovD#OZZz`)dasTw@<5AG9{H)=r-hK5e}j#x`*%&dHj4lz4VQ zJ$K%RI|t%c_utbsd3s&FcMg-g@H~XJ#ATcrZpy4pl;iR}wKqQZ(Q|8#U+pCn^AIsS@;Y#)@844{ H3Pkq5^$y-L diff --git a/examples/runtime/shaders/dx9/fs_denoise_temporal.bin b/examples/runtime/shaders/dx9/fs_denoise_temporal.bin deleted file mode 100644 index f39a8e424b424e3071f921d442efc06bf1874c89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1683 zcmbtUO-~d-5Urk`{Sb*u@M?6Ani#Xhcq5>&F&xlDU=nTJ?{8zf9Hr25DgRh;85zC5>kfHMNH2Ry_&99I zi*BbMC-KgH^Zwd{=E~~&YIFVd)^^lyF2}oj-5xe`tw(b*dL>fvq%lOAry}VI-dO1( zaqI9!bYk(R|K#NB>8j$s;wkX)a}Uy@-6>Qba1YNw>WyK!HxqkrVs9t*KK4s&n>3Io z8+i3>h(v|mJ`!mU*e)Y}>dEoY7r{?s5q~x`a-7~)zom_s@@$qGX&=$XUDao0W+Hc% zTG<$ae_5OHYBSywJ+IuL3GB1f2RGKYQp4GdwU95+80do<*}xPrK4Scdm^$k44#bMH zYLmaky*81Te%h#kIstNv#oPn?j(g@Z@>gjIV$f{Z;j6dRN+|7K|_NUcKhMSQpgLLgdGQ~hdxr%nvGdw`7sro$ zq4R}akh>?Y7yqO4SjWqJta1!g8_of1ms*e?dr8im7wY9=+^o=cvwC)Z=HJ=54qx`T zm>1|rJ&&=7IsMA-q~urC?}R#wawUJxtQ5T+#|OO65qnT#&;j$9rJPfId)^F2WT diff --git a/examples/runtime/shaders/dx9/fs_denoise_txaa.bin b/examples/runtime/shaders/dx9/fs_denoise_txaa.bin deleted file mode 100644 index ef144b84a430a3939af6f4479f7a52df4e5bad41..0000000000000000000000000000000000000000 GIT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(i%Y5fDJ#ni`;d*HgTqf+c*YUdr1K@|1N3R)l{e~Mn`Kv?Q zn?;9}ra$R6$`?n+YgC`P#b#27ju)UyQQ?+wgX9{etSfGb6MmgrmP(4jAcGw3^3!W7 zJ#7|uX6$RWy)8Muhw!{05vw6PdRBLX{aqBmCe#~fO22#rm{oy5;y&kvRm3N@${*9Y_NQr3Onn|nZ7=<`It5HY)2-NI0NuoX3TX= ze~+?%%nQs<+gF5a5|g2H0}1b3#^Prk^e5zLhQyPn{1T_R5>ts;f=I<3-cwxRKykj6 zE_dd0CTyvnGnV|SeqnOnkwtx!hx1VNNPVMvO-%AgUdF3>$r;zHdq~OAHqAaH|8)WO zgd_Q8vnyox7G|63ZE}&Gv!1c^Zp`S_!2f!tZ8B4NI|HB6|M-6(w$VFFA38>}bbgEZ OllQrIvVZTSDS%&DRmKS6opSR5vmAz0l{np-AIby$`))zx`>KKLEHqLdtLH zpnbgET4L(cRZaC(j(fo4;?f1(fQc=x%6^F$TUcaIJ*D-NU?Xs`*S(0NB)S?nt4C{2 z$MZeMzdpYVW2YV6^t(LWAk98q3Q^>bMrb**!V%j0R5g}{!+%)eSbsUSa`vf4N&r7G C0)s~Y diff --git a/examples/runtime/shaders/dx9/fs_hdr_bright.bin b/examples/runtime/shaders/dx9/fs_hdr_bright.bin deleted file mode 100644 index 33d942128432e8b3be2600dc1e89b78c1a085a61..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1666 zcmcIkzl#%55dPj~lkDyVBiGo7raT+Xkw)Qu;6>z$SZEB`g+miONZgPgaGhHU2NJf_x5=axz2s;R)Kz|&A;(yuCIfJr;-c1NA@`gy>og+FPJ!zZ2o!C+na+GL|ZIF}^9l3S?X zzqxmj*As5RTpn`A3*bAC9(Rsg!NCzvSU zE5O`ENwbJvmMsPI`9C^amFSd??t%sC^`}58t7Yu2l9L z%|@m9_~21zSgD8o!C{ZWX7%bO=68X7fN~5xt&{xom&IcH#`BYH!Phhn)M~Yl7v6on z{^8r(UBOElk9M!U|FL5-0xq-kJP`3sO+_X?g;$QPtSA%YtIb6U%NSTr_w>C?pJfDZ z8S`84@pw<70Eh#$;&YnIVC1KNQR~G=_*lRA$Cgi_Ec}1*sWbRYyrQwE%_^sp0cS1) zPB#P2d`nHXkJ&5fXQlgj$vff)y8n%h^za%n znGxw}>2I|%BWLxrnGrKDj4vGYS2|{ZnVvzJ8Ke6d^Vg_zRA@yezL)BfSn@p0(aeXP z8Cyq*Ia&^%^D26WHR&0ozvwN8V4SN+>>Wr>NM(m|E0tZ!vq*eo)~!#OKBf*F8(I6L gvi3P%^(onZhiBsG|A=Se7}>PT^6p>52G|%BT6}={X1=-K&%Ni&H*n^4V>e0`wl+WuP#&~~?Xx)P zCH(d2G5toDTEIne`~*I8*`XKcir8m&wKE zxiRZfpLP2k-QD9kN8o2LoNgpB8zbn7Wx#O@tY2CBXxrr#$qn?C4Z)X(W}X?&ZzDAA zygTn}#N_!I*OxQe<;s*jp7Ho4qcE|+#NjIl{`G(O0s9Z}1MX=Wk3a8Xh0zp0nBxDL z;w#q&=ey+#a^@@K%opa&SIn8Olr!H<&U`v2KCd6q2dLk%tvKz9wqTyPIAq*B_qvh# uSaRbv?s`*Ac|AtRti#lz|0Z>q+0q^6*y~l_>yiJ&0J>ym`R~Xw0RI4lQ3?M5 diff --git a/examples/runtime/shaders/dx9/fs_hdr_lumavg.bin b/examples/runtime/shaders/dx9/fs_hdr_lumavg.bin deleted file mode 100644 index 87de810b517e8a6079e7e381003fad7adca3b336..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1795 zcmcJPy-ve06orq|G=#sVg%v?ZkPs?j0A)B0;wofTOl)PBxK9LIt*0oUx+tL<)mt6swK?Nul0M$KMv^=z$JIjSBNt2dX|jZQI)?%KC4 z2AidgO~j`_Hjh97Pa(Iz0&36Ro92I`BPN Jpe82?fG>|+QZA&P4!UOzsYLMsJ53E1NR~GMf^vIrqoSqWA3H!WAy}IfTXhXpN7+dw%Y7)HovM ze$20)7aWRH_H_w+w(Yn0;CZdmYGjNcJm!D9pN$Yv(u#xM;qvN&rVO< z!fV8j4iDR{R;zP#c$s{_6XN^7uQ3*#^Tvgv}Hx!#^JcZJu9bFVHj z4RN^2R-cHw)cx;Sy!;2xK_k!o3X```hcG0(Cq*5Ob&P!-aZ#sYYknT; zkdC!-gxH{$?+ffYHR^ZFerLYUOrF^L{9wX!T04`HR<(ueM*qqp*|hWf+(hmnT=9LyQKmO0oDVq?=N&PjURu@LKg l|KZO={fC*p;ItQODbKd3Ei2c~){C6d`MR^}?2U7D@)s>A1GE4D diff --git a/examples/runtime/shaders/dx9/fs_hdr_skybox.bin b/examples/runtime/shaders/dx9/fs_hdr_skybox.bin deleted file mode 100644 index de5fcfdbcae44959baba19aba0d1ab8a839a28c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 527 zcmYLEJx>Bb5Pipj9x>qxEsb7bp)oNKON~*^7z#{Oq&~kekVuXICUh?U06WXA;YavK zEbmX)xW3stbnYfI@9oT+nTuAVoNS#OgH}L!6puTT==Gsf^#J}Ty~h3VWP_<9`VvZ6 z`(yVJ-JaDq3E$|#6&M8L9hfkj)1}9w?iHih9bM{#@6yHoMq;rjqQZLlGIPVpD|Qt5 zE&0JHK8&ll>^%;XQSv+vcW?H>MzhrnTiyGo&M=IU{-F25q*gtsVR6kv6aqulQ$T+* zMpLbiwz*D;1UH&VPW}UaV2a={DDvryyBdYIVI9*7xwiH&%WGDp#=vQOYYMQ&am-V* zLrpKob@vvqH`VY{vqsEI*)Q|kT5y4wHxkcv;P&xFQ?EN6skPH=hA+9Rt^B{`^RqXF ZdA75^#MZ3jnli)P&W8H;vG1l#%9Y=-LF&=taJY#R;2sDy(;#kc|d z=HXAt_C2%7XNw)lxzBF}H-Z27a0z&O>elk3g!$rZlKm~<(JRk8f9+pSL{Aq}ub<=u z4*-wHg`zZQZ zOQ4Bv{bu-C1+fn99sL^j(I@45K&u~(g&YvYTBjkwkw zw(EL9scq0Q>JWY$pYeUj=frW0k?b7z3UV3uMfap6W_wSJai6+|mbvy0>51y6*~B$w!#Ao`KG%>sMy5$&dLO zWNhSPy)r|dfzHSEN`7zbn*qO!=$adIspuAFC9{!zGOr-|s0makMNkzAQ1^uR*rV!Sy^M`VY$| BUJU>M diff --git a/examples/runtime/shaders/dx9/fs_ibl_mesh.bin b/examples/runtime/shaders/dx9/fs_ibl_mesh.bin deleted file mode 100644 index 944f4c57f6a167dc990d2e08d14c59e0e74839df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2027 zcmZWp&ud&&6#njeZ|1!;lbJLWaUnR+E_5R)U5VH<4M>H$uN#-=82tH$K1b-1{a4hq=6S&OP6`-}!Oxd%O2m9(?)F zE8s83%JJl6|BIc|Pxdz*z&{2{%lp&mrgLVjPA5lu)4j*X8v}aKE0lt_?Z55Y*!gJt z?rT(k;*u@rM>@U(e&pw4F4-J1Jmgou6Rw;Vhd#bG3-E;BjLYID+mZ|}E(#0{A(r|r z_ehl6|J(04YtPwfg~b;3=y-B#vWX8KeL6inK0G)XzwzMB@xA-I_s6@R?LFL|j&}|p zA3ge10*FI?{eev4tYWnZHm7;jU*!*%OLLz5lm^Bde_Eb7f%IEPn-qyEAZlxM^_w6>%>RFcmI zScC#7GGb}(FlUONo2`~D`K+1`@GRtb<}Yyz+MAH!Z!aDZ*Z9?RE_0scsAtj(^3XXs z7PH8!q}x{FI6+ClbvE)1884Ip!=kctHa_fgc7@`j1*rUIEDq?8QGUk=hr}LLQ z#Nxd3@6%s4p6NNuDevYR>3uG7$dMD@f1c(*J{jiL_sGlUK(nAY<0 zbC<3jIP&b~D(cYehKNHEZE>z-yTM$`6!)&h82OTRmwHgbF+QyBB{Isf2PF#1u?LDN zOxJ^ivAQQrk_}_rh3OF^T$iu-FlJCr;w7IeX9jHjCxBw_9yyFuZ@3v6Kdb}OS-r)mo!J9m~kJh3&I-b zOEa0y^<$o)836B?V!p)54^lrn-!;}Gaw_Pnx8!9`;=C|U;0!7j-z|%mI4yJRII8Z7 z7juYjQ;c5{|AKX^1IhERc|%ZMoFU)YB(GXu8tbcS#kXRK(Z1@&dmHpN#d8|!mvI$y zM9gTJtIpOt5zo=Rmb}gw>j~HK*S%XOmfUzx_5NxmB@gAtLK;Kvq}_jRCt5-2@j533-6!U9^i}1Piqq z+eu>~SlBEUR{8_%EarDOo^xj=jhFeDbI+#L1;S-U6TbdrT8& z;NgUStp&{|V-Vq$V}N)3doA%V(Q)^<)qOTN8O~ar$#{DDoM5kgZ4a9Vlog_x0DsPZ{jA>s z>@C{9_=x;u_vJSg9*us`2gldQYya`X@BKI5m$&7=#3P0<7O1U-NxethOe$=MFFU@* zm~4H4W8##Eu>yK4?LF=}19It#1?YFN!ed6ZuW7r&>1VO0n((Hr<=9(*$7BMrty{Nno vz6EN|n44L}=zfH2tY0hh$~&Sq@ygxKT{?INZtf*^bGJ@gT+~)xo&)#?Z(zI* diff --git a/examples/runtime/shaders/dx9/fs_instancing.bin b/examples/runtime/shaders/dx9/fs_instancing.bin deleted file mode 100644 index 55df9e5312060debc853ee50f58a28c56e17a677..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 135 zcmZ<@_TXO9{oa!S3`#&G^Z)<<{);d;hd4UP0J+LgF%Sg?6B!sl;swR=#_|6YRi3=AQ z5H7gO{DB(>cS2_EVzw>#3nF+urz#J@l}%T=>eTC0-J84p?wR)=?)(xwPD=ZOz2WA@ zc}GKJRKQOh!tbyuoyWIsUxN7nLX3Xe@=m0SPYn`5h~I?pv1)SUBnDnkAMx$oL48n@ z`@`ouTf18?_o~+(tyR0dey`ep_3XvQPPMbOxjlRhWxaNNU5*}#6rEH&QjZ~cvd@qf z@d)_IwAX?(McVC?>9k2a27WjmH|zC!>u`J#e!~mE-~POeSZSSBzP3**_l_A~1itq4 zpmFeJzp?V|V*~yU@e*+KYQu(PEqt|a0{q6OAFQ)@RM?XT(~IJ=XrV`0 z3>~||$_l_I9;?QiK+i`a6V#9eCX#1x!cP4K%}L-_Omj?Ujo`1s?<8VAbMQKFNYPJx zjC}Ju_|uGf1V8&NV+9<7XFkXwjebG?oFnI;Fa0M5xVJjwCs|2yUqY?_rnTzN$Q&+C|hf zuG}YQVO*Y7vPN+K1&0 diff --git a/examples/runtime/shaders/dx9/fs_oit.bin b/examples/runtime/shaders/dx9/fs_oit.bin deleted file mode 100644 index ac01fa755f21317d48f9acabd09e976de73c0121..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 183 zcmZ<@_TbzbQg6)w1dI&qrSZx6Ir&9Gj36EZ!xWG(^Z)<<{>w8shd4UP0J;89F_1in z&oGgJ!2?Jc05KB~gTyU>7zCik0mYbsm<22c5-%u@H;y-8@Xbsv$}i4OD^bu0(p2#9 s3HDJ4&PYs2EmCmK&n?Kz0Wu5?^b8qR1I=V&;NWjyV0g0N|9_wX0F13AqW}N^ diff --git a/examples/runtime/shaders/dx9/fs_oit_wb.bin b/examples/runtime/shaders/dx9/fs_oit_wb.bin deleted file mode 100644 index 765033b3aacab0ea6aef58f1bdb73a4a0fed57f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 459 zcmY*WK}y3w6n&GXTBA^KEi~Xl-AIZHg><7u$)X~fW*wv|7Ah&JuALiLZ!q9Ss#kC$ zc!pk}S8(h2W|CU`@RI-D|MUNwN@w^+1;=|VA2eBn|M11sseT8O<%(IudV&3&+nEu-E0}%p$-`yo4NC7&`K4q1lGn& z)|Ozd$5lF~L*^hR|2TcCqVAM+$OTWRCDH{i@pnFv0*PA8pZ6E@1tw~h`$X9XqD^_|&x6M|8nw;Of-A dYoCm8oae%u`{Amx*<7u$)X~fW*wv|7Ah&JuAL7MTK{0cUG*2- z6#5PQf&PM9$1_Q4@xsa6bMBpU@8moR*T32?0T=?S&q*ikrP-D+40tu4iq=26hGzTZ zber^&Fq$bDjyE9W;S&~N^kc$AX-BO>*m=$9{Xue=__*kHvUHH%KY4rC`(D_JT3+;U zb9<4er| diff --git a/examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.bin b/examples/runtime/shaders/dx9/fs_oit_wb_separate_blit.bin deleted file mode 100644 index 6ae21a41f8552f3213b5e0a3c2681fdbbc2b755f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 431 zcmZWlF-pWx5Pd(sA_*2+h~P$KixpO*U>8MKT!{Q7*}}piuos9o_?@8k zol*@!&4jna;yd0sN-1C{(J!#zMH( ze%f`!CwrYGmJ_;Q4ujNq0PY#~=`LMSzt1RkPIrkYw2%ovn;MN7EHtc)5&Pq!f83}@ zH`5S@!^>P3`g$C!9n@~G|ZSp;YNh#BVZQr&Eo6FHu~}V%iH6Y z%vj+MAW?F&N^(LKJm37}ig~9w#pj#4QeJJ^ta$}%>4RYtPgN!NW_@Z}jgHgQXW;6; gZ=VeLQuGwQ^*}w&cj3*67JF*xbKrT5wzQV$7pRv``Tzg` diff --git a/examples/runtime/shaders/dx9/fs_particle.bin b/examples/runtime/shaders/dx9/fs_particle.bin deleted file mode 100644 index bb6a308829ac796b2228e557f623a60694f72087..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 404 zcmYjM%SyyR5Uk0#CL$Eb;6j%_BeZa5lcql03P4a(6Cv-BAz*Zg?Nx z+-B}DnWW=KCVg+ekNOWn&5EO?0x#a{~<4luBp$OhI%j{j(}pY%~g6#0K2>b zjiH#&OMwMb+3l*Lp;-QxbAPVb>MxpotK_QVh0M8sb^d>$$my}@Cr3qC3O0M^6;1iA c(PLUFl!Zpw^*eU!3w+Cr1;=5{RK{?dU%OFLi2wiq diff --git a/examples/runtime/shaders/dx9/fs_picking_id.bin b/examples/runtime/shaders/dx9/fs_picking_id.bin deleted file mode 100644 index 716a5005ce50fbde4dcf3451da9881aaa097f48f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 224 zcmZ<@_TZd4*Y!685HK>Zl*VVK2r+_~3=9WAV$A>l|NAe`;2h%UBm?C7L&ZSyAU?xH z1_loxWdOuXKnxPM0AdgTnZ>Yr^=d{2W{}ZfIgofkalCQ70fTR5a#4P9ep-owMv$h0 zhflDNLU2Z6N@|gUbAE0?W)6^HXrO1vusV=|ft8Vge*ptSgFQ$;3;^u{TFKnN$nazV a3j@#s4*muP29*U23=TkAwBi4Mph^JUKq@)_ diff --git a/examples/runtime/shaders/dx9/fs_picking_shaded.bin b/examples/runtime/shaders/dx9/fs_picking_shaded.bin deleted file mode 100644 index 943c5475e790f38ecbd625a034dcb14d04024e97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 663 zcmY*XO-n*S6g~4)G^5st2*UeHenf~Iq4)M|K_xgY1;d+zWyYL$tb+x0KlbLsJl8S`ysP~KTxn`JmJ73So! z=L(Q~t5aX8=djs0Xg52}<8yy;JL^}fwW?n`**`pL`{m|Yt8q#vpIge~ehWwd8BOXF zjVFAhl_am2e|@QzXhjyv%MTw#$$QLa_j-li^F<;3c2^MA9N?u%1d@I6WAxR~PrwU3 z`Y9>~6!TGEEJ>Wiq=#{UpU2vuFEL;=g%Lkx>k8L>iIv3%%mv{nR>X@ryk~0?k9rE0 zu~rE5 zFuv6xT1ETd&)kUnn=X56*ITqmZ#!>{QGBAU_D XL-6Op1J??Vt7o^TvG9 diff --git a/examples/runtime/shaders/dx9/fs_pom.bin b/examples/runtime/shaders/dx9/fs_pom.bin deleted file mode 100644 index 70e545bf8ab15237b68cd2e5cb75fd707edc529a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5668 zcmeHLJ8KkC6h3!eyNSVtfSuri7TU-LI}43TkQ7nWxF9ymVj>CbGRr1H%2{kIQfwei ztVXcfH2wiGh*(+V2iOFsNn@>z$6%Bk~=$4u*?i#E~uBdA-4K!5f*BU6qKuR~bVF@*$HQ z;O<~B+iw`W#&yWPCsWYbG*5I|&^bC=8QSr$-MB*8H^|Ij24nK-ZM1H+8uDQMML*mK zUvAc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7qOk% z({V$&6DPzDanwrwI!-7@gIwJX?Kn|-%98kWTnR_h#82{-zCio|{gr$ljNA|T&h*dX z{XqqAU4I|wfB1W>@I@T;?VYvc*thSjCC3f>?OJl&u(#KiBiqsO(6?VDK9obf-Q<_v zcDLwUZ~Z*etv>D}Zgf7E{fzVtKFaLDE0O z(W7u9esw)6U42q-E4;#u+M{PTvOHGPFJ^3 zSEot;d^o-LnqSrDR?vq@7fDwoy#*bH$((U+!aV@PgEEgR4SIv~D1$EH91twwPkQ92 zZQ~>8J*bre@rGwNr)kXm9G~-j&2$IQKZl|zQ+m=={xQOmF3mjYXP>To>4q*Fb-;5I zJXwCx?~c42EZe3{NA?d_oQ$nMAfnDc>Fo`0gMi7$C~KuAB^1no9+i_a{4M8EU#@6asUk2u}x z_h8M&2@CnZo8OP+$Ah#Lw4Oj8v;Ku`4>Yg(K+0eCfk_HuJG#Aq?dWdNN&W~QQLhVA z!X5oc4j!6ccs$2Pl%dB1M@Uo6PdGlP$0MHy z<~B~}SXzFJcp4_&I)MpcmimUWzn$Zk9}7y>jis~t5aZQBpCT-e6T+wxqO6~^|i%1!^HY)Z)>0CTOHWy$2rZjN@ z+5=*V*n${S+AjK5;*NDu*lw-gXa7sg+h7}!9AD5a{L0-$|GmYyZl{XtZVwIb4sFYL c5Z7g&c=%Be%fF4ZlVNrb8TT>7O{e(p-$kv_m;e9( diff --git a/examples/runtime/shaders/dx9/fs_rsm_combine.bin b/examples/runtime/shaders/dx9/fs_rsm_combine.bin deleted file mode 100644 index 5ba1650aedafeaf42fc524322d84208681df6f03..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2447 zcmcguO>ZMb5Urk>#1q@GC2P5@AO{X0p_Nx$koZ_O8=)X=4v>w6xR_|OY`lsymOla~ z)Dc$><_t)a10dN)Zd?`#PW%pE`1}Qk;l1ka@q~mcRz}nP>Q&XNs_s$V+TY#Co_*sr z!LKg0aqnSvl8w5?hyjBA(WBwyxNG9DKj}X{o^(y5`*hqp%|?U6lP=hFXpDQ~6p6G z+EX8Xr#~3KeR|e08;bvw!XYk-zl%@g-h;c_H?jShdVtmO;$A)%`4QNXFuaVc%kRYT z`wLI3XiF0M;YYQxu+F;N^w>*^vD8Rj@z}0nEVUyKJa&Y4gcz)2=rOC9EB7;xeW{qM zH}Jky%+(us-zny54VWJlax{_K&5OGI$gaV)>DS|G!0dL(SP%rPF8Pc1H&WBsRUJ`@6*;aI zbQ$HOhzDLANs7JLhRnUrn&xH>Xt9-Auy#6GTY|N~kF~fSwC%cLbH%FKYrwfTl30@QoL08od zKh5RNaA7xP_kXLaC6CKo|5aC2YnTCh%o%LTGnf1m-Q=d7GJ&iAEx zb4LH}OH+O;b0wHTm^X6;|1bmYtGYw3>e;B;LtXe5Yh5k*<%0JEc*0z)wJ8Pi^IKwK z<_xoB&g;%t$XPvOrH5(oil@`b9@Ic-h!2i~mP*kHIGRoTi$yC`9BRnRCcT diff --git a/examples/runtime/shaders/dx9/fs_rsm_gbuffer.bin b/examples/runtime/shaders/dx9/fs_rsm_gbuffer.bin deleted file mode 100644 index ef34b3636e4a5d82a218f92c074d173aac833ee0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 234 zcmZ<@_TYScC?=Hw2pAdIO5;m1^GbvmK^z8#6ChFM|NsB}muGMeadeUaa{ZxVAbAj< zVIl*A2aqxVVkRI4iCX|M2tZ6@Sk1`53>0Sp%YnoTisOyr4H$eglZ*0;^V3QcG=el0 zJbZ$E6oNAnQ&Ni*obz)FGIM|oLjyfShSh-#46KX{{0kTu8tg&(VL%>eB{NWvfq{Jj iE6}A39Q+N83=Rtz7*r+z-ND2N|$W>>!`a4^v}c$kL{4^cU#-HcCXYZf)ws!_Qy}{xBK|byE z$48Ulh`~nsVgt)}Kpdl6v2~OF3MhWkH^p}vp7fnP<$3p603@a27(rps^)agotcR<( zgzZ+UAzvECyqmEpVm=+6&lyq&MTENI8}diIUYEi^OQu1A8ufALo&CXQu6I zuzD`IOI>VHDDX9PVQgIqqs1U@bQ5aSx4Pn_6Ht>&dL4d4ancOQcl`dA*!kTI5}#{# zDXpKQJm=Drww`&;k(OpUpId1OD>m@Dyj^?Pw$7c!aN39adyY4|@}qy3+Zy$^?{cT# h>|*?l+NF8#hs2`~^3Us6qe$ diff --git a/examples/runtime/shaders/dx9/fs_rsm_shadow.bin b/examples/runtime/shaders/dx9/fs_rsm_shadow.bin deleted file mode 100644 index 764c7d73e7910632cd9a22c4b5c8b951c3184f56..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 206 zcmZ<@_TYScC?=Hw2pAdIO5;m1^GbvmK^z8#H6T&u|NsB}muGMeadeUaa{ZxVAbAj< zVIl*A2aqxVVkRI4iCX|M2tZ6@Sk1`53>0Sp%YnoTisOyr4H$eglZ*0;^V3QcG=el0 zJbZ$E6oNAnQ&Ni*obz)FGIM|oLjyfShSl;wqnQ~P8WK;!t{%r5HY=JuQSzW@1VZ%vMOEgm1f4n7e&m#Z_i z`m@=g0N@YBm1=!@X?kI~zX#wC-7D4SbG6l}+KbwJf6(KUjuvEV?QeSpV^cRrk8%5n zOIXC0_ILw)`b{OD;WYTpHw}qF810TkKfw5QnCx%Il2v3M_C*N*tCwDdh zGeR7~%fyd-`F<7H6n233IX}`eU-d7WA?gFkuJypd{{UM=!my)F$x=r7KyIR#q^y;A zLY;OR12MZsxnkJsl={saqmpz@h*qXopdL&KTPez0%}2E5shI#frkB2YGd*Emua%Zy z)59*F$K*Tb6Z%h3Nl%dv5jvX=Hwpn`R_OD8Tjs+t$$i_DbCdb9jfAlk)5j{(SIhC7 zDazt4V|k2b;_1J|`YMbizp}9n+4;TKA!bI&hrVCzU)%LBLM%I@dIA(EvnSYUhS*D0 zLxjlj>W#0t$Udo;Fbvl4xrfB;x_ZwzuX$xi``qQjpNl2ua|}?TZL`6Zo^(Cyr2W3} zx~0s2Gs~$&I}mHjMqJ3N?DQqa%+J>^Ii{|9q4ATDOl~ofXQ~=zO$~DRXw# zIXmmQ59yZyH(&B8eLwq_vhocXM?I>rM(tz9(X6yGKA;Tx_463BcKL`|zj`1a`J78f zXP~p|Aa{n2RIhmX^RwMb)hD1oi<8f^X20U@hUfb--pyei;~zdE-*(H-XUrIIyzYU>w*a^v@_R!bZm(WjeX#xjzF#Vb diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_black.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_black.bin deleted file mode 100644 index b1b4264e191afd0af1cced5ad69ca7cc7b288ca6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmZ<@_TXfIg9Z?b`Tzfa|3w&_LmZuCfLvv$7>ELci3|)N@q*%b<9GuG-^}Eq{Nnty z5(SMQO$861U>}9xjKq}GA_eFC+=9#;Aj8l=&yZntAOiy{0|Wm8h#?4)k%57UfrGyR LD6-)He;^3}ov* z*6y&=>}5tJRlYP;MuV&EUTc?@*A5T)71Bc_8uvuo_(C zh1IRfI^E%G3%_&trnsG9w-mF=daR?ERnlW$DrOb**td#V^*r{2VpcSd{i>Li$z#Wg zS(QBYSTUOjkNvHf)yQKxB-e-g_kS<8Q>*%>U-St*_6&`{?l| zUwRE~%)=q}f6V)WEV@7{*?qy~G91)#A*{qY3KF_yNn^Adrg_+=t|EWNOAydm$l{iu zFNokLfIo4oQjb?<5}(nrF^<=hUlEBb;JgXF_c7C_|H~fRr7>81_CD^T#ksfN(07W6 zGtoS9vg#IPjQjXOsCgBT`%^tdwJX5q#4SLVm!jUOH=m|6yU^t&83mG{M!p`YD z^qsn6?&vo-N!Cy1lZ;;1ngqbpX`dN~#Z_S+N8m9($6T#X$(R^(!~SZonVZE_gv=O~ zGcub3xXGBOsPECn>WW#@J9UiT{F%<*J=e=?h;Ma{J8x(G;4CD3b7cLnI&mAb2zwxI4Ziq3e!x%AU++5)eTtJf z<1f1se3#^VeLIk4x^7r~aRu@Wp*afAn}? zhRuB0d`)*5T*+s9{vBpwd>L|HIHONoAxyG(mKfiuc&uLmdWk>f=#TEJTfr_^{<@!x z89SOfVivR31aVK)H!;RMpDXK_gI~nvY!<>SciTaWm!Acx)`ooSY>c<2GT&sq=It@x zI^!ZQs?PS2J>x#opViv>dUBSE@LfDL8~IbSfjkgH!p~s*EeP<2+_yVtx1QY#xKHj| zTt&yvfHlO<-OFsS6TGWUc2^t5iGLRsS(g#($v9a%^dP1m^%>esa=*!!Fx0%#R7Cy- DawiX% diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm_csm.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm_csm.bin deleted file mode 100644 index b9f9afe3f89206456c242bdcb9803ed57685be08..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4537 zcmb7HONd-W6us}$pUF(7XF5UfgAOEug6Mp}2$B2=2__gF8$^_$olH!_%=9qbLpBPp zNp^A30hd8KkcD(~BQ7)uiaQ}f7J>_1xafs$vdYGd&vWjrdi{DbF{G0sRi|#R5K90!56;a7g$Ka-*`W9UxG)=(6fA8m zEjL%2o7EuH@t&=v)y78`+egi0SKLoc69y3Fs=LhHWgBAu(&{=O@ zHd;#yOS5vevAo%AH7~ShUU>V(nNw#L&&(|1N?F;QIo@2`Xsn_$H~X^k`j$vxLMpvo zzwLWnBsu)cojZpP_P;$$d^d1l3up(>4sxFOB=BbS@@d1sknZa zgjqjIqO2b$an>&+1-BMHyK%YFqaXGQxqdO%FQH#ln*e^&ZY+YoMfC4>v92>EY42T! z;dCZb((e&_Pq7fO{;iF;*%7N@o!J$5RmcP|fzK0N+CX<0-y87-^&{7THt)+Y#$djX z2z;r3*a`TMh&J$jBbI*m7{=g8eV57u7Z3LyWIimO7+8wdPsY?|8NLR|ZW;6}|FZfQ zZ);!@EB?xYuIC;bq!JHP)>~a4rSCgeHqrze6fx`&k(tAOdCO6BUe}G9rz$Ay1H_2 zj58mM87~Mhi0lDEjO;^ z>Qv=E%3UO^Qy+DzVUM&2?S_FAsgaIxO<$?TW@B>3v1tHrE!V4NxHdxW;H6_4px$d8 z>X5k_mm1p*~N8H!yz*y*4wDxJHQ>%~n)7N-nXOq`QjJ#sh zl|JwWVBfyhm>lJ69OP;oY^yOeF;e6Bv1%M(PuAUY$gv<-e-BOT*w;ANp~en-M2(Bc z^FG?253Mmde6Yr>d%nh|Q=V_D=jdHz*#F-dqgwH2kACg!?Q~aKjYr=Yt52-!s2AD{ z?*P6Zb_YaKU=CVi(HalWvE32nWE{5iXKziKOyZ5&g)#3s*d)6!&l>Pufn8D&=~eJP z?ZKgR?T?%L>*!k9qH7IG;Y&dVD=<3>Kg5k2BZdo#Xf3ultk`=Ros_WHKpA zw^xwvwX){LI{u@rr0Zh%w6`*rlJ+@oK5fp{m66u~_xJ!Dc|KA-(-sdkBbc{31~RR& z;*4lLEWYeMb{vK9RqJto_(Y84-S#AAJcSz5IC$hcZ*dW`cYtS^Jaf$41LROd?p9Cc zGwAG7P6FWmEhwuds1u%b#GIXV=E^$Z8>Y)Up1Ilksoy^?Cf;3q*VLwCYvQDUF&lZc zHO6a%m}t*A#-E?_eVg}t^^<84{r>Rt`E^zg`+mdy*RgsS54;Cwlt=1=?}vR)2Ew=4 z&Vs+Uy=L6^6XGhXJ##jD>fgRkeErBZ>%_O6{Ym)e{yZ<##?W_!`IP)S`*D2xrFiph z_H6yQ+85k7fKC}lD0egaGVIIS>|=~g7v%K5#t=ZSrX8&}{pudn0`G%-3?=w1ZSxsz z^U3vGgR_mdU(eiC>#OcuUv+xb@5^^+8d~Nzqgw-R*f*_O-?Yv6@qZ5LhdKASmVTsc P7_~tCO4)RprXunmRg#2d diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm_linear.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm_linear.bin deleted file mode 100644 index ed59592c0b1829e1474224f3562e3ea4a7a8c4b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2746 zcmb7FJ#1T56h6;C@pIzD!9@rJ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Cv+HMW| zoNdl9>tb)vXh6*33c(XS%!B$igDTT!e5@;HlCwY?5QFYW{jj#|0d-j0m5k3g@s4M+ z&Np5(UdmX`q3SR{H@i#OOzqXiy}gv(dz%CFj{cTmi~hNDf!NNOZSElD`OdJn#dsRF zr%@wEGk&~5IZgY9*_@UjU&{ELTh}Q-LdI diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm_omni.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_esm_omni.bin deleted file mode 100644 index d37dc753ba3ec2331cb3c489eda7620b8e7bcd83..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3808 zcmaJ@ONd)#6h1fiW|Dbk=FTh>1qW1UE$FlbD-`-1Ym2ScjsX=R#A(I`GLs<>>hgvz z+eHdpSn1-rlMI3jK`nyf&Rv&6w^?){U0V>Z-*?XaZ;}}?Ge7yyciyj`T-dlceWCa5 z1HorW=Gv9^jq3I0%`4U2wKXpg4{)Jd*=#nNtYv}}oZbGcUfbzhZQiVb zS5V#yj@RkbcDmJ0y}7fo+w8pG?NDZRLVvx!wbgCcQvIUxN~!+UX1h-1(3?_xCB-*( zYn$ChwUsJOEA#n`+3c*>TeVGUUfS8A%NdoJ>sGd_2%%nWyju-D{{VPBOp_g#Y=>T6 zC8xWU-D<14-98$kAgoD-91A^9k)>{>Q|q*XtRD`0OEH^0hrO+sb;DuT6tjLf>{G?8BM#eA%zELlFBG#TIPA7!R)2>*P|WJ? zu<;#{y}i9aXvciAzUjIEVP2Mp;Rn_RvWES~x;WnWnmEj@hodLfVg&AA2XIDfFiu<_ zC)yy=anEkYa2p#)j`t*@V?7CBoF@SrW7%z2j#t*?N`14{Y&W+$tB0-~UcGpE_TVQTNH^Gr5u}#m)QzbW(xX``n0(ygV^+@s0VtaM?W6oVH~tWnmUZh>>9l& zNz7*hb%oubK2x6Lsn>f=z))Srne;@Sq&WnrchYA(K4K1_$J|{!#QX#C6oHj-L~VGe zQGU!uUVSJ3YXh5|*`83=Ipm%o zwso~BG6()ao8vaj2j^t~J;vo_Hd)(1Yc%NbZZS%aeem;|Nbc8OmEuHXo@TYCAq3L8fPU2kMJ?k#@e_e6UXNqj6&&AzRMkw!BK< zTb$TS@Z}D3Vqcjn=ZiXwjrb7=*gkNl6CBYQ%^_c~zP6ZHdjW4fI;VA|ji*si9LCe2 zIYYFygk5CrC@=WjH9@Tt#6!P6^oNRZrz{r3Ts=NfUB)rgL!AC;A9ajT6Q!Mf+NPa! zHnO^!od7yd_0W#VeVc2>6@VvtmPqekSD zX8d@EGTQoN@|@Em*a^N7w!?zoGQ3-z?5;YSIVXRq9et0AHls-*BL4y!&hDN7 diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard.bin deleted file mode 100644 index 74af5f3e9ed60dcb370c69a95a99135b8c0e914e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2710 zcmb7GJ#1T56h6<-j-L}J4lY7MfUpEeut3sEbUq zTku(x>aaDu)832k-e~tXHiDuAfXn07ZrqCp^`M~gnQ^Pv{qoM}(!m$q&f(~0e76H# zS#_^?-DuP~9Jfc^_;9Bmk3Jrc$XPjIf3>^6KOT0ReWbdYv%eV+yELu`ONzhf@ST2V zcid|aoKZ!UFVB_n=xTS+*`?*R!$Ur~tc>cob z8MpfFLHl61Sw}%wlR0v>9t4VPR{)23{!jjmT>0$M~IW|j3=Pcf^c$G%p~D(JEA6|?Gj>?g&nXde4bF)NeD9xG;5 z^4Jr_Y$81Nw_;W!j}?#~(}rrEM^!ObCo1q+oHRK)Ix0#PHpZde4IL21VecCL-0*>G z*nbS2*DVg4$NZ3a`NVJ?gQtfIn&V+w6!sQ{Ap|!x^V?bJ4_oJ28*-z&JBWwz{;2Wx zr|&ejukT!M>|pOYgT|Hkpx^D`vbpi@ChPKvNU18dl(~x}7jb_1?%~4=#8(wh&H+1* z^8xk5*MPTI-i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=Jjz-O4yL+_T>kdC24ar$KWxw4%I2a9D&OTCI#o6EL4%#%X21|;+=L)qh>Y8JqPYrU9yYJK{Y5S zvovb-n*HYCV6%#XuqHF)d^HFZ*)9RjW!XR3H*)Q>D_38I_*!V#Dt;)-Ly?z&)!-s0 ztZr2{=nkJP{D%0WxZ|+fidkhn)=|tV>9MaBvkH3bd&R7J9{Wi#E1JiCQ_RZbu@l9t zN*;Tnm`#Mo{#MLtF>R=3d6X5iI(gpWq{;E|abC)>F%C?{4IL21VdonD-0*>G z*nbS2*DVg4$NZ3a`P6XD!LvgJ&3u>^h5bcg0KpB-Y@{V#jmE{(zBv-7bZFD;z?rk+zooT=s! z%38c66YM7sBh4$1+@I+xs$CvFr*Q$goD_9Wz4%rzD~oTtdWqD*uP4N<1|fV=p3-N+7(k6Fb9s*GrwQ#Xt`PdVo|8k*M9-qMaSR^wi9E}Rk01L^}iNyxK&mT^`F{B!jm&i%vRRPBhNKQsTdV@x6H zjo@PXHoK=Y4rAawr=7Po9aQBDtSRVd9 z1uB=dS3ce}UUlz@>-!IwSIoNUo&DJEllk*=<}ucfJYPTS)#>>t;>_Zie&^2g8#PJT z;|lug-oppB=RDTkK9BwMfz`XHbzDc^c%S?mYJ0We8w^}+*k}CTSc=i8v7a-(3#eDZ UeyGpL=8Siie2F5>E6YUWUm2+d!vFvP diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard_linear_csm.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_hard_linear_csm.bin deleted file mode 100644 index 268c84921f2c0271d7062b56b645aa5b89c4ac3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4449 zcmc&%O^91n6h80eWs;dmC(~2}f6#$e(2dRySV8IUP+DxUItE0PAx@_@Ff$n@3Ee2X zPpSTu5WeDwl1z?&txC-d!5euR=3e%?0+5!&kP~*SZ^x9j7#@N{^(QtwIVK>DQi_J9&EL^xO)rl=YptJmlo? zo$7Z-?o>~GL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time/shaders/dx9/fs_shadowmaps_color_lighting_hard_linear_omni.bin deleted file mode 100644 index 12bac8dd1f80d1c6557c146343a2739870560444..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3776 zcmaJ@O>10L7=G{EJDExIG09C9ih=!kA3#z$6pqgSxy! zm+fK-U0CVjx|0cl3qdS`;?7-{LbtQ1&>x^6UZ3ZE@3}LRh-nXV&hvhp=lwb}7uPRM zU+jJRK=8LHv+a%cjp|nO=GE%n>Z%ur2e{PT*laeMtVY9PVZ`C$wd3kr2R~}J~+3vKPhH4bJ*{SS*;xQR57cQ!~Ryx%Hyy_ z@F|ED#9_x2vwAq}O~tJD9QL+iRt<+;SIp|+uum1Uia2arF{_2czEI4H;IP|@S^gdN zKrzd^!^USs_V@P#p&z@G`OU@!2;;Ii3_mnB&^7Eo#>L6T$HZZ7JluI=EJonLae!nr z2IGgV@k1Mjtljh73GBuilI=Z-Xj@N0Xy-}5+F1758z(nbb*2;zE&R)HN&GFUOj?4ZBBEMsMob@tw=*B?GP4VnJEfOhra z5HDb#`=XR$FW-A{K`I$ui2Z!;$3eai;$prp##5OsocDurB`I?>#f#@OH>N z6~N;okpR65n_+K3Bw3IsF&!`W6{yY>>>u^%b3q1)*-g<7=aC)n@xX^X=!a+8kdyhf z^Ma%apAF;{euw%@c~YcZ?^S_7ZOJq3i9E?-2$1izPd+|42e4!8jt?>a5T7!z2usw5 zha45hd=&NW^nZO|vU4Ad!IvrU8sPp%nm?X#??nDU5!gWOEDr%=Q9GUk$c=lNn0ywo zr{K1xK1F6BKkRedhuy(`8NiObyxb>q8)%LOJ?@R8^jJ4vO3;%#$RBy<`|{x<1v# zdri-$Ufy%&i+X|;WxmLl^ARN@JJrEVagL*G2K{&md{{@uID^@QKk$rz3$`}1PEOk; zya7wldl^Ffy3jk_n>B@8bCt$yU(|gNPnmDzWgh!}f_2yIn3unFnOzw^ttYHsQLi2a1pTcnQ1$^wkl>PagD#KIw5bU=N;r&-gxAy{&%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s!^P)&yVb=U z#4kt~08rv(<{+viKhgr&k`fFak)6;$qbHF+H zybQgI(btD#`Ey>zn3kXIk9FJ5-}Zh<_sJs9p4O4T+%O{@tUEVzS{LUa2YO|rnptNW zx};>aX6h}b^%VV>JLWE!gY^6<$efe0e)bLXp`N*L*2GvMMa`8q{WI(8423lq2PwoV z1>7Go1M{;zi8&k7cVX9!@=76gSNBP3-oik@a>#;tcwHnX84l&0yKDmx^nxzk}4s1GY#}E3u!z-(M+g#1@N*<^qujGm{b#6T> z7exYmHxt_q`q?@1ybqXjo9Ds%mO1e}mLS6wd+;nmt&{gG^LH~bd3T5FEhDa7sGU|jCQ+=}Qao>}CBXC2qZldaXq&j9DM2>j@G0QRgA z$oo3)$JcvUZ*&B?&wzisfAZL`|NJ&ALoA+OS}sXoKdY_D9@gZ*-IpfMfCoEs#*nsg aO1^s7o3mj%2gx~%`62I|-8*3jum1pc`laFk diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_csm.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_csm.bin deleted file mode 100644 index e16e59c950a17047fe7ec47d15f0c37f661e950d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24524 zcmeHPO=w)#6+Z9H8)+o}$QsLqwxKm7g?7`*HZ+B{vEzu4P=~rz2TCbbR9j92`m28M zs_=$%=ZykgbkW6_Mg+!ETuN7=kkCS*kb)P1QnJZnpmD*bi$dE?r{8zZz4Lw~#Tm^& zy|_vqzW2NLo_p?h&wZo!>CAh6_Jy(Mn|r?${7lO6jk%3i=dZ8cd})4ddOAuZ0-OiW zO-I#z;Q8rjWFL58IvQ1QbZhR~>eA|ZJ&Lt{dTVZJ@s(FMpI!d(;=;=2)zzB|XtTbb z^=+G*3oBdmn~SR}vumrH-`?6}pJRpbGmAHFY;7#K@ilFmaO1D8ZY*+e-8nYp@Y%J6 zYgu%7P4*GPjadmTMaed($N4~hS!YRkK$MLPX<$1WUIKT9*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zi&Bp0FN1^+4z>(=> zwD;#r)(pZNf*6vpI?RKGxnwzlQUR@1(HY z-vpW_?Xk|aM_2>in}EJn#{IJSq;kS{1#}%=gWsmrF+UjoYkn|wG_IBVgqXmqwL8kS zX<*8`^Jx?~&%5?%+L#0!c98eo*(R@E|Kyq~@QMA|Mqcx6zHIHBJJG&~r`E|_-~2e+ z55__VoOhbGAI1as<1FSR-_&FAJ`4SOMkKtqW%m-}+Tw}akuU1Q>~H(Y{)~UqD*gVE zYmVhPXZaNRbAFx|e?K+bc7Eui^*@%5q3;-U2VZCZs;ftcQ~E(o+PBxxzgFs>pl)$N zPXDPsM2J_LlkwZ3A36tPf%oaW52LU-TC!Ow+2nYRnE)s5%-yoG#+@r`oZj;D@?L%# rvCKX5=hVs;t5&wyrvIY8b>Lg0#j&&_HTp~c+rS0eVR72+ipc)}M^t^! diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_linear.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_linear.bin deleted file mode 100644 index db06beeb4a9badeee26654013340ec404d210599..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7289 zcmeHMPiR|p9RI$Tv`M!%>Cz&|1Pdyt2kka-2iewbMK;`U+66>}5W8-Rv`uIdc70*q zcFDkllO5tUyLi}Xmlc_y7ui8U*u_JH^`hs3`22jn-{0>g%_f^&-=bK zzwh2(IWv{5eQ`$clauLsseZM5se0{vxwg0%q$L2HX_i*2>(#A75UM=aEUj0rTy31( z_`I^V*|<=>wgz2BbqBq!(OBDTmK&Ao=1Q&F_^{ca&Hg?9%azNQoAov4pH*Gn`Cq8k zD|9XdlZwwfe5JOw+FUPhIj1RAzL+ShjpfSL+A2NIZf-K=KDC%`mNv>Lp;BJ|pj-%2 zPk@&SuGvA$dLful%c*9mR^BRa)DIOv2sufR!-XJFq|hwYH&)6Uwe`y8l?!TJ2&Ppv zdk`L}IQ}QTEvGM@JoOU9<4MUDY`2hmeP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f zO zXnp6Pr>-ws9cG`B44y^Y$>LdBz6|2)GwRq}EuWe5iR|8ZvU~MWu0!wz eo?F&ShB<*3JM2+oW;2LS%=Y4vwV91$5&0Lq@pJ$H diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_linear_csm.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_linear_csm.bin deleted file mode 100644 index bd9c4d94efd62165ef7e230f096f7b092ace149e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22344 zcmeHPU5H&*6<+7u-}y-GNtErL)>9t4rTr1ZvgB$N8!gT8qEzP0u~e{=7g#HM{Z z(;jm6+Iz3P)_2z4_pWc&nWyHS9($_un^y%tM`dzzVe|RLOYIk)U0k1?4XP4AoEDy# z4Ql&@Cuf8DKH;g^prOLX_QJ*XN_(RfgxWr~y|A+U-1A#ctp03yX>IF5`-LU++1Stf zzOAjLwe7{N<@Va#dVA}8+gltnk(qyP`SRuM%_TR#seMy!{)P7DGAFm3Vbe}Nx4v|7 zdu4IMO&ZflpN%`)Tj!QHmM(JUGiz&Ha$HADZZE7Z!i43;mG3ULg33POrIyDkHFC4% zuo~N5SYO;&T-`j;0-l64mYi$_fl6B23!AHRi>vD^%WKbF(9x}6QoFkIm{A!F{yX@C zJo&>X&OUX3xUQey%b@ z-^;G3%)s}uS5#(k>Se!HnT4sB{Z?fLzL)(@Wd^^O{ZVCxyO*W+gj~CJtt#xddBiu> zf1;rOWI_L_Vf}9ZU`6_FzH(i^S5o^ZmJQiIzAwFRyv*+x-_GolM3~gtH+-{KX?B491f+WjpI+YSJ#(U zaC2hzYbWIUBDF&@)gAxqqu>7XJMTO$^46PxDLoO1X!u1%gZ{a#k`IO1OgK?*? z^?H~SJx=)%$QLKRfpK#By{SK)d2i~OwQWEyYpMHs>b`+{-Re@sTD@+K$B0ZsBE4uzcC{Ty z1MNXHDfhGuJJ7xmw_ywBUXBjQKe}~YFMv&h9qOt|1!D#6{!Uc{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to4A7gDlSn9^79)odQ?KBh-a*{#XpER&yK#(se2jJMDEC?xBlge3f8%3$Ch`2q#t6?TVwC(2!!Xi%*c?W$ml(Or|G7R2qiK1mJhKb;T8U9{99=Ers34A}u#?3#dpP`B1_Iu+8~C$G3c* z`O&Ukl$&nW9$n3it76POy^?XNFPHaP-5EKRv#`PP-cKT@W8ODBr=#y7d=sn7Y1TS_<&$#IH~d+Ly1 zqAi|_O6RkbK|jW%IW*&};5RrF`c4i_;<_}5lvCpSqrNVU&m~X}joisW9NJ`5mA~M6 z$=Ota?gU4!XLcsMicH#vAVTEbQJHk zjH|D#gOq3-{oE_8StJfeM7l>%_jU{*yE;brVEr6_1hIYubH0pzez&A7=^s4MeC|8W z$GTdV$@SrDr=D8-OS(=2cG}tD}jvS~aJ1;kNUKMlxqgO-cRiV@HBlpL9_M1-Y zvw6yQV=wf95uZJ6;WO=Z%^vbvqr@62?il_v1YJGov_hr3EAdl zII&)o{XLAEcXn9~DaTh4gVe`9`p$Q`QA>xhc8}-Vc~mh8AlJ1qrU|?4ooxKwJK~92 zMeHA3^p(CL_P~wy6>H;O6?bP7Ia2N~9n-Nn)d;*I_|^VSL)WY77}{vRLnOxi9pY;G z40C@^eH`oCh^Ox1)Y$YqdmhBU56t@=dme@ZpT}|NvG^pH?ENHXWqX-pxR#GsVn@7; zuQkqrwX5XBj%LPM9kAKSXCUYwbh$qFi$C{FH_rm)n4Mn}(HO>#$!ofHC=)uq=Gp<` zly-!u)iwPScou_hGdI49w#5aX!N1go0P$*TGJgBit84hbCrFvs*?`VQPG=>jlk+(T z^|tssiMr>m*uBP`yVt#O#jnfHyJLuDJ~O{h?cQS5?rlHOe*akupSzq(J<@D2reHtg NU+_3AP6q=K`5$=-w#)zk diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_linear_omni.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_linear_omni.bin deleted file mode 100644 index ed9396928d98bf14cdfb63c259f67478a018a393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Q`_!Qw_OUN& zAN%Nt{)1=OoebG7ND1xQ-q!^k)h$AHx+n6Hiy?$B)1mn@hxRS_GtT&jhlVuf_mg3)c!ao55^O@ zBu5)+Q^2ZPC?-kFR*! z_$oy7ItT~8YcUq4Ve+BwkA%W)5&Ex+z) zAHRF_2iVxz(tges_X_&#*R0J+OmeoIec~Bk&3D>QIr#vbOm4#oYb52w))8~$%H>}A(YiJ8= z^`{zpsP*wDjK7n_j^721)z<@kLJev?7+(vpdk=J8g3jw&L)2j|yiNgm^*ZJoec_&A zd1 z;}?A8Z^T&Fw)t{vz`9F5^v!*`QkG1S` zj+%m;omoDshGx%1HfMS!GFzAp^fOxvk^DQ!+i}&xT4wLPTMM`Dm|9qqsdsDP&Z&h}`FoPL+eCH3;K~g=aL)qm3Qy-{^9-STZ`$~TLNWxUlrW*1$?ZCjKB*- zD)9o|?06n^_Api(t>A2ZTF328E*-DMXP|oqGWTMfe$uvoubjhM3cqqj_p90t@s>1o zd@i9q9N~MFdc2F+o6V;&_1qmZroXIDj`4oz-{{!pnB9Zy{gD3g{cZt%@jiz4P>qQg z^Syw0hxIhNAaTe& zPHGcx+-g(gB*yu6zmIurybPP=%$(GP9koe$$`)jQM8B(=%YZgsv9`wS+9B}iD;BHi zodvf`sSf_%g1v#$M{BE2Y_)ol^I$%%uYFgKwD0#7YtQ!2LY}tpS7qliZS|$XI{BB5 NX-+FvqtmH~{1-m8YtaAz diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_omni.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_pcf_omni.bin deleted file mode 100644 index 686647e1f669db0ee402ea9abf85fca051bce4a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8699 zcmeHMO^h5@5w7m(`Pm=uc-w1x5lE~AkrI%=P9$QSjYA|(eaM02NCF3j@2l$9Kbyt!-pAh7 zzW2SVdR1T5d#kQ~dheN)r>AfKM({6`^-+8Da_83I&U2l^OP9PrJ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?5YWUpUTl&`=x298jNo(;wr^hhMFX3u3fOJ4JtZ zu8BF^+a&qj&2piqCjtBUnUA6c8s?a8qRrP!T5bPzl5 z&Ak4I-LL*muAx=L_>&Sx7W>Dr{juW4Z~0zk9?hQJ%Xtp?Hzcn$SEIbYiBr$jBz#Z( zcW3s^tk#yC$@IZEduz#=o&nyE55`$2|5|c(YR>+%1L8p3Xhk6GfoiDzJsPR=zUth!+0@0zPr0Q z`#`kCz7W2BU@Y2~x`sJv7T+?bDxfT*T(s&v4T-ITwf1+Y*V0QWVNc4#j@qO=Wqmn{ z>31`&A=r4;#u{@v4kGybs>N!07f?4FxemUKS^d*T8>BQ+&XL2jn$V1>*O=Fqd9F@jV=}<@;~Pe_#glP diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm.bin deleted file mode 100644 index 9556bf4d8fc4dc78f28601dc59702a91f930f807..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2830 zcmb7FJ#1T56h80Sj-L}JE-pesfUpEeus~8I7?9GmjZi9DQ3#eQ7Gn~J8ac7$A9a0J z7o;w(U@2mFNK6hRQx^&w8++C_lmVtPbm8%R=iF;MDGNz%a?f}EzjLnh{_ajG>V3H* z_*#|npfR}B-0$AL-t4Wf2YCqq7e|e~Zl~L?2BFI5M~zPVi(A7>ho84wN5dQ4+b!sd zs(ZofhQrp;s5xwRk9K?A;fJFkZB|bCZ?_K)MuV2~k5pH2{x`aVHl3@%lH$)ge7D!y z8+Dp}=TuVV^D||4xZUoz_UL)_=!hwo)uKFV95zuxyV?1mSq*Yef%{e0?4sqM8WhyB zG-~vk{pR6dqY6UE$qczr4FW|TmH_9n?4Rswx$?=S%P&HFDKu;qe<;g6k>`Nb5F#gJ zw<_xlhp#RC4e?EJ$6+@WGiE*3QOub1*jI`fgC6@%F=NkTKPqOVdF&U(j3$qrC}u2q z?2%%&5gz+nG2_T%A^K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_vsm_linear_csm.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_linear_csm.bin deleted file mode 100644 index 2e95a18ad0836726b1ed709cf534d0bd97b32156..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4857 zcmdT{O=w(I6h80Go1Y}pOga_8A2iSky3r&B6_oyl(qfCzI3S{gF-`42k_nj^x>0yT z-POeuTo#!^7c$k2xUmR|JE4L*7j-!cU6@rDy7Bpa=iEE*Wg016D0Ipr_kQ>M-E+Qs z?(M1N(-WtW~Tnym(vt1hrd9KO7@w%S>*Z#$(4ReEf+*laI0w%1mvd1iBy zE+-dQ$G5sbqYzBWgm#ZRQ0ecrFa>C+NWu4~m`%p2~=27{?Vb>I6X&#p^ z9QLhZ%=S}q+hM=rZ-{@K4jpz^F{_HlO7I}AD_5*|CPm?hj}?~GY`Rwd6TFTn??8)ZFR%0E5`MKvcuWyLt%Tno2 z{&MhDk@)COw{IUo8jca)2OQWd#F-oXju4*)UY~jqxE#Gx`SIAD%9-zpSAaLGmv4!D z{ln#BpT6|Mt>09B2KbGwkG_K)eEh{np9YO{7>E>m9D_x1AQd+b<8U<2#ktWqilfmu zALpGe4ECZ@rB6E?=QHC%W?aM=0&p9^uUwC0&?~4;2)juyuWMzj)i7V|oxmJ1VZIX= zOT+#f0_&L?aoeH`m9F|#F*lWqW?Q_w>P z;2d%T)uW8)T#yrq8L!tfKPJz$w=;fdW5)SrERhU**jG2j%D@(hL9W)PF89j4&A>P1 zEFaukf^QIK_wVIQPh)^>(=)7qxc?m4ve=m0;YiNxN5B$%gV_6HOn%OMa9(z~#`Y1* z@A}c7*$pW(vWr}x#)?7C@)Al(WyIyhWN2Hi=Q2FVjqxBi#)HED!~=9CjeRd3@Z9_x z54dJI(Y>jSwB{9@rA6gIS(f_bAkLP@P^%@)r(wH!kOPNu@&~@()c!bE$PKH_4t(xt z-C0lLYE9!v=K?zxXCQm=WEyq3A5S9KNO^+07&?OtPa^mn=ZVVf!IJ@WYr3!87*D{T zFhq>t3(hEe7V|LZT8?>Mq#NSQqzw5Q=GI%#<1pWe^Nv&G zI&Ecp3*H34cK4PLF;LF;7T*szXPm67+0veY_^h{(Q&@+d^%mc2ct$*@ydG=i$7!w7 zUgJ5%J#atRS2xQkhdmId%vQ=f>o>N4=78rtjf;7dIGv}QV!eW~-V?|)u-%-(y${TK zn{m@P#a_obYt6CmJ(Lf@DSp29n2o_MPO;|HW39;(a*Fw3o|!k}k@_0(h;;+!@8J>b z=pAJ??T+$13dVR8J>)#%e#Uv^u!o#S#)togM|p6jwkMCsvjE(ivcBNnBuQMs+hr2` z_UC^R>+BiqBRo^nBK>K+2@a^foq4}b4o~A8PDAGzta}^jdh$T}{+@$h?Va?Ge$&m~ zZ->-RF`h)+l*{2P7o^wEOYdq)^&;r}rC(8F=DD^r97$2fTsNDxW_qODw#O zvu*K|G#18W{b4_B@x7L~JCM2I`$^9(|e-?I(p9yUGee!Owp6c%ge-|=$%opE%Wyo{StPSpB)wjA>{piEuWDNxO zZ_=lKzMFZ^rnY$>@V*#2`KfpUvJ-NnZ~9XzpLcV+b9hhvJd!U#zBDEuVV>6DuEr36 zuNI@$n|9R)xxn{wHijZ>7RPMn#%xlbIu+!^ow+MER^GX>^7M-L%QsC0w$Tr~4$n5m k##I{|w;4bFFGv0$wpyRMv?C?M$OYCzN+mrnNg^Wu05GVq82|tP diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_linear_omni.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_linear_omni.bin deleted file mode 100644 index 5d9b9a74b90821521fc2ca0d54f23bab8cb1fbcf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3904 zcmaJ@ONd)l82)c^Gs$!wncV3@QE)&7YeA#htrZ3f*Q=p}1BMuiy9o_uM2i;G)4*EU->uGDr{S3O@mz{Os5qt$G+123oNqZ^2qRO6fvTnD&)2nqGt)2DVR`=armpXG(_G^u;tzM^|+Lu&TPVKL@It>~J-i+c$ zQ+$25zR_#e+Nsg33ZKk`t?pW*UEiSPrJWsKc|VdbYl3+^mR=ZwD zSo11cni5^BgGN~e$nk`?59`fl>qg)$sO<9v5XdLVKgkbr{{6G(p2qR}oM9FG;aTp8 zd<$$BWb?v01`?4teg^oP!#^IsNU^UKvl=?=N5!mW4*N|ptChnZD`s_a*x!m-c^p;& zpPX1h9ClnWtB1p0SIm0PVQ(sC)o|D~#jG9<`&conh{LuNvsyUpGsUb34!fn8<=+F2fa#-esS`;Z&=BsTdxVo$(r zO?`^YLw?xjqz}7;{W63dd3l*n=GNC74g1_1N9nU}c_~6qZXo#i&4_6P0g6Efvu zehzXeA^s3cxP0nR-(s@mE z#9Tryw;2=b%2?T7v>`X*$Dv^Jz?n{zI}q&mX^R?$+S|mC|BU-b@P#x2`&}1fvL5we zI|L?QSv<4c1KW(wAs)N`apadqF@4~Z7_w1R!5mjGM}~1W|Hv@<$swQALtbL$mwk)- zxcWKEJ7LIqcM=ol8$kc;BjA~x=?vALvD26J8s8k-(>L?wd{REn1!Fpx3lG?1UCf2q z=Bby>0eoWYs3%xq>R->8Y0hmJvxbZ{Kt6amb3AA9fNvNr10Y6wC+9vud;#>HS9|&# zznL?rHCJ)M_F3Kg(Tw>$TEiu~9y1)%HRzy8G z7pl`IKjxS{!oIM2`>-A9Jj~)dGMn?-!kUD7|p`hEOO+|zxJm$kn< z`nY9#jXB->z>{0_>+Ft-#EWAad{?smBuCq;4Pp@dUqBDt#R_BIX){It)89J|o|nO& ZzVKgl580K9!2eVkdr?Xyt$C7&$iLET|Cj&( diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_omni.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_lighting_vsm_omni.bin deleted file mode 100644 index c7e51a18c3f0975d56ebb7fa85fd69aaad4a670b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3920 zcmaJ@O^91n6h1HSWs>P+CX+W^C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$WqzONGP@#tT94ZNuy>xohI}S6 z=8t+@#;*we)tG10BaO*&ya3L`r+vHxe*yaZ5aK5f`a|CiIIC7qzOSr>#LOq<_^Ul& zx#N8ufyvRGgRcAnc%rSd}ePQ(uU^~`(m}l~}w@l*I)Ti-I(%xoWMB|yvdZ0F} zDS5LmDrqeyJ>uSb>P|ineB_zxJmyr|p2z=bIy~dpG1K`OG`gL}PMdGE24Zb^Bf0Co^)dn#LeixDR+gR0@ciK$R h|LpgWr_Uky(-(eK_kdlo0Q@hNX-$hot$C7&$iMvH|GxkL diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_color_texture.bin deleted file mode 100644 index ad50ba47f977ac2e10f3f2695ecf874c1c954d65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 574 zcma)3!AiqG6r4>`8l@QUESjStXp2`VwiW52f?5mSqSQ(Ym6WzZZ|2@h{ewNHe;|lI z(EddZeuZ(~Cg|0dJa*>2-FdUgMZ38X?p9C1u&_A^roCAs9ERhv0{Ei%5_E-c=iIee zwA1uEJw)TSR^K6gWlBw2!tn;oxSTU>rlRx}SBZP3>=W%iQ{rzbmJUkn$&*Dsp4?_S zzxB~1I0?$Q9CXLwBz&6s`!@%Ev(;|-?f%1KZ|pb1=h0wDP$?f(u)GEe3Z7oCN@wfU z>VxVL-%qJqtRKIBRr8T%*`v*Z*<&vRv$%lk>AJa+$Fm7}qCNKLmK^g8Tg06lJH+vv zI<`VFQb?H4TSiX_jwsBYIZxivcYs4brl$~Vg;dx0xulkzvt(b69pcz%fPH$Bc&x;0{8(kKw($_ diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_hblur.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_hblur.bin deleted file mode 100644 index 37abb8238a835daf125608b9834568466c222236..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 960 zcmbtSO-sW-5S{F<&_bc0SHXA?^dcz*J!q@8paomMYEitDq7@5DN+Wp9FOYicG2%&s zUi~p1%~AXVit$aeRu4G@+%U<^+c)nen^~_{(l4(cZ-iw~#%VfdtrPpI*6Lc8p#TvL zByKVczrtxM@2{06Q63-|<9)8_hG+*53n7X7#%UEfufLk)`@W(K_W6od*JdIjwENz=g8kB8Y9YjPlI+*-fb0+u0IP4+cO2m z4d6s>97?>cE5MPYsN`^sqK~ANs+N4UP@I4Aei`c@Cia)H{>l4Qj6cpgvA>G(PtyN8AB4FIya~*qo*&E> TDN6Ay^)Y|&dph`;^~RQ|hF diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_hblur_vsm.bin deleted file mode 100644 index 7f275b1195292323b860777a8261749a3af0d8d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1152 zcmbu8KTE?<6va>e2o(wiT?OkP=preCi?(Vj(xKIA6-$>=v|>R?X@#!&1X4H0h?_xI zKa8VY1nC!0jOUs(t&&Ca!cFcy@4a769=Y4){N(e?`x`hE#5=XlS^dQ97V9m;P;^Q_ zMdwX(-A{K8xr5E@49g>iXfiJ~u7MIC21A4Fo5BWj8RJYij-w;adAYpN>eQBN28zw& zw%IXHFOv)Vi^+VUTu7GbrO{62%!^j@oJq=9O2OF!CV+(fc+0Ev|KO^jehAbHn^b=W3yT?<4!w5au^JR}b~;{Xil3JwToS$2enFC}P8t54^tPW&gU}a$7UjWo<55z#w zU=1Qc;*4PN25+F4I}keqvAsM40~0F)djkUl&jdCgn}LB5$o@Y8Xb3Ze%>d-Dn!v)q s07M`;5T9WI2t(BHgZK@M3{MsagY|>>Pa44LIY8_QK)iAxNDS;d0B-3toB#j- diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_linear.bin deleted file mode 100644 index 63e0f78f08367082d2c28e79c557a7a2ff37f401..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 219 zcmZ<@_TXG1?ODYD1}8uy^Z)<<{);d;hd4UP0J+LgF%Sg?6B!sl;swR=#_s7&t(3 S6B-y9LKXtmH2nV$R0RMa*(^)| diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm.bin deleted file mode 100644 index 954f0eadf5628ea5236223980da9be0a8b2f0f74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 331 zcmZ<@_TVg-QuKoX3@jLd6!ZW8|Ne_GIEOeo$pE>^AQ_+-hysI&3=AOgg5r4NcmoFC z%;ci{;{3D{1&tt01rMKKABEtI#FW$`1?T+Sg3KHs!_Yv_kYRNo0|P4q1OEb`R(l49 z24^4!(hLkBaYl$Zkk?=h5(5Ew1_mZp2KEL92A&CQKsEydBar=n0?-g<2%7=OUp0Y+ zfdPm>av(m#0uY9%VFU4j_z9E`SJMEI=Y+~HT_6lLAH;vs05*?<2Q0_P;Ifc`;Yb5S Yo*5|i5-Ja3Gc+(VJORo-X#j@~0J9f60RR91 diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm_linear.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_packdepth_vsm_linear.bin deleted file mode 100644 index 239405a48cd78677cdbc324bec00ca4c0b6eb081..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 259 zcmZ<@_TXG1?ODYD1|L8q^Z)<<{);d;hd4UP0J+LgF%Sg?6B!sl;swR=#_7hMndJn-W7A#q^ir3t{)<4*LekpwaRoHD-Vk4;4{@(k?qXokWw;pIl9gr z+&O0J`{^;|HzBzWFVXk`N?voK3+Xh(np|Q-NS(CNgv9?pqpB(o1N!o{@izob#g3}! z*?QWflQhO^`&{HEfBlF~pU$GiGFe6mw|Oa|S-#WTcam{@F-G+W^b|tN2`9uAaZTKv zaI78)C*BKZ_r2$bb}B0%WWJ`ZZO~{Xx>Trb*wl(f$@i>nIki0!&+j)LcOm!r##!g+ F{sIx&Mj`+J diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_unpackdepth_vsm.bin deleted file mode 100644 index cb0fe6851f252989f671e6897b31b0242186e7c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 386 zcmYjMO-sW-5PjRGm_jkovuKWbP*OcA7F&@V+JmNEyo6vC3zl877O%N^t^Z)p=5OV9 z7~do!&N936-kY6|n@PDG!Qtf0LRl&(`*INGMD!SGTUe z>tjq8SCc)$54vz2K7#QH6nw7fT}Y)N7L3J~bjg!4hA#HMGs?2`FrY4{wZ9=KDppiY z%~mruJxe3ZSC6^2`uQz9ygLfxSuzU~Zu69fQ@u8;R|cc#WQ6h-=qUt_6Q0w@zb$aU zv3evp@m6B;Th9;NL{>mRz9O#N1K1o&aG_8+g)bL0`NE-K4d%BovD+2R-)S`N!`SD) Jdso*~e*nbpMXvw= diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_vblur.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_vblur.bin deleted file mode 100644 index 37abb8238a835daf125608b9834568466c222236..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 960 zcmbtSO-sW-5S{F<&_bc0SHXA?^dcz*J!q@8paomMYEitDq7@5DN+Wp9FOYicG2%&s zUi~p1%~AXVit$aeRu4G@+%U<^+c)nen^~_{(l4(cZ-iw~#%VfdtrPpI*6Lc8p#TvL zByKVczrtxM@2{06Q63-|<9)8_hG+*53n7X7#%UEfufLk)`@W(K_W6od*JdIjwENz=g8kB8Y9YjPlI+*-fb0+u0IP4+cO2m z4d6s>97?>cE5MPYsN`^sqK~ANs+N4UP@I4Aei`c@Cia)H{>l4Qj6cpgvA>G(PtyN8AB4FIya~*qo*&E> TDN6Ay^)Y|&dph`;^~RQ|hF diff --git a/examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.bin b/examples/runtime/shaders/dx9/fs_shadowmaps_vblur_vsm.bin deleted file mode 100644 index 7f275b1195292323b860777a8261749a3af0d8d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1152 zcmbu8KTE?<6va>e2o(wiT?OkP=preCi?(Vj(xKIA6-$>=v|>R?X@#!&1X4H0h?_xI zKa8VY1nC!0jOUs(t&&Ca!cFcy@4a769=Y4){N(e?`x`hE#5=XlS^dQ97V9m;P;^Q_ zMdwX(-A{K8xr5E@49g>iXfiJ~u7MIC21A4Fo5BWj8RJYij-w;adAYpN>eQBN28zw& zw%IXHFOv)Vi^+VUTu7GbrO{62%!^j@oJq=9O2OF!CV+(fc+0Ev|KO^jehAbHn^b=W3yT?<4!w5au^JR}b~;{XL|eQF3+rwL=|Tlf8xSvJY^Uu&nshT6SJ=yR zuiZoZ4`v~!Tc7rHvnCb;VYybJ5y`Dd4HOwUuxRH0%8FUVzSrXuKZVw?o>IyE(QYn0Cctj|9`cSnR1_ z+8v8M6HFUpvA+b=T(!L%(FI}uE~VX;IoZHL9Cf@x1)gXZVGVA>O_H@^ooolc8b z4z4~oq1j46Xrwc0&;Ih|z@0AzC@cehFD`)vX2S=dLj>{juo=vU43dY7*agHc;&YxC z3uMf66nb~OReBig4EkYzZ`i!vy3yR&+}dnz9dvg6LGyn9@F?hlSX;fdM$^Ycr5e?f zUng(x-G2A^w<~WxyybcruLCEF?=erbv5ueLuVVZKfJEgH(4@VSu}dWe z=jXt$L3}>vHL+jOIaV9iNk@D*XU>IVb1b}LLbHtXn3q|ab+vY`Aw{3kW39;nPjQ{v zNfW+E{I=sI)c8bt&NIs(r-XI1Huga{?Ya0F{HJ1Ls3tZJjl{35iEWmkW9XaM**RST zrha+e+WT`pg|3au@-$wAKJsz6Z}54dG}qD2=_2UKiS>b6;~IR_&TYW6z1ZZm*l-^) zk`iLtoOtIbE@SW1AM>2USaQIB9?KHnM?zXuig% Umt*Pt;Tt(Z?z+gAk}M;lAN;sycK`qY diff --git a/examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.bin b/examples/runtime/shaders/dx9/fs_shadowvolume_color_texture.bin deleted file mode 100644 index ad50ba47f977ac2e10f3f2695ecf874c1c954d65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 574 zcma)3!AiqG6r4>`8l@QUESjStXp2`VwiW52f?5mSqSQ(Ym6WzZZ|2@h{ewNHe;|lI z(EddZeuZ(~Cg|0dJa*>2-FdUgMZ38X?p9C1u&_A^roCAs9ERhv0{Ei%5_E-c=iIee zwA1uEJw)TSR^K6gWlBw2!tn;oxSTU>rlRx}SBZP3>=W%iQ{rzbmJUkn$&*Dsp4?_S zzxB~1I0?$Q9CXLwBz&6s`!@%Ev(;|-?f%1KZ|pb1=h0wDP$?f(u)GEe3Z7oCN@wfU z>VxVL-%qJqtRKIBRr8T%*`v*Z*<&vRv$%lk>AJa+$Fm7}qCNKLmK^g8Tg06lJH+vv zI<`VFQb?H4TSiX_jwsBYIZxivcYs4brl$~Vg;dx0xulkzvt(b69pcz%fPH$Bc&x;0{8(kKw($_ diff --git a/examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.bin b/examples/runtime/shaders/dx9/fs_shadowvolume_svbackblank.bin deleted file mode 100644 index d7362dfd947bcadfc9347de9c93bab71bd25f310..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmZ<@_TXfIg9Z?b`Tzfa|3w&_LmZuCfLvv$7>ELci3|)N@q*%b<9GuG-^}Eq{Nnty z5(SMQO$861U>}9xjKq}GA_eFC+=9#;Aj8l=&yZntAOiy{0|Wm828ITEh(QpNk%57U PfrGyR$XoFLKad0fw2~dI diff --git a/examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.bin b/examples/runtime/shaders/dx9/fs_shadowvolume_svbackcolor.bin deleted file mode 100644 index 58a70bbebd6bf380a86fe447a10deabb80669600..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 227 zcmZ<@_TXfI0!9Y*()i^3octmoMg|5TVmJVjVgCRB-+y@q=MYCH86ejmDh84V@fjvE zFn9nd10ZGsVvx865Q6~JIG`9a5VL^gK;i|(@y78648EDkMft_~X(b98L7EC4KEXZ; z!5N7usYMFT`MCv|IY5S?fu145>OcktRz?Q?1q=)g_8|Qp539g5&@P~r>z&{~^fq{jAgBi$vGJ%2N$pQw3hYJ`%@*F%33=E+Q{{IK61OOBYCEfr4 diff --git a/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.bin b/examples/runtime/shaders/dx9/fs_shadowvolume_svbacktex2.bin deleted file mode 100644 index b2223d72e8e6d2131eaac5d68cf850c0254cc6be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 179 zcmZ<@_TXfIg9RWK^Z)<<{);d;hd4UP0J+LgF%Sg?6B!sl;swR=#_z&{~^fq{jAg9pfdGJ%1?WdQ?&$O1-?JO^_F14HP7|Nnt10rwaraR2}S diff --git a/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.bin b/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontblank.bin deleted file mode 100644 index 65dcdd0fba72d163ceb4c9c049166e912f2ed946..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmZ<@_TXfIg9Z?b`Tzfa|3w&_LmZuCfLvv$7>ELci3|)N@q*%b<9GuG-^}Eq{Nnty z5(SMQO$861U>}9xjKq}GA_eFC+=9#;Aj8l=&yZntAOiy{0|Wm8h#?L35SoF3k%57U QfrGz+fx%(H|NlTy0JByd?EnA( diff --git a/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.bin b/examples/runtime/shaders/dx9/fs_shadowvolume_svfrontcolor.bin deleted file mode 100644 index 58a70bbebd6bf380a86fe447a10deabb80669600..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 227 zcmZ<@_TXfI0!9Y*()i^3octmoMg|5TVmJVjVgCRB-+y@q=MYCH86ejmDh84V@fjvE zFn9nd10ZGsVvx865Q6~JIG`9a5VL^gK;i|(@y78648EDkMft_~X(b98L7EC4KEXZ; z!5N7usYMFT`MCv|IY5S?fu145>OcktRz?Q?1q=)g_8|Qp539g5&@P~r>z&{~^fq{jAgBi$vGJ%2N$pQw3hYJ`%@*F%33=E+Q{{IK61OOBYCEfr4 diff --git a/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.bin b/examples/runtime/shaders/dx9/fs_shadowvolume_svfronttex2.bin deleted file mode 100644 index b2223d72e8e6d2131eaac5d68cf850c0254cc6be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 179 zcmZ<@_TXfIg9RWK^Z)<<{);d;hd4UP0J+LgF%Sg?6B!sl;swR=#_z&{~^fq{jAg9pfdGJ%1?WdQ?&$O1-?JO^_F14HP7|Nnt10rwaraR2}S diff --git a/examples/runtime/shaders/dx9/fs_shadowvolume_svside.bin b/examples/runtime/shaders/dx9/fs_shadowvolume_svside.bin deleted file mode 100644 index 3e69e0785c995a174c28e155c23053f8f33005f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 255 zcmZ<@_Tb#R{cAP@7`y?I%>V!Y`!B-a9OCFC1LP`0#XuAoOk`jHi5C>d8^;?k_+};- zR@U{{vM6051+U@Bjb+ diff --git a/examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.bin b/examples/runtime/shaders/dx9/fs_shadowvolume_svsideblank.bin deleted file mode 100644 index dd05e0d91ac97a71d444a11e1de6e6116976f1cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmZ<@_Tb#R{cAP@7&L%L=Kufy{TE?y4smpn0dke0Vjv0(CNeO9#0!e!jpGd%d^3}a z@{9A+N)$ALG!;C2f_)T%GZIr$ixiyma|<$afDA(eJwt}ofeZ|+3=I4W7#JGtAqGK6 TMg|5Z1`hrPAaB9{|3DG|MLHmX diff --git a/examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.bin b/examples/runtime/shaders/dx9/fs_shadowvolume_svsidecolor.bin deleted file mode 100644 index 95e0ad9a21755933eac8ec678d76b40d8eb69198..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 227 zcmZ<@_Tb#R{cAP@5HK>Zm&PaO=j0a&F@ksu3V!Y`!CPn9OCFC1LXQc#X#~P zKEp%?1`i-*0K`l{3=+2hVi15D2NYulVivF*NW7pp-ZYU6vn@sRA_aGxO6Fa!9^EIaa7P+C>_#4W5F#1|6tLQkf`(R?2^7gX8Qnj z5q$;UA+O--^*a&ih3}qozTY{AGYE&R_vQCJ_!QQkqWn3Hvv`_sDKUT}`CMy%tVaK$ zciLeYQsN1c8gn3E@F|C?=NRR!He#XRk~L~BEX|{X$j4}Ml_hy{`>1!%_w+Cb10CMQ z*EgB&C)0HDz@+Q%cdF{@ahvCCu#p!PlG8G3 z(Fa|fz&RaY;}|7M!PEB21bUrTG*{R=}T BMCAYg diff --git a/examples/runtime/shaders/dx9/fs_shadowvolume_texture.bin b/examples/runtime/shaders/dx9/fs_shadowvolume_texture.bin deleted file mode 100644 index 3408ef77eb791a0fe4577998c1897efab4dc123b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 218 zcmZ<@_TbEyv$J6U0!9X|;`ox(3g`Ts{2~KJkN^Y27LW|{|NsB~D=;{RI6BDyxxr8| zkUWUbFp+`52S^zJF*6V|GB7cKO$4$LCNivMVc-GEfgl7F6vrFK8!-50CKu%w=ckn@ zXas30c=!bSC`!1jEZ8yJu_|J~u z(~(x>&w?jglhI_lVMOqijzW90V0;jcHjGiQ8T-T2M`19Y^-SF%hvCst90fhoP^1?7 zN0Z~8X{ojz`=jvqWcK+a+8rK-anv*I8;0HEN1u(y!F0E0I%;Ud{@HLkJcVaXfm^X3 zodpN+XgKwwlW-i4g9yf^8e1?vcK$00t;GK0F!<^grl?|&wpI6oC&8#^s_N3O!{8Og zzr{1z+W%zpZK!{7YG57wP?zT-Ij{~M52}%h+@=pccNF7JR^-DH+s1E2>{j+m>`*bg z7l(}%v)gglOfkC{hdouy?!;l=C}!88UCqF^v=QqXdPMqI0 z738W4Zg9%dU6wf^S66S?7xaM9U~2{!aIvvp5=E3C_PcJj6gfNtS!94*c?v$`+lGFb!XMaWVzD~% z=fE=9UPHzrG%im(;LAGvo;TFqfN!o3UI(~PFA~}&JboU4+h?;?+#C7-jt(YRb|u)hlO8r0`=Jrnb)&$*2;oO8~HJ+l|qW-aVjW!l)s zvdzi#wX<`EoVm{JOcm&otjZwmBNyIwy6WUhJLOpIy5$H?Cr=kC-2X7lpicK6qM4&On#sdKI&Zw}t%=^Ez5TZTF0!ph{? zpp>hSvkT^6FCO~nB1ac7cGm;wlsQ{g%2n-oxh{5;xH{;4Q3rD`>VS7zhqHih$dzdw z_QrWx$3q?N%F0#98EOeyuVFSfJGm`M9sIUEv@ydaFxvzBhF$BjZ`VUbs*sDa2OHyh zC}Xs48B@v{gZ#XA8+~7DE!M^Vb>z#Es=P{hH`Ui)&8d@*oAB|3cla|gxC3+0$CKCR zp8SqD;TQG{w=WQ5IYNwi!B34T^^5L;XS{uuaOeMjk6V&|$KLq9wcyXk>Ew%h58Qi< dJ*V8Y(@}FFYk!Svo*_4SguT&Fju(Z9{0CVdfu;Ze diff --git a/examples/runtime/shaders/dx9/fs_sky.bin b/examples/runtime/shaders/dx9/fs_sky.bin deleted file mode 100644 index 5064b58d931a55d0f6634760dd0db9aef2a24957..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 651 zcmY*V!A`|&^!PWs-Poi{Uk-ED8bzutTkj!8Q+Z_u1m{Q|HX3`wFJ0GJ0(r@yJuN|$ij8Lq?&i3QdRLY= z{n_tt*4*7)U{ay;r8QqIDr#?o`CMZ)`x;x&)4A@i-Uj}e?q{nSp?ceTUyW4_-i}PN LZJtMF8QgyX;T>@Q diff --git a/examples/runtime/shaders/dx9/fs_sky_color_banding_fix.bin b/examples/runtime/shaders/dx9/fs_sky_color_banding_fix.bin deleted file mode 100644 index 5afafb2cd4a3b05500e94d7aa5d291fe9dab14d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1287 zcmZWpJ!lhQ7=G_Bi69BY#X)EgMcYAJ97MD^`-7;kgSH8m1i{4%;#AQ% zxH)|DMO+mp7eS$dlS?NdgI((Epr6nCeRs(fR4LuX0(PtMTN>cZj)h>vlYGx1@W zUJ!`*vyNkeNpi{bG#CsFvY@w>4f`Cdgj((Dh3YKbXsr3oc5|asID31# zuu`s+3zhq|^}1hJYHqd~4*}+8&&?s=Eh5LHoFEF^%i#x?W1j!`tH`_se)`_a`Aa`; zE|ed=S!5maHu&fJGo{!2dG}rE=lt8xXD%}DfPebuWD#cWZtm;V-Q4w0%%{MA+u6Co z{_(?n8vJp8&YgPpp!iol;oR;NM&O_r46U!R5g3$?uo;-Z$JFQy*hqnqg_JA+;sB|3LhF@+} zpUO4TrQwGIbCsu;8sh*pCG0$bI{>>3a!aA(a~%@#NnGDw`q=e=_=+fv~ diff --git a/examples/runtime/shaders/dx9/fs_sky_landscape.bin b/examples/runtime/shaders/dx9/fs_sky_landscape.bin deleted file mode 100644 index b25b43547ad298d523208a67d8faa2107da426a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1439 zcmZuxO=uHQ5T4y^vKy&Mh!+oq27l0c&=f%t+N3{XBSb`FKtu>3t~S*CkRQ~OE8?kw z>A{9oO^$ z+^$|MH|$cYT&u=?3XX19hoUtZJsAXj!1Mlk8CtrrusDhBFD%B`#d}&O`iYl=6~NL+ zrw-oy2rL~aSGkGB&lZ-B&oK5;Vyc^d+*gUII{Mg1`?RrP&;)o?48mzx2)H*idA1?X zQvP905RRq?TBz+n1FAO*XA4QXQZ6-W&Dz~o;^g(|L?)ZdCUPsqJ9Z_hHN= zPtVXb49K9U*zQiuxAgQ_ogYXWo8KF&+l~$9v4@rMJ7? zS>~F8%$SEmWOmrbyd3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x9/fs_sms_mesh_pd.bin b/examples/runtime/shaders/dx9/fs_sms_mesh_pd.bin deleted file mode 100644 index e645628c9453e5cacc34d4cb0101bc14cd9aa8fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3302 zcmd5)8=iGbG%&vEj?{(T!$?#QMaQHGa z>W#KGpAFuwZw_0Y2);7?rnlXHxwX477+okshjqk*qWD!@la+^emoLJ74`a;7iN1Ug zd56;~EP#0^zkxH4CotkzejCQ4(pf^OV~!ttOc=<4hiV=W6!?{6QGOXmkyMg~4n^>708^yC^t2~=8k_A*P@_vNmn8%zw0XNnlo;?FOt@QL6D|^;~@4{a#dvcCFyXt(;AC;aV zFx8$u@#vYUM`oP?{2Y5A;MA?~>LPxgS0tbGWH0_VFT?X6c^x{*E0CX#@;Y;pSM2Eh z6^onqS0o=Dy^e133gis$w(+yvo#z*x6HfAqWZ%*I%S~Q*Z##J%p<$fiWwjG^kI@#| z>MHYFOs$TpE9je)8iksKc<52!seAI2nuR_!O{rJ(W20kO!{{6nx7vn!>2F+!81xa0 z`4$%whki!?X!M1gvif79lgOF6iF#4=WdJ;>VVtKNLqoELPLK=r%rUehYuZ{UsAzVL zv#bS6fk_o}Y`;^kVb5|34W7Noi~E3OmU)?)_!&54W*tF=GjnE4PK-KVff;K%uFGmh n%f+k>qb28dW)DrFDOb1u`foJ(rP$A1Hi6Vw%56hQn2b68P; diff --git a/examples/runtime/shaders/dx9/fs_sms_shadow.bin b/examples/runtime/shaders/dx9/fs_sms_shadow.bin deleted file mode 100644 index b1b4264e191afd0af1cced5ad69ca7cc7b288ca6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmZ<@_TXfIg9Z?b`Tzfa|3w&_LmZuCfLvv$7>ELci3|)N@q*%b<9GuG-^}Eq{Nnty z5(SMQO$861U>}9xjKq}GA_eFC+=9#;Aj8l=&yZntAOiy{0|Wm8h#?4)k%57UfrGyR LD6-)He;^3}ovSgJ`4{tcWI_dI+UWXrYpj#QT0i3jKh1wZGMm z=*jiX7EccQX5YMdJIoHl(Mi53_FyRVKI3_kSBr2qT_rDRS|(LbNdxdDwT$^O7YL%e z`!kjkLNsYfjWrPQ@(G6!{eh79KN(wv7Cmk26Hi{ogV@LOa#mzzmR8>7+m$yOhhr~X zOy^1A1=&ZwT#@ws>pr%xfUD4L0R2Qf5&>~5x?^>js&6DqoO3M~js`mQkzG-do7&|s qxGgz|@45}}{MBfH_vYZ~T93l6IkoSl-f8PU7G7%y(U)k(0Qd!n$V2l0 diff --git a/examples/runtime/shaders/dx9/fs_sss_deferred_combine.bin b/examples/runtime/shaders/dx9/fs_sss_deferred_combine.bin deleted file mode 100644 index 9223fb96b0b2c4fff9a9db7e5a7810c171772c68..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1471 zcmZuxJ#Q015S`s~?7PE?`DhVX0tq4{a72NGAS4b!DFPA%OX(~t2}&e~vwT6&W!)hq zMd&CmtxZ9VkZ7O_QabVjt_Tek1r^78yJuoPPTAbd+nG1BZ`OBjaXyI7P2CbaV^WHn z%TYV()|3eT=&!7HHrHxOTi=hHPowTet6fvd0zur2*IFyl^SGuw7xJvxX?0s0@#!-1 z!Lc-ke_odT%pS<>(ee^+KCiJn_)0=a2;g~(#d1oD z^4=mM`xYZQE{8dGgtx|GAK!B9YgZ>_@DRf(NhSHb zU!HahTeBitGsJ!1u;-xOoIWWx@%}(Ou(-KHU*ts{dDFy0;BP)%x*?KGhhHw-zV_~D z>O5q^EDTiLrH$BK@hi#DRwK3^u|3!z#>gtjO_7r(735oUwd9YncMBmKKd#nemZ} zUJQs(pEdf#doITIj2N*o#1Mwq6j(p;B}h|B#w$6Z3+#~tij-;)CT z#*RQ^a%d^TziR^23ec15pB!I-f3q;r|d*qf`19(q{NL_8%v@YJpn z_%wWKJ?v4#b{YyaKZSl=EV&R4KkHE^*RPv<0KEffTebBRVg&1WZsdpVNf88&gF29p zu?-tPA=^;vBrwd5*o)c}{NI96NJ`nR?KId8~a!>~|QFy59=tCBDylx0hwu`~|dv1o{8~ diff --git a/examples/runtime/shaders/dx9/fs_sss_gbuffer.bin b/examples/runtime/shaders/dx9/fs_sss_gbuffer.bin deleted file mode 100644 index f2b1affdb68082a0608d7b857073ba35560b6993..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1401 zcmZuxziSjh7=5$5xm!u}3T*_z15+r7T(FcFO-@M>K}{A!g&30@1}?dfSXcIRae}TdkY7s0fv~hiJX3to-+_3L^-;eiwGqZPle)h!jg>NswCqTTt zxYT^Qy3(o{fIkr%t*!N?X3ZE!)JMpMdHy@UjG2X-)8}Zu<`Nh1B^x`yOTOw{A(vt0 zyL{_;!WEJ+D4{8W&rlS-UN6F!^GaOLQ2&3v&F#gji#6O?Ti$AIw;Io@7w=!H&d$xx zRp*~At*mZUXIkrixU3Q~Uk7>*5W0e9G(i&h_Qh zEx^u*55&V>CRHZ~}D#&;1{QpE@x z;%T>46~+(f8>AKbxJ#^sj>iFUQs9U<>##oMl(S<)ETpGgJ(pu6fIp8}BW14B;G9mw zP(v~7Pd4+jG(?_0bX?>(^6ij$W!Hm>dyEa#Yn4e z6{8vfvbMp|-yVFOx*gW>chCD(M|~Z~CpDZ#64$M4Yo8cm-4^N%I`QA8Y0a8vpeY*2rJe<6N)<7rof-u=fwgULkJ$Q+q`n&AG6d5ojYiNDd&zP;=rvuVo zLUN)D#~C=%eGmqr*y+%VeG^hAhzPOUPBdY%R$guQ-6+daagwSkYAwmUSI@>`^OMF| zyxv=*<&!mcT*q=FKL}H67VnbHmciJ58KZpU$`+9GqLaj&azeLXOsf<7%wNba1qGh0 Z$nmG}RkW+xis$S%*dtob8w;%&{R59BH`4$B diff --git a/examples/runtime/shaders/dx9/fs_sss_unlit.bin b/examples/runtime/shaders/dx9/fs_sss_unlit.bin deleted file mode 100644 index 2b8dd1d182fe9355f2d33035143517502a31cbde..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 563 zcmYLHu}T9$5Pf%v$%%m!S_&S-LK{i26cNoSDPp1LfnAWO7*G-t3p@Afq=<$6+QyIY z7yJYRDU3z1wQ+s3i@IdkH*em|ybX5{*XEn0k2}~C`n)p6e48ayPj>f~nUM z0O32m#%808!&bA~?zJy(!?ok}uvU-jVSIIVe$fr9?VC>PnxInNsNnesm;;I$P&(gAVOr?UT_kC+>k zvs$SeMI+Q^EC$9(w4Tk!1NQ1uAnT#Pdc=U{Of5a4@i1ddlxWNnUI%VGqq^Fy8XX1$fvTydC#%`Rpx5ZI`32a4&T0GDz#Mh q`N$F{3?qJ&;{wqN_XOVdZ9$&gm++cCd;~?}M~l5c{x@j*75o6HF>r4H diff --git a/examples/runtime/shaders/dx9/fs_stencil_color_black.bin b/examples/runtime/shaders/dx9/fs_stencil_color_black.bin deleted file mode 100644 index b1b4264e191afd0af1cced5ad69ca7cc7b288ca6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 147 zcmZ<@_TXfIg9Z?b`Tzfa|3w&_LmZuCfLvv$7>ELci3|)N@q*%b<9GuG-^}Eq{Nnty z5(SMQO$861U>}9xjKq}GA_eFC+=9#;Aj8l=&yZntAOiy{0|Wm8h#?4)k%57UfrGyR LD6-)He;^3}ovh`_)_A@5V3gh|S%$s@hb{C#(tj)Gwyk8bv zq0DA+=iqtL?HxrTD-j z8U-Tw5u0f3KL4TD>ke8`5NIOI;=|6MbC5>Pg0^U6aeCO@%Jw^hINeKnNw1qC8ELYX z#lIxoUmMPx`0P4^UtU@MSMJK{&)+}3i({Wkfra?uSx!avfW1cOidp0j;<*0A#}%`T z#r{&vtYfh^ikVIRMa=6Kdb(JF+ch~8*NS3h56k^VF(cn%PZcveY*yT{+j4Q?h=+B3 zU739=-|=1fjp(M&GUiYZuc~5fINE-s#(0n7Y0m-DYw|qk@h9{grt#PDiu{;t4f<(+ z=cswV^`N=7zOmli*z0U}2hG*~!C|tG;Ni-b59Q(+th*!iLL~nk(k?~5!zaHa-Z1zh z;MMipD)A-7C7eGMcelCEaEm-Nz@vM@I1ndy5Uc$X-;T=em3nCYYcykgWapU=rT@{-r&966)w zmgYw|zf)b*%K4uFr%ro@uG3IG2{q3eyk;l~u}7J6rrER9JZl}~z|%8(xq2>vvBu1I z5mza;5}?s8a$jM zDfQkkPt6UHf;HTgI>})j&jEa6%_90zqdh~n_T|3B$ca!x+)3Nd|xrZB|J JvM5VT`yX}ziAw+g diff --git a/examples/runtime/shaders/dx9/fs_stencil_color_texture.bin b/examples/runtime/shaders/dx9/fs_stencil_color_texture.bin deleted file mode 100644 index ad50ba47f977ac2e10f3f2695ecf874c1c954d65..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 574 zcma)3!AiqG6r4>`8l@QUESjStXp2`VwiW52f?5mSqSQ(Ym6WzZZ|2@h{ewNHe;|lI z(EddZeuZ(~Cg|0dJa*>2-FdUgMZ38X?p9C1u&_A^roCAs9ERhv0{Ei%5_E-c=iIee zwA1uEJw)TSR^K6gWlBw2!tn;oxSTU>rlRx}SBZP3>=W%iQ{rzbmJUkn$&*Dsp4?_S zzxB~1I0?$Q9CXLwBz&6s`!@%Ev(;|-?f%1KZ|pb1=h0wDP$?f(u)GEe3Z7oCN@wfU z>VxVL-%qJqtRKIBRr8T%*`v*Z*<&vRv$%lk>AJa+$Fm7}qCNKLmK^g8Tg06lJH+vv zI<`VFQb?H4TSiX_jwsBYIZxivcYs4brl$~Vg;dx0xulkzvt(b69pcz%fPH$Bc&x;0{8(kKw($_ diff --git a/examples/runtime/shaders/dx9/fs_stencil_texture.bin b/examples/runtime/shaders/dx9/fs_stencil_texture.bin deleted file mode 100644 index 3408ef77eb791a0fe4577998c1897efab4dc123b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 218 zcmZ<@_TbEyv$J6U0!9X|;`ox(3g`Ts{2~KJkN^Y27LW|{|NsB~D=;{RI6BDyxxr8| zkUWUbFp+`52S^zJF*6V|GB7cKO$4$LCN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Q?>J-Y3q( z=%xV!Y`!B-a9OCFC1LP`0#XuAoOk`jHi5C>d8^;?k_+};- ztH1_l-e4sIY@WdZ|3!U6^c)dfHUm>D=&fNEC( N`Jog3|7T!e008QljA7=347h+9QibVecr11yjViH$-UggTUg21{%fDn>*~ z8*)}A77$_tvGEH$z*4cWV%~S>G?6&@)4hB5y?5XDB@g;LYrhU|&%mXzK8dHvaW5UF z>j@hW0^~3n(AUWDg_NN=QGWRL>tLksnMelKU`!bI| z7{Y08a>g6rJGUW2(iJ=$bC>ms;geCgfVY+b-f{OV2fVMjFP3xFF1TeMm}|7GLb{Q) z+7RaR|L)Iwz7==yaIim4C+YKP``X_1_Rem9x7~m7^jR`)_tJyW zU`Vjpxv@#FM?k|vnA2$sFbv#fd=%byJdZ{=!_V^C@tJ$>rB_Ae092OfgJ`h~V%nGa?T%R5nxHE}U>eK+Y<8cnZ@)bL*?-o{~% zII6KGF3eTyYc-kE2bSl+>YnAUVw9}!cP{xJn(U{{0z0!yawjujfNi?>G<#jv1J+j> jse4h6!>%5OHGK-R&`7@KETnD(&eP##4+xy5ssQ{00DHLj diff --git a/examples/runtime/shaders/dx9/fs_update.bin b/examples/runtime/shaders/dx9/fs_update.bin deleted file mode 100644 index 1f0eedd0db31dbb7243a0fca21c5a5651c6af520..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 217 zcmZ<@_TbEyv$J6U0!9YT;`ox(3g^iyu$iUzOqzr(V8HgDfm>9qY0@-i_8CI`mVc-MGfgl7F6vrFK8!-50CKu%w=ckn@ zXas30c=!bSC>BU~>L1M7{DfP- zq1*n18{@f2eca^a&OPV8Cg+{jvfgYQfmXrFC>V!{ulqXo6u=it&%rnvglmg15zfl< zuY4c=?P+s^;e-&bLMJg^frRdiun5J@SM*|cgycz^9wGKO6q$`xYVwp;PDiHLNx}Z* zhoj&y@NgMD#CoKk#_sOTp4)17+HR+J{}{%uuLr}Z&qLiis3W@ustS&I`P^=>^YP62 zIGH&Y?^|4_3Z&e0Drag2HOFv1&sM51H#RsJiaFGZ+-|yF=mnSl)0zLq+T83==e?z7 kq1)8D0_t5;)>zc%(;u!`{4Phh6ty|?xI;~1qVuXzYXdgMr9OVqxhK;tjUx>G{ z?qg=Y$IR|L4jZa79)ZF_vq&!cYoIcfON#;UWXCq*n zP{U^<)&GrnIB1c_=NsoD872~obepR}9WJ7`>WeUnBM~1ryL~PKbvmaR6}}w!cr1ZB t;Axtk{8oHY7pReOqt{EW36^j@?ErLb;#EmZvu6B7*JE~rTWMp6z5$_bF+czS diff --git a/examples/runtime/shaders/dx9/fs_upsample.bin b/examples/runtime/shaders/dx9/fs_upsample.bin deleted file mode 100644 index 08dbea040f206c5f0893cbbc246bbc5599b0d970..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 801 zcmaJ;J5Iwu6dc=$2p=g@3MvFHLxX~7AwWPVMJOO3(FFuXSOOA}AO%F>15gBsf(}#X z5L|-;xP>ENX4bI@4Nrc0`)23Oj(2yO^~v^pbrlQ;`EIM{^(z*@57W0T|GMX0cm3X7 z$+A+c$&O>j9EQUjW(-?<8HODI{qaW%ax^N4EKP%jbaD{Ys{+j6vCYZe@~ELowd3^%Xt#{hXbvN4NxeC z^vU%^;2;WfK+ZyuoQ)88X5AjtIKXoP3ts^WQK()V3z6xmY4&aQ4&qEh`|5>DR~m`# zY^F<}f%a2faqQ7KsTcY(I?_wA^ekaC&nKIr=J6Xd^9y_$-SHW6`M-${jGyfgC}(~W zkH3BrPV(RX>lhzKTYmV?)QqSd89(FqB^~LGyo(d0cPhT_;xFgWaCFanFX?g?VH^Ya E0Sx7yW&i*H diff --git a/examples/runtime/shaders/dx9/fs_vectordisplay_blit.bin b/examples/runtime/shaders/dx9/fs_vectordisplay_blit.bin deleted file mode 100644 index a5fb6ea02dde99733f578d69a92f2fc686995a21..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 327 zcmYLD%WA?v6g`tz8l_-yU1*jSibVPa8YwOmO4EG|)}j!ZkSKJ~h2Rg^KginoD#0)4 z2RJ=9_Hkwoch0$Y?!AxEu&%aW2M`V#MZB85hdR}Hpa5QY>o`mDWLdO+jB9aSYfttb z;Y+W7L%Aiza~MS96Zl{lkS?j%`-xF7A*D{*q@>_~EKCho%*i?9cRq|Uiro}yf4QuP zAL0Px#WdH2ep~r>&uxD=ibj4kPhMxaAL?bcNcrdnoi5BRM_&LNZncv)C+y%g%YL`U(AC|pwSs~rDG?M9K-0{8~a#6UR! diff --git a/examples/runtime/shaders/dx9/fs_vectordisplay_blur.bin b/examples/runtime/shaders/dx9/fs_vectordisplay_blur.bin deleted file mode 100644 index 4560d9a5e913b6c77a7f52300a5cfc41772998bd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 815 zcmah`O-lk%6g_W7$wUa+1wlfaf(WIxVJYFlK(p2+Wh59QYS5y^gg+o#*6Ou&{y^*2 zwQe2EGFk*dtEO{joH3&4&0OBQU+3O)?^dletp;z;;4zTw)%(q}g4MRV83pi1;qV*|Finpw;xePj3Z<-Hpw8ssoDH#3eeefOB3&ib+w#uJD$#PmwqQZ&Tz<%EE~u zMW1}Z3G2gg97QyRSmf*U>TC53wp#~Xt7jec(@Q(c=~B5?PS=hbhs|!fV4ZYYZ9cM@ z)hwJU5LcMdfSm{O`IqWl?(w0V6T9Ktk-xlu&)rI$O>L;MP!4(u=tD4T_R zKalckP>*Vue%+u(*oR3B1AAJq7|ZeddADI-f9H(+9O*TPamjVUFTnMF;*xW~_di_e z?;8i<63q$YIfWdAf5;)o3+EgEk>^J9#V@l6=PR?A-~=-ko9sa$K}=7Bdr;h~!W8w9 P79V%bx5T@)=K=Tvd6cOz diff --git a/examples/runtime/shaders/dx9/fs_vectordisplay_fb.bin b/examples/runtime/shaders/dx9/fs_vectordisplay_fb.bin deleted file mode 100644 index 476ad6e53d6658aa475d143bac920092baad9005..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 339 zcmYLE!AiqG5Ph4rxGh4U=YlyZh@|)hHX=P#D5m!qY{f##hNMCdJqZ1Q_y@V~R|)w7 zKfv`(tU9}odGls=X7(KJg3mXNpyFO0^hq1HIjzZ^pmq+xH;dOn^#A|> diff --git a/examples/runtime/shaders/dx9/fs_vt_mip.bin b/examples/runtime/shaders/dx9/fs_vt_mip.bin deleted file mode 100644 index 789adf25709e0503fce4811486ca0c0eee573ccf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 667 zcmZ8e!A`cz|U58w~hEB*{0 z(F;FeeY0C5u<4}p=DnGD+n%?ZE5X+B5#b0bz55@LANHcC|MnF6)v`r|XSrT0Tb8b0 z3y^l2{-k@<=$xEx0)8U6#uQ^36GeEPA-Kl#ItV^pgg|A!wqyaEjmT*Y_bl=?8if9V zU!jZs!!QVg$H?8e+I5?)cFS!)-*amoEM6$jO zD|sX^Kf>F_gPasmGP>2)87K0FV1_K6Gsc~i(L1QIemcI>dd7cxfqbTe^=lZ8TLbex zPnNXalK2kN%rcxHZ$Znw2zWDE=)X2}FV83TqB+cr8PD(G-v2$GT7_0nPO^^ou4f(u zO{A0M%o#rpG@ioUM!XOI1bwq?pMyLBKaE){%y-kg@m7E?$+QL5#*FpcqQ>AR3LXR% Li^x-zrbP4$@5y#F diff --git a/examples/runtime/shaders/dx9/fs_vt_unlit.bin b/examples/runtime/shaders/dx9/fs_vt_unlit.bin deleted file mode 100644 index eb46ab810faf192729213514f150e2d6e8de58ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 950 zcmZWmyN=U96g@L>LU;&Ep+%4q8k8(8;;|8Ei=}|z29PWRW{DI?6nhZ`5>8K%{e!95 zhEL!VR(t`4C6u4QoHNdnY`F5(+{d|(bNy(zcYbp1?j2A9gjxJCkEh8&8t2KYaoRHg zKXiONPe0{{voucfagz0n@u~1oC0Uy1qYnpJ-0!SPw&FXT75;vM{TfyEr+SFNvj@9Z z>HelF7VwdeBj6XGF;#E_i_d%|U#Sg73|epsP`*N=~TO8v}Lyq}K7 zH2S?;eH=dlniip3wYvv=8OXj)I!&M;`-NC@LUNrseI%g4`!K(Jk29`ee z^w_y-H~R{^?i;xa#9FldOkrF9`b4gt+2Z`jasP#8@P81yEJ!x6v<NGi?eTLHb~@u^Z0CCJ+G5F`E36drH=s<$4^LA4EK%5? zVUK8LhDd${#V4H8jGMqWzEo1nvHPiwEt!Ik7!LzK{&{a|?9N1L$~n}<2Y^2?-zK)4 z_le!Re&}{NJ_6i+H`{zh(@jsFXm)rk;J?OSG|lqk=Jx8nE*=H`=yoOf_3nD|+pYOz zCq4%J<-sRYXO>@oc<3)QI`|;)^!8Zm>V?tPu~Dnl!H0maKY!DB`sz<3|MQ6E-;Z^M zNl2ndm38b@3h3B7)*J!uZ(i={@)C6T8LuJ$;aaZ<@+;w_JT*wqG@g%r?I?sOF)7*UyWXc8;#A^J1tgi0ilzl5B^xU4x&brTY>bi@E%2 zM9&lS6>tyhJV8}GH`fo7@AZ0dbscjDR>K^=$9?zWl#H}7=EZviULR8L#$X=wvop^? z-_bq{9|_M6AHs|+!@KCb{@Vmf|=kd5_ o#tiHMcZ@t=&woJg&0@^E$UGL`fm&m~p=0pQSQd2UDTQkP0Gk)q&;S4c diff --git a/examples/runtime/shaders/dx9/fs_wf_wireframe.bin b/examples/runtime/shaders/dx9/fs_wf_wireframe.bin deleted file mode 100644 index 7f206c30ab083512e2007d605b0cd6153143ff97..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 520 zcmYjNJxjw-6g@9VZFH%)xD?E&i=?;;trnz195e<5g%bQMSQ=8@pL3V=A7oAj7k_|1 zCO<=r=e|^G$jv+Vo^#K=FK6Ls^XdEZ1AG+Rw{a4u@pQgp1AI{_e(bvbsXYv@PENZ_ zLx$9Zk{nAQ;NdeYhV&gX(?BjfLm(J$1$5(Iv^1vGfVc><& z@%=;U4QJD2@F;&elHT3m6Ol-QVNb7L*3snP75SZFe&6N8Dz;THda) zz9CjkJ)?l@8qGqXTC~==wh-kTMl0UX4Yr7*6?TXV-Sq5g_A{?C2XI#Y+NOt%BLDA8 z&8o-DHGNy0tIQoDdO%BVnY7B8c`}Lz4w$H@CzHkq1`MPI1ijfuC@)}ohNm#` z;L%4QhUcJuGc8U#*>8TkGdr`lt;PmuN8ca6Hq1C0#O+Ss4PCgTo8xHG>%3kJ<0sdG zqAi=;S>>yIANA{#(`|Ee$-or2+#g8xH?$ut{XttVRt9#$>48wXnc<%KnYSn`p=9hryBgl&E z+S@`%;Ei?J}Q7tq1_*5-3v1TggWhNg`E;EVFa{zzV2Wb@m diff --git a/examples/runtime/shaders/dx9/vs_bokeh_forward.bin b/examples/runtime/shaders/dx9/vs_bokeh_forward.bin deleted file mode 100644 index 6eb0f438d420b55d4ff146b1f46cb7a99fd61bad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 789 zcmY*VJx?1!6r9~XXYF9={y-$IgeC%oJ^>mEkN{(p&O+D-BgjSOBMrsUQ<$FOB&h5k zktz~D4mko1L9EySuHm2Dl!dUj7+0&O7~I7rXu5pGW}_d3)YD zNxQw{D2aR@SG{O92kB9y>Yjhl6r0!bwOqpL&hp9^ws$Py41dz&2Ds(#Crjkw-(|@< zV`(zNT?)Z<&C&?|6Wx12jK>DXpI}tKs%T^bpM2yek#TX_`PNy$Mt^^ho~8$9$=vpQ zvbNq@Pg;k2-QFNsO;3LJj|mnRzAj?C1=N~|Gur(C++Wsrv7Ti--pv8=P%tT{DqJJh zQ#>{KM6X~y4jNNo{f7+OGDlnW5i(2FN|`iNVjhPuvGa)IM{zc-M&wU)JAS`jS50 zGZ!rTA;0zh|MOe=%6+EuhZzdf`F&nzsg?VLti_cHXZh}ybBZdDV&1}6$fGzPetra- b3l96x8Yb6#2hOKQJ#S(pS#(t4vZVSA_7j)| diff --git a/examples/runtime/shaders/dx9/vs_bokeh_screenquad.bin b/examples/runtime/shaders/dx9/vs_bokeh_screenquad.bin deleted file mode 100644 index 0f8b5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W84X9;zS{lvXs9sP2;^Vxk} z^`AC9=RW^xFA;n1;^3X?Oz_UoJI$mz;DP+3>+f|Q$UWxtVXVFMKDC$fz1OwQ!feK! dX*T8Z9XjmiwlnQ8KV$!ZVf4SCMp4%Q{sQaguH66t diff --git a/examples/runtime/shaders/dx9/vs_bunnylod.bin b/examples/runtime/shaders/dx9/vs_bunnylod.bin deleted file mode 100644 index 7b0b30845ae88d0f9b1fcc19a678a93345536506..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 495 zcmYk2y-tKs5QPs52-;BDnMh%wi7~tJ0sL8uEih5htxSkHjH_A$)jnG3EA3^Vgh?wPp^{lPM5)A#S64y?yuoQ%TQZ~=qVY3gAVKA)t?ouL_u ze`##$^J-pgqkn#IxW@98F08{KHQs<1h9kN#(evnHm-G&auvh@C83mn>bX-Lj{BMOt zUse!%ngqK+7st_cnoN?L2Y2&q%N=;W=lZu-qcC;*$@o5sne@6lJ$#-5rVXb6vOOix zeAc;=PRLv5k`rfID diff --git a/examples/runtime/shaders/dx9/vs_callback.bin b/examples/runtime/shaders/dx9/vs_callback.bin deleted file mode 100644 index 07698c2d1682edd1c57588efee26aa7107d10cbe..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 463 zcmYk2&q~8U5XQeGTNl0b1qAn~AkyL!Xg%~0L5%h!1hEk#DJ!XeE*=8<01;9UN{leW45Uc}R{o;F-q}U6|;Fbg>J%Pa-T6KwFGLz(*>^(G_2=u&T=n zVvo~!Kknf;y~^#>Uf-MT(;YJmqtHY*m*XTi13S4(GY0+MULW6E9K8V){JT8hqqJl3|KEZn05S4mxyH#(Yg+d7&% aN#54coGa{KNA?h%py~BxN9JW+1NZ~6zgxEe diff --git a/examples/runtime/shaders/dx9/vs_cubes.bin b/examples/runtime/shaders/dx9/vs_cubes.bin deleted file mode 100644 index 95fd67dd3bed4b1d22dd6969abdd4550dcc705dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmWFw_TXdyf+gMWJsBDJOXG9%Q&MxnGE>U~it@8q7#SE?fU+V$nt}P>|9}4#8Jt5L zon(OAa3BVWfuuluhKURe0YJ(Ch?#&Gq|X6}K>*EI24)~+0YZ>o5GX5-H;y-8@Xbsv z$}i4OD^bu0(p2#93HDJ4&PYs2EmCmK&n?Kz0Wu5?^b8qR%LA?8Vqj=sVBntsVgrq6 z0JVU4K|2)9g$4K|2)9g$U~it@8q7#SE?fU+V$nt}P>|9}4#8Jt5L zon(OAa3BVWfuuluhKURe0YJ(Ch?#&Gq|X6}K>*EI24)~+0YZ>o5GX5-H;y-8@Xbsv z$}i4OD^bu0(p2#93HDJ4&PYs2EmCmK&n?Kz0Wu5?^b8qR%LA?8Vqj=sVBntsVgrq6 z0JVU(E%Di58S zk6?wBFNlyofw|_K`|RMVR-SY3dH0-m?tOkS+*t>o2S3mL#PBEM!`c4iAjuLWMEfV> z)9K`660IR-x)IW+^V$0(f>qcnzN|0nd)R*d=47N7!Zeg+519~Y2C50XW`41E1>n5$TryLj*iV5XW6ZaXr zChjqgJ2k9ds@_|@w^%w3Ar_ajH(cBVaTB||x5A^m&zSq9dg4_XVN`II{CRSeqW~(# z0qYxfVHnLCPy3#@bm%H1|{q(GTsWd1lG(^apbr!-G+UV{D{&KZM0&$$GDz+cVqnUU1YXckpANry z&ac%uj&V$kbNj4wR0Gt??cBujiua~FhKt~r-FXuuU%rEPeQOc#nSJM~6Gz{ua>ews ORJ~$-ql}BX2JjC+5zcM^ diff --git a/examples/runtime/shaders/dx9/vs_deferred_light.bin b/examples/runtime/shaders/dx9/vs_deferred_light.bin deleted file mode 100644 index 0f8b5da33b8bd6902a44abbad0f61c92b35f8bd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmZ8cu}*|Q5Ph&*VMSwU6g#gm5L;tZ8VWAC$Q_o%2u2KK4S3q}344EVwf+=^-vRdq zV@#agmzjBQW_C7Bq65(M@ztdTcazmRFRHXGK9-GsaV)^0dPom7jKg?}aCLKg#PpsJ zP9({(1(tL^VH47KO^E#)3&rE`NUzv?n_Xl+7Ug53TmAIro!!m7C{AK8d49-?#tU`* zT2>4K|2)9g$9be4WRj-S1I9`7G?5902p{$Mzb_tMGH zXiR5o^TifcZ-G{XFk|sHpf72!gy;z+a!eWs7vdArs`6X(slUOQlh^qQzVU62Tlq@6 zRZa_z_8Q;SE&9x5t582ckty^RoHd_NZok1R9$yvz1aYsj0U%AhFc$xu!Sa+$* G62L#_#Jt@A diff --git a/examples/runtime/shaders/dx9/vs_denoise_screenquad.bin b/examples/runtime/shaders/dx9/vs_denoise_screenquad.bin deleted file mode 100644 index 0f8b5da33b8bd6902a44abbad0f61c92b35f8bd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmZ8cu}*|Q5Ph&*VMSwU6g#gm5L;tZ8VWAC$Q_o%2u2KK4S3q}344EVwf+=^-vRdq zV@#agmzjBQW_C7Bq65(M@ztdTcazmRFRHXGK9-GsaV)^0dPom7jKg?}aCLKg#PpsJ zP9({(1(tL^VH47KO^E#)3&rE`NUzv?n_Xl+7Ug53TmAIro!!m7C{AK8d49-?#tU`* zT2>4K|2)9g$4K|2)9g$}7$IrKdHw}hy7!7*;=>B9J-xvoljIK_D8L3Y6 z5Dk=LKpN+YAHB#H**2P;{eyM7k2K*VBtD)1%j=LPoM?4uazdISBU&RNc>cAA=3~m7 zB3_NbI!!C;B{rJ`yFnet{mXGYiLdVb&9g1Pb<{rc+t(LiH1?bEaMT|VH0nDIyq*HC z3ol{m9$%WJ0UO1r7VzeRT?U*IGc0_%Xrr=c0z2qGCCv~aBHF@zBRBF(DcBoVMHSrVixmQw(THQqSG;`UHGa%0| zxY{3A)o`yVXUppqTw>%{msskUV+*aXs!pM1nah4KY8lUa$t?WW63?|{CkpT4D+g;< OA4K|2)9g$4K|2)9g$4K|2)9g$Gln99$2t|q@1x(TgM2s*>-1~?-A3beG)>3xWSGPY*8*Ht0)y*k>9cFOns;p$ zoo%@-o9Nu0UmP%9FoctmyBZQF*)NYIQ*na8+sWvv4OYw=w#Hw zRq~Lf^Yrm0Ji2Ly-CooSqo@0EoQ0iqI!h)5?bdM{pVxp_M^I4g3{c-%l-nU~I3ze} zE|`?E3`~Aq^;qyV_TVY|57(4K>~V6y=iNvfeW^R- zs~+Zg9VqG;6r#4K|2)9g$XZ0)j5Pb6amvw|EKf!KR5U zy@3h!{b>c_w7-4x{(JvVe|w$g9=MiYKi>-8EEq-oaM&A!&+SR{XdJ*WdoT;;q`Kit zI8=@SX|xp|dY!NHQ#87@`XRTk4B;dtd%OWLUl$DFq*j+9tItqmq}Esnu7B;Jd6`mE z1 diff --git a/examples/runtime/shaders/dx9/vs_ibl_mesh.bin b/examples/runtime/shaders/dx9/vs_ibl_mesh.bin deleted file mode 100644 index 99ef558ad3b9258cdccd6bb8a40a5a7d4370dba9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 632 zcmZWlJx{_=6g@2^ErOQG$;6JD7z1%}R9P4>Q4r!*iD1M)ND*tevsg?csz}+@MWK?xUq`I{bDki7>pXsW$Rj=`u>rh!+Gnr7xaU> zM{lpZ?-fgxl2^H}H<~@K5Olh&HjRAlFptS4kj%mjnS27MFHOR0m+f*^#kCE^CZvo% zHu355jR9NRNtnu{o#dt%SDToH2C75uhM%i4+Lu+#)Dqj$*jQsMB6(AZyToH2Tc!T- z*veVsvDL;JkFA6!OjM+L^!o0;@4kEYu34|F6YSkD9qD9`T|ek}{btX*zYK#rLl7BY zt+6|3g)M)meFrYHD74qzRKyMq3(w`XXJV$5g&9o$Vlfg)_zy&gqHh1;-7X z%ei+K&h`M;fNM78JkWc^Q7E!GF<#FeEWKkowP=h_7r6!qIdL8;X{7b5Q6LAA^wA7o( UNgCNq-;(Fy_poLSSek|4pMnX8yS`h?c1Tu0UwA<5|8>FBjEeCSp zo*QI&6aRo%d9-im?R+!qt9Y^lu8+6xQwM{WWSP!i&-3iwbpTf!d{IGd?8XKdPmfP_ zd5pziPAoa&9f-Jvj2=TOj~KFknOG|*dM>0+)^d>?CLzw!>pWXzx6i@;#X&HM;wXsk zW;gRZ7-x@9=>x?m9FDNwBYprFz%N7-VVp*5^i8kRo>86F#_hCgbf=Z^8Z8_$%a%`O z$r;J-lV25@uVs#RF3GJ5zK=i1XTPebXQP!eYB}^*e>n}C bxti0kOZH~YZrSyGTXs8NDSbTlv6i$SN?2Qc diff --git a/examples/runtime/shaders/dx9/vs_mesh.bin b/examples/runtime/shaders/dx9/vs_mesh.bin deleted file mode 100644 index 4bbac813cb98163fba674ea93f8ebf872e7255a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 986 zcmY+CPiqrV6vfY*nRJqwMHa3E!5|2_krv(B#ulMM1vO4_7sN!2G>oK)ZU=N(Xk55Z z6h`bS{Sb;fp?-pHvY3zHMud*%yqU!DB`>+}_wGIS&&+OTy8*6upKkwg5l*_pxYys? z9rRy$2Jm>(tgw5d__=31%U34d@nG0@Oda&Zfy*EFEI-R{VC&(n%?mt!;TF@C&Ug!a zad+@! z6z|7R$E_<5uC}&!IyG-o;tK|3jG3hkjSlNt5xV5=8TrCsLNw~WHsbt;M2~g0c!{tD*-K`bU-k*+TB+Ej)?7Sfts(V_8hqB3ks($8|MVm2Tc0vts#y6dPK-9$%rf@o zYRxZu7i diff --git a/examples/runtime/shaders/dx9/vs_oit.bin b/examples/runtime/shaders/dx9/vs_oit.bin deleted file mode 100644 index 2ab4489a9d7a81defad6146495c8ac85652a6166..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 557 zcmYk2u};EJ6o&t{7g{i}FJNLvT@2{xq$~`W7y;u}jbOw;NHY72d)us+!1!r>oO|#m@gV7R`zi{cNQ;wr+Uve42c|9C_Ii}O zC`TFe%MrYFzRpikYh7F(u>EEV^SDTlIq=2hj_JZG-?Nq&GF_&e_Rf^}WV$4~Y-0=_ zADKk*A;UVta?8bz#J^Ka$MIQQ!By{Zl#G+7*XZcxII1_Aji~wj(CLn%S~3{+`YfuI zlPZ?WLu*L`;cTZ~NnL=_4#HJ|Hw1iLLbd?fGkWFg>%jDw0h!*ivSF!VysOzK^F4B_ z6Y#7yb<>62BYjF;aLqS5fp!f`4HF#)&PwJUx#-XrXKh`euINawtRHG`{e-$`{TOEb Y$i7Vb4K|2)9g$Bb5S`mSIH0-C%ET)yv@xJRz$gs`7K#|V3lWSE$dTj2#$xR)&e&O9&HVzc zZRm`@;EMYloNsm^8lAA&nYVA=yg9B~jWQtyTkmg@N;7}l2|J^SkR=j;ivYr4U|TlX zrkwYC_qIj495O|&@>PCF^~;mfZIrJ#j7eNv(=*Wvu4^1YMzza0Vu~Z6#L^E8Af9ko z_BXb1MM;uaB+0@n>vI@`lt>_~1Zz5GK0BrP#6R+@bk@HKgGq2Z_4Y3Iy+*Uu^jdeF zZZGue!D!qcBB@mmY8Y@%RH%>}8x?hIZlWDyOA)yd=LK?Uf$ gRYi?0G-md7Q{LABj&CFIA9Ed<+)gdZqdbSoH|-gMLI3~& diff --git a/examples/runtime/shaders/dx9/vs_picking_shaded.bin b/examples/runtime/shaders/dx9/vs_picking_shaded.bin deleted file mode 100644 index a43a35802faf65def36637a57eb3e0d8e9413297..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 678 zcmYjOy-or_7@WO3eojp81x%#W#z3@3B_7|Ip3bjEi60V?CgBAORZ9J!SVER@NFYAY;^r*t5a*Y?i>X;-0@=EQP00} zlwQqd3+iz?)ayV?C_x!$pG01M5Y-UU4N;zA( zJZrXk*`nXQX?F8P`7(Kpr>a>ZJ7eK;82Ut)m9)O=N9f|~`VYLtqZBT-%{FIJnV|3rZL#L#V z077B_bz$fec<>`IH=J{?ou;31mG3*>&-u>1e%IaK1ntMKi{AlSvv@c-KAFa+$;5aq zc+7;ec$6IVhd~q|V7xVpKPTf+Jer;dUK759&IbK2ugA%!fGw)J67JtFZ4S5V4+qrPsHy*=Ds?7w@avlRmc_o1MoyYK4P64zv5meyw1XhX5 zSusR?J3SIeyAy>)os)XmEUwkzY!W|>ckpWPVVq2okJISU+sD!VLH8i)p1eQmkE6Y0 zbUGN)+1+`vi^bv%&}gHRbIfxf{mFl854mM!) ze4q7U<$J8JeUk?CS{Z(JcnwzZ6XKkZrXHx^~=jmouqqs?*J8PcZQP`Hn zbVp^n&AXsp>o>U{U%Mbj+G34jQ^mDL^#j-UcwIkMyo$wZxQk{wPt)(jnm&-?ct%tJuazVS}*M$>T~*axBu)OuCHXR ec!EM4cluqdJvhhcn;~B&U*AR>^L)AF>-`6LamW4u diff --git a/examples/runtime/shaders/dx9/vs_raymarching.bin b/examples/runtime/shaders/dx9/vs_raymarching.bin deleted file mode 100644 index 74a58a5affd6efc5b9eed93a8b1910eb9f7dc59d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 355 zcmZ8bJ8r^25PjZt3TS)*q&OWkkr7SG5E=?1Ask3)Aux&~TN{~tT1&aW<_4+ZQbytg zIRNI35mLm=j^@pqH?uPfhYir2@4uY`?<300GEQen{58(atLp$RyLZgchw4z>VDQv` zXt8`|2q!J6@dJ#R0)}G9+&x3=Vl6b?rOT|?=Q`>|0Unb@Zq{b??zbl$e>e(9e)uw9 z#<@Q**;|qlbc5S2w%7ck2^4^51#?Bg>uY>Ptp4%TlxICPH9l!{$*kGu?Ecrm)beIN mk9(ztWiHN~s<}4K|2)9g$s2^L*c*Q@ucU-yIdIvC$ygV2R~98Tg<82Q?VN3>q{{c-r*P2xM> z0es>gtnlW=yx2qQ^7v$v?JH9-mqmKK0WU14OqVLz*I`Nwn8K4?5mTakiad|F54}KF zcx7QV7Yh-5>Mls2fcH#tJ|HRql4S4QJCmfJh>l7yfhp8O}w82HHEsR z^awDYtcOf&(Goox{yLRAA>;hJ6VEG-1C`hKTVmw=SO>k7f8nW9FFjILQ(^7`%N7_H zi!PVBM|{aqqDvKE6?#^7^9^D>Q(JL1xNl|w@ii-VE3?Kqkdgaqw&{DRTfQwm>CY%+ K+?&~=p!yGds$eq! diff --git a/examples/runtime/shaders/dx9/vs_rsm_lbuffer.bin b/examples/runtime/shaders/dx9/vs_rsm_lbuffer.bin deleted file mode 100644 index 26adca04aa0024a52ddb96e54c72b96c0068442b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 912 zcmY*YJx|+E6g}@fJ8{woOP!JM*e(dvAJ7jvfJ7u9ZC4AGAW{_^*-f&#>cW^#?f8aH zWbMSl!q%Zne?SJ0jLf*_K08Wq-D!5pSV8_?RYHa{48DcJw^j-S6#3vfh3g?Ih>J!DoW)t<7zU9Rhv}p#}1nwbfU| zH^R5cCr`g!*StG6WHn3x!fB1CItc9onzxhCdp)Cuzz3hTKQcJcsk zEpWxUGUsn+SR?qWU+2i(BbFS6!sUntaKKv6#;l<>??tYI!riNQksIEnk7zWg!RAhb zr|TnnP4W%;QV1BUJZSh1OI+%;i@kRo=d$7xnyblJF_pN+9qXVq p<4YVccXeLTUV3G%MeViH3#qf*f%um_OFu)t>L1McAGBr3%KuM^u5|za diff --git a/examples/runtime/shaders/dx9/vs_rsm_shadow.bin b/examples/runtime/shaders/dx9/vs_rsm_shadow.bin deleted file mode 100644 index b7f527de79dabb2cdc627a673192c9c844157d1b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 503 zcmYjMJ5Iw;5FGz_K`DFzBwUgPCE@}=C{hF|V4MocAYz13B1aC8_8r08z(uNX0Xig3 zVu>7qI%d{jVL DsQP5* diff --git a/examples/runtime/shaders/dx9/vs_shadowmaps_color.bin b/examples/runtime/shaders/dx9/vs_shadowmaps_color.bin deleted file mode 100644 index 40836a0ffc8e6c98fa83300d307288ca2e76a1cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 283 zcmWFw_TXfI0!9Y@()ir`l+>KC%+&ILqWmltMg|5JpzH^b3g&Fk^yqV zp<+NK3?M$kLAxJL>loiJt#~U#CW+oTq7w4yy zC};#}DtPz=`zQowB&MVmDLCin7G&lC8HNUWh77CaAyzanFz`=6Vn1L7x)LbXz{v1q t0Ruzm1fUy$h##m9#AlcQq#IyjOklB9U@@S3LHZtm1dJvrZMD8{X98HVrA zAuyjC=9#s;KjY*uIlyV}a+HqK>q&k0_g=ku(mJWPZaY`qQT;d_410YVjf4FL=4U`y zL!49dJ7E8dwwxV~jvNn5jG48$00qNJ(7Ut0p%vKDV zx3t@=!?-L`y-59%SJ9ax)-Kq)>MX<-U#Ux*xo)OXm;b3uVx-?v*I=ehW|EzV-)F9? i6H}vYtE>KF8)>g!{mZ^KmAU?vqfGM06qYGMxcWL diff --git a/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_csm.bin b/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_csm.bin deleted file mode 100644 index d7ee0a3272e53c5df43f87bd96a7684923c9a5ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1465 zcmZvazityj5XNWkPwtEj7a%|YTU-eeLU!Cz0Fh7%TLO$zAz4-&6r)&Y*$JUs-r(pd zT%@wa8z9l}2t2?QegFyzs+ezf?~cvMYp*@?+ud(xW@o>%S0ap;pTB+e$vf?hqQT*@ z6B0R~<<#FF9-cYEQ7kant4Z|15x(N3)84p0>5rxjOH@hVGj`i1x+mVl|-Mx6fZx;U4hCU_SoXr!PeBz`nz@F!{(& zOdh{5Ef8i2CXe5k7U_%<20U=yf*MO#_y?n^n9e6rgy^wiI+u(+RZQoRv6f;whm55~ zB^w`(C?q|MV&`i(u7^1#H!QUzPP5L{4+m>!_J8~npUFku`MOQ#umS{N>)Q$1x_y*Ef zKE*^!XlZsuvAJRhkk2K&UIy2DJPALp5zT7Uov}7z1?wUPy@!1VHWBBiwV7=wHqRNU zb4yu;4)(?9TioZXbw1~*8u`#(L0jFEu+3}Py?keuQ+6-jJucoWXs#IN#5K|S%QXG~ zcbM@9YvKWo>>Kwe9AI0n|?-e5Z@=v+5+HrMFfDClrsvChqc&MiY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%+mT*syV6f>Pi~~PF9Yb{dZ28Cm}DlXHN|(vFG4>1G$l%4Yqp`- zTro7rc}qSIz;#R@;ZMs%vof`2tc_m5T9`%0Xg`?|@qAjFnS*npdCExTC9(t^#7#q0 zFI4B87pNVD&|aZ;RcFaIpP9O_k*jAib$KR^;eJhBL371;Cf*63yU5i#5o)w#A?-hs zq3ZRjf8N)oV!HqJZjhJAEpXIy_&c$0Yu>Olw=+m<{e#`Xp zTEDj}?P8Ah?Huhp8Ew8pdD?d^?VTL$dpX+oGunJ7^RypW+PgX04>Q`l`$rjVzT>=W K-pOi3ME?PPqA_p) diff --git a/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_omni.bin b/examples/runtime/shaders/dx9/vs_shadowmaps_color_lighting_omni.bin deleted file mode 100644 index c385b45349be0cdede18c213cbd1758a99ee38d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1412 zcmZ{i&u-H|5XNWiP3^P=2PjY=6*n>Jm+49V9XTF`8-P8I}p76Z<^8H&#o8xA;^Wl6{8-11{ zB#DKsakCenwY#UC_JtIrS>&*jLHtn)sd;|f?6(H3-mv0{A|aR%IXrKj#TT_!AEIR` zwylE8D^e8J@qH!hOpdgN699PhW{nz<$8=$aM9a zIi5fGJbWx;S)!Tg$g;nhnVxiG@C(rN$n<05N}8EoEGuhf`mpRkGt+}*SF@+NPd;jr zb}MoQ?%F(j_^YAQd@hhD{>yX6Tt=+xS2F&7#;?++VYAvSQ?2uE5D(+`qtcVtPfJI~ z_2W_<$J!p04&z?G(}htfKdaFE6;W=FqAA96K%{=+ub;;ll@EX$F<~1}3C9Ls*cd^9 zwsRCHZ^d&Yl%Lw3lBw;hTxv_Tk=i*GKqrTr0Byu1Q$dXh&KYlneD-NVl)yG@L$jG? zD3J3OydHp?m_Wgw>=8}(s4-=2)C$%>FDAzL$&`ruGuq5NtP{;rMmjH1Md%=I66*az zz0P@oo>2(xC2H6EEZF8XyDx0ynx5>w+!M!ey>?$gGtIaso(Zq}$Td0<_GqYlT7RTM zUF%i-Jg-g7O#Q3bATLo{8J!!B&UQuz=dEr!I$R^4X{4Fko2luRqg7a=bvvWQcjC@9 sT6Z0-oi$qbGFp76?q8$zz|q=WqxCSO#dq?NqlGi__+In;mP;b~2L)s#E&u=k diff --git a/examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.bin b/examples/runtime/shaders/dx9/vs_shadowmaps_color_texture.bin deleted file mode 100644 index 0f8b5da33b8bd6902a44abbad0f61c92b35f8bd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmZ8cu}*|Q5Ph&*VMSwU6g#gm5L;tZ8VWAC$Q_o%2u2KK4S3q}344EVwf+=^-vRdq zV@#agmzjBQW_C7Bq65(M@ztdTcazmRFRHXGK9-GsaV)^0dPom7jKg?}aCLKg#PpsJ zP9({(1(tL^VH47KO^E#)3&rE`NUzv?n_Xl+7Ug53TmAIro!!m7C{AK8d49-?#tU`* zT2>4K|2)9g$KC%+&ILqWmltMg|5JpzH^b3g&Fk^yqV zp<+NK3?M$kLAxJL>loiJt#~U#CW+oTq7w4yy zC};#}DtPz=`zQowB&MVmDLCin7G&lC8HNUWh77CaAyzanFz`=6Vn1L7x)LbXz{v1q t0Ruzm1fUy$h##m9#AlcQq#IyjOklB9U@@S3LHZtm_Vjfz_+8nx0GX>INJet<&+#}0K99bEk{ zf)sQS{0D;d+?O<>zT|SxJNMj=-0b<~aqv99ettOc+CdZ_hK;>?cv)@6r>+8AMyK0B zEAng6d82-IT&*>0QA?`=7{z2e=uo{AcEg5NuH|}~0q1M@HC(~Q&f5A6ua7k096Gt< z8n~m|r-@wJoY3TSX&Pz$E6V^q%cb>4+@ERT@NxObTyp+TjR!@I`lZRoN2e7m2aDLO zA2j1ud~{Ko+nz6#D}JTqpVSV+W@#gi&g%_=rNxCMJZu4lBD_9Zt@5QA8ZeuFk^#I# zaDf4pVTOet{P0eOmC-q`4Sz<)JI2kiYYN1y$2EGa`PK(^6Yh?$$GUPyLeHF()0Vrp z9QQ1F1BpB2xhGOew0+TQD8|4Z_qUAMx*G0?6Md5QRwmQgJZ{u#ia?&nKQZELp7i4G z2b?((tT92nYq67InSmNxyNGw2mwrdi+4_e`6duCLI2#ef zeQ(*>8Ft^ivE9jmvAy`u6pVwjQFC`a_S{q7S1UaQ=v4Ep&|dK?E}=bawhC+~OyNY5 z9%rD>VlmT9nQJg5{?b<841FPCKpp-8Kx)|NQU#SAC<~RS1f;+ip%O$8=%WCw)G0>@H^|TlF2%q( z5}t#Qs@mVO{p{y&kKJwwl;85(j{&v!)_Ufz#)1Fc5B1VA0E^WIJ4K|2)9g$TzX3w0o%X%&z4_;Vy|{G@uFv*gq)>fN#%X^r>J0~T*8yBsf)eXY(^uDVEq4`* zdQ)tQ8k+Z4*C$Np+`^dF1M6bgw>w#O5lv(L2Xg*S<4ZBJ;v4M|Sa*@>0 z9zIReS^E4Ip54{LRuo5J{PNfzOv7e6o(x9}8ujxAzHb4qf*_~ZC18H6C_ksPp$Rx? zCNYt5cCp7;l{kA=`+f($jki5|7kfsNlTk7-9@e>oZpIn;2FA5HGGNVk%Z@BtTE@%e z+)C;``L@S5%(DuRSJ2Hxn|G6S>2u#xWxmJ(@xHLy;!m*-EDi8WFQV<+GY3yrn;y%a Xe9kPs51wQu@uV$>QqZEE6$OBQfCF)2 diff --git a/examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.bin b/examples/runtime/shaders/dx9/vs_shadowmaps_unpackdepth.bin deleted file mode 100644 index 0f8b5da33b8bd6902a44abbad0f61c92b35f8bd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmZ8cu}*|Q5Ph&*VMSwU6g#gm5L;tZ8VWAC$Q_o%2u2KK4S3q}344EVwf+=^-vRdq zV@#agmzjBQW_C7Bq65(M@ztdTcazmRFRHXGK9-GsaV)^0dPom7jKg?}aCLKg#PpsJ zP9({(1(tL^VH47KO^E#)3&rE`NUzv?n_Xl+7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/examples/runtime/shaders/dx9/vs_shadowvolume_svfront.bin deleted file mode 100644 index 40836a0ffc8e6c98fa83300d307288ca2e76a1cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 283 zcmWFw_TXfI0!9Y@()ir`l+>KC%+&ILqWmltMg|5JpzH^b3g&Fk^yqV zp<+NK3?M$kLAxJL>loiJt#~U#CW+oTq7w4yy zC};#}DtPz=`zQowB&MVmDLCin7G&lC8HNUWh77CaAyzanFz`=6Vn1L7x)LbXz{v1q t0Ruzm1fUy$h##m9#AlcQq#IyjOklB9U@@S3LHZtmsdO1`0v%uc7>o{~zeJ}9NLTl?}+iG{Z z9jiMYjvU`=dedun!k|&#Y2fV`s8nDkK>R8Fzg8>d$ACGPxI%(j#^eZ|3cgn0D&@cG zz)EZ&djYcfCTog0RZKk3_C(eD;rBa3dJkQzr1N*Ua!2kdN diff --git a/examples/runtime/shaders/dx9/vs_shadowvolume_texture.bin b/examples/runtime/shaders/dx9/vs_shadowvolume_texture.bin deleted file mode 100644 index 0f8b5da33b8bd6902a44abbad0f61c92b35f8bd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmZ8cu}*|Q5Ph&*VMSwU6g#gm5L;tZ8VWAC$Q_o%2u2KK4S3q}344EVwf+=^-vRdq zV@#agmzjBQW_C7Bq65(M@ztdTcazmRFRHXGK9-GsaV)^0dPom7jKg?}aCLKg#PpsJ zP9({(1(tL^VH47KO^E#)3&rE`NUzv?n_Xl+7Ug53TmAIro!!m7C{AK8d49-?#tU`* zT2>4K|2)9g$TzX3w0o%X%&z4_;V-MDoOuFv*gq)>hDjnn>M)Ey4yt^>HN1SQs)rmwE!TJ9Y{l@nkq+(5Rm`@O=w-6$ClOE&=mnMfo|U4NbsF zGl_|evx_~(s>Io|+V?x~ZM^N#yI2`bPDaVVcv$BSl8iI*4UB7ZWWbv7mK|BPw2YU_ zxs}v?@@*O^;d`yYt5NH(gLy^EqgSy%)QKPJ6f8@3~+`#Xnc!6+S2)6jx>S z_2*xB6l{&~kP(o)d?6A*mVk5!!<5E2{8AhzmeF?<;5)=|IQ0J&hu;LpiKXK0{#Kdg z;bkZ4m%Y7ELd1(SSD4FmC!pR7pbt*!kD4;AXD<96>JKGTeUV!`t*2T`a<$tY^mqDO zyNefIdt&j*+Q!=A#@m~3bq0&8{q39GcR^fQdh(LIiZW-Vnf4bxdUkOCg9Drukz|GP z2INb|kuR4&e){_Uw~b#^J_k8cIsCo(^5y5UA7C$v(}eu%_A8hFIsED1!dU%a=ze_`X3Bb)`rPn4%Ezq2-yM5H;Mq9>%$ zn*@C<=^$}ZEoqm8pwFvsHJOn-#q9B`0Vn>nf$=vao{|-%Jo_J6kzyypKmyu)HY-Jn z)pO*zTBoLHzG932_3cLSLYcJoS7aIdC%I zh;wCpqn-L19f8gmA8FST=4*LW(VrZ(ON z4%lGu0=>9U9O$^DBef$YeFXNX1AmWeBR+Fs|9mZs5lR!XJVj1p`jf9HFJoeG77=8m ztCD|1o;D?)PV+VRd3)5AkoWV7%3LDk$KF%#bs=;XyQ;XQesmtW(w?y%Q@RGb7`TGD z2cYkHVHcw==Fa}a+EdRHpK~_f0D6IMoYu=Y#`|3*mi%X@ z4d3L`cHBAI+D@arsdUF?c3I++#I#hO*r>Es5Sns&TB zp?jAT#Ga?Ye$c~dbdx62?#U*`VF{i)x$Y2Em(!Bek4_3Pny z5{wwss%JHCM!b za}opM*UT1{V;)#;8FXKwDp=B261iH>)p_YF=sUZdozlD3SxYRrOqVfx&7Cq`{zsA2 xh~G@t!csH2le~%KZT6Zu9yQvkxb^QTS9{(0m-i}ZX8g+>d1rZ>GI^Q;_yf-umjwU- diff --git a/examples/runtime/shaders/dx9/vs_sms_shadow.bin b/examples/runtime/shaders/dx9/vs_sms_shadow.bin deleted file mode 100644 index 40836a0ffc8e6c98fa83300d307288ca2e76a1cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 283 zcmWFw_TXfI0!9Y@()ir`l+>KC%+&ILqWmltMg|5JpzH^b3g&Fk^yqV zp<+NK3?M$kLAxJL>loiJt#~U#CW+oTq7w4yy zC};#}DtPz=`zQowB&MVmDLCin7G&lC8HNUWh77CaAyzanFz`=6Vn1L7x)LbXz{v1q t0Ruzm1fUy$h##m9#AlcQq#IyjOklB9U@@S3LHZtmDLjOgaW*1| z``)s%Gwi;3W2ch?V|xjn8JGumqvqav?0ctvpjJi(FsSBPp}&$>QbK#!Y!%o}n8Jx9 zJ+HCzb zLCvn#a4&wI2mv$t!Li^hw2(iEvvfzD_;CeB5&iI*oRJ<8Yxw1~l)I%Iy{B`c>*VQ? Plo?AeSau6e5^i||TsT6D diff --git a/examples/runtime/shaders/dx9/vs_sss_gbuffer.bin b/examples/runtime/shaders/dx9/vs_sss_gbuffer.bin deleted file mode 100644 index 2525e1e383caaa10885dad923dd07059204f0f07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 643 zcmYk2Jx;?w5QU$;4r@f=3m{>M1|)C@gUSa|0Kt z%ptgn3s=lt+&nBb1`DS+ZO**Z{CU|kAS?_KZvjb^Lqw;t~LgNa`c#!tf$MXh>R!}k?XapA?h zegcF)jAI$KLraPYw~j;;g;uF6)b<)@PrB&0pp7niRH>~{v4@N!y|98Tw$P5aFTY;s zm>dz1Q5S5(u*5JvF85NYYx1H;(_0p~K4K|2)9g$KC%+&ILqWmltMg|5JpzH^b3g&Fk^yqV zp<+NK3?M$kLAxJL>loiJt#~U#CW+oTq7w4yy zC};#}DtPz=`zQowB&MVmDLCin7G&lC8HNUWh77CaAyzanFz`=6Vn1L7x)LbXz{v1q t0Ruzm1fUy$h##m9#AlcQq#IyjOklB9U@@S3LHZtmy8+5@64&hb0 z;0VSg^_xcsop$nOe)HbUH>03;4BGJP@5Ds&Bbuh;crr@jg>3*fD_)Havh>Y1Y|Ts7 zVQs5z)k62-`sS4Bf-cPDAvwN*8IN1KFzGj-i#^g!k~*u6g2hj&GDfUc6B+oNN0(6> zcgb^>&eNB7|9sf;d;OsA2d_`#IP<&dbe2pQblMjktnUG*0k2@ID?t75)OJQ076CWS zB_>oxEhaDbcMP~Xc3>!zvBPayR}MCXfiUMT{5@ss967LIykke2tu*5hc~?r^CEwj~ z74y6S6b*!h^yWOWkb3ran#`94AR3ptw`ek12UZIBr55S!>Nf{Xx;Hh}HM!hDbRRUy LPNK;ouPOllPCIPP diff --git a/examples/runtime/shaders/dx9/vs_stencil_color_texture.bin b/examples/runtime/shaders/dx9/vs_stencil_color_texture.bin deleted file mode 100644 index 0f8b5da33b8bd6902a44abbad0f61c92b35f8bd5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmZ8cu}*|Q5Ph&*VMSwU6g#gm5L;tZ8VWAC$Q_o%2u2KK4S3q}344EVwf+=^-vRdq zV@#agmzjBQW_C7Bq65(M@ztdTcazmRFRHXGK9-GsaV)^0dPom7jKg?}aCLKg#PpsJ zP9({(1(tL^VH47KO^E#)3&rE`NUzv?n_Xl+7Ug53TmAIro!!m7C{AK8d49-?#tU`* zT2>4K|2)9g$4K|2)9g$TzX3w0o%X%&z4_;V-MDoOuFv*gq)>hDjnn>M)Ey4yt^>HN1SQs)rmwE!TJ9Y{l@nkq+(5Rm`@O=w-6$ClOE&=mnMfo|U4NbsF zGl_|evx_~(s>Io|+V?x~ZM^N#yVxQqZEE6$OBQd^d4k diff --git a/examples/runtime/shaders/dx9/vs_terrain.bin b/examples/runtime/shaders/dx9/vs_terrain.bin deleted file mode 100644 index 8542fc840cddd259af37e690388dd0cd10c44229..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 343 zcmZ8cJ8r^25PkL)* z=fJ!%&}3#u^XARY+u3o@sepDoJsd2!n{cV8(PA7&yMCfS9Sd;SeP)I_=jZ$h?crPN zk>xu>IB7|ZJsEl_N`{e(=fsx^!JT7OX ihG9LqpL>S=&MqiFzx$sW?kpIG(fv3bgfHnl2|WeyhdU3Z@hF@O zqwu+x#1A%;HuK*CTFZJ_H{lP?&JP&AQzfTqB*q8uMsq>6s0tbbT9FY|c+xASifpYw zY>zea8QEHeJuPzV4gNF>PJ$LLquV5&#doQ9bbah~y8W)#AK#3^#Pj3nV>F@DZZ+HZ zx&j;*5-B1E`P?`VcY-! diff --git a/examples/runtime/shaders/dx9/vs_tree.bin b/examples/runtime/shaders/dx9/vs_tree.bin deleted file mode 100644 index 061b530e0a6045de19c4d581e881060f44138c16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 631 zcmZ9IzfQtX6vn^XKeUFSFJNLvSq#L)II1`>V1i;<(MXLLNC~K{cXz38(18ga!dG!% zad)PE=N4k)g#+jO&gpl)+g`V|2cGZo$-9N>Yk!;!;!$rH&m9Fg>;xs&nI_MUatuGU z*t9qKCaWK}!&HBgv zIkm6ThNqlNX-M tbEywxKB7#td2eb(M!%S;vR-5`J{DS-yc^L5mKylsth{4eSeoaY`~?hfdH?_b diff --git a/examples/runtime/shaders/dx9/vs_update.bin b/examples/runtime/shaders/dx9/vs_update.bin deleted file mode 100644 index f2abef754c2436b409bccfe28f05524eb4e2afa2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 319 zcmWFw_TXdyf_ynU8%75H()ir`l+>KC%+&ILqWmltMg|5JpsWaxW?=sJ|KEQ_2Imk* zCmA3&9Ed?;ASn=^VIl)V0FW{OVkRI4>2m;L5I{4Qff)!{fDoh?1j>rzjpGd%d^3}a z@{9A+N)$ALG!;C2f_)T%GZIr$ixiyma|<$afDA(eJwt}o@(?Q;7#R2`fY_`I3=Kfn zgV{jiK;jP&;_MHA^2|UnpqeKO7#Kn)0Nn;e{6KXeKEnhc-2f9~0*kEzivj%s()R!) X&kPg?x|fNOf&Br{oC*K`19bubIo?2X diff --git a/examples/runtime/shaders/dx9/vs_vectordisplay_fb.bin b/examples/runtime/shaders/dx9/vs_vectordisplay_fb.bin deleted file mode 100644 index 74a58a5affd6efc5b9eed93a8b1910eb9f7dc59d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 355 zcmZ8bJ8r^25PjZt3TS)*q&OWkkr7SG5E=?1Ask3)Aux&~TN{~tT1&aW<_4+ZQbytg zIRNI35mLm=j^@pqH?uPfhYir2@4uY`?<300GEQen{58(atLp$RyLZgchw4z>VDQv` zXt8`|2q!J6@dJ#R0)}G9+&x3=Vl6b?rOT|?=Q`>|0Unb@Zq{b??zbl$e>e(9e)uw9 z#<@Q**;|qlbc5S2w%7ck2^4^51#?Bg>uY>Ptp4%TlxICPH9l!{$*kGu?Ecrm)beIN mk9(ztWiHN~s<}pazl`T*lFU5q!6Q9b#;Y{>xXa9|=fI+Go>1F* zTX!*dxVk=M`b8J!@{k-qz$cFzy2~k%3h82xbm;LZ?kh!_sKU!H^l1a8eAPlh7~)yh#7$t7Tw;lw<8O0{2HmF-jRHnfmqizH_KP|ITyLcI`^ zvlNa+z6M*x!q@ZIV$9F6TLg0rubeRQfM`;S+7cESD;s5{u diff --git a/examples/runtime/shaders/dx9/vs_wf_wireframe.bin b/examples/runtime/shaders/dx9/vs_wf_wireframe.bin deleted file mode 100644 index dcc4697d674078f3dc788cc06a4d1fe77a0d6dad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 544 zcmY*VJ5Iwu5S{ghH8i;Z5?exp64B5?niN4o1R^?P5d%iCY}o|b{Yd@4yk{Bbi9r96V8~8jdOY-nq#|!TW~($3eJ|oEg+0(I9ma? zsOEn)2vMVlY<%3U{^M(%e|46{w$@8!SqfAIW?2{8W9}dLT{?-bvm{S$9@OsHo*E2C zLp8b!CSj)fNt{Mg1ikKlkIEg$+9ILxJO#&~(4rLsUoh^XN04k{(iUPDFM_&uY56AT zqQHIeceG=2zVZ@rjcpk0-C#I`=N4R-z-t}}{x*-)sDro7BXKTcZ64F7ZQ#tyx-j?b O)w33BMqX4E5&Z(blitSetup(_blitter); @@ -830,10 +828,10 @@ namespace bgfx Vertex vert[4] = { - { (xx )*fontWidth, (yy )*fontHeight, 0.0f, fg, bg, (ch )*8.0f*texelWidth - texelWidthHalf, utop }, - { (xx+1)*fontWidth, (yy )*fontHeight, 0.0f, fg, bg, (ch+1)*8.0f*texelWidth - texelWidthHalf, utop }, - { (xx+1)*fontWidth, (yy+1)*fontHeight, 0.0f, fg, bg, (ch+1)*8.0f*texelWidth - texelWidthHalf, ubottom }, - { (xx )*fontWidth, (yy+1)*fontHeight, 0.0f, fg, bg, (ch )*8.0f*texelWidth - texelWidthHalf, ubottom }, + { (xx )*fontWidth, (yy )*fontHeight, 0.0f, fg, bg, (ch )*8.0f*texelWidth, utop }, + { (xx+1)*fontWidth, (yy )*fontHeight, 0.0f, fg, bg, (ch+1)*8.0f*texelWidth, utop }, + { (xx+1)*fontWidth, (yy+1)*fontHeight, 0.0f, fg, bg, (ch+1)*8.0f*texelWidth, ubottom }, + { (xx )*fontWidth, (yy+1)*fontHeight, 0.0f, fg, bg, (ch )*8.0f*texelWidth, ubottom }, }; bx::memCopy(vertex, vert, sizeof(vert) ); @@ -2618,7 +2616,6 @@ namespace bgfx BGFX_RENDERER_CONTEXT(noop); BGFX_RENDERER_CONTEXT(agc); - BGFX_RENDERER_CONTEXT(d3d9); BGFX_RENDERER_CONTEXT(d3d11); BGFX_RENDERER_CONTEXT(d3d12); BGFX_RENDERER_CONTEXT(gnm); @@ -2642,7 +2639,6 @@ namespace bgfx { { noop::rendererCreate, noop::rendererDestroy, BGFX_RENDERER_NOOP_NAME, true }, // Noop { agc::rendererCreate, agc::rendererDestroy, BGFX_RENDERER_AGC_NAME, !!BGFX_CONFIG_RENDERER_AGC }, // GNM - { 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 { gnm::rendererCreate, gnm::rendererDestroy, BGFX_RENDERER_GNM_NAME, !!BGFX_CONFIG_RENDERER_GNM }, // GNM @@ -2715,7 +2711,6 @@ namespace bgfx else if (windowsVersionIs(Condition::GreaterEqual, 0x0601) ) { score += RendererType::Direct3D11 == renderer ? 20 : 0; - score += RendererType::Direct3D9 == renderer ? 10 : 0; score += RendererType::Direct3D12 == renderer ? -100 : 0; } else @@ -2730,7 +2725,6 @@ namespace bgfx score += RendererType::OpenGLES == renderer ? 30 : 0; score += RendererType::Direct3D12 == renderer ? 20 : 0; score += RendererType::Direct3D11 == renderer ? 10 : 0; - score += RendererType::Direct3D9 == renderer ? 5 : 0; } else if (BX_ENABLED(BX_PLATFORM_OSX) ) { diff --git a/src/makefile b/src/makefile index d8380dc7fbb..c8e22b8c39e 100644 --- a/src/makefile +++ b/src/makefile @@ -28,12 +28,10 @@ define shader-embedded $(SILENT) $(SHADERC) --type $(1) --platform linux -p 120 -f $(<) -o "$(SHADER_TMP)" --bin2c $(basename $(<))_glsl @cat "$(SHADER_TMP)" > $(@) -$(SILENT) $(SHADERC) --type $(1) --platform android -f $(<) -o "$(SHADER_TMP)" --bin2c $(basename $(<))_essl - -@cat "$(SHADER_TMP)" >> $(@) - -$(SILENT) $(SHADERC) --type $(1) --platform linux -p spirv -f $(<) -o "$(SHADER_TMP)" --bin2c $(basename $(<))_spv -@cat "$(SHADER_TMP)" >> $(@) - -$(SILENT) $(SHADERC) --type $(1) --platform windows -p $(2) -O 3 -f $(<) -o "$(SHADER_TMP)" --bin2c $(basename $(<))_dx9 + -$(SILENT) $(SHADERC) --type $(1) --platform linux -p spirv -f $(<) -o "$(SHADER_TMP)" --bin2c $(basename $(<))_spv -@cat "$(SHADER_TMP)" >> $(@) - -$(SILENT) $(SHADERC) --type $(1) --platform windows -p $(3) -O 3 -f $(<) -o "$(SHADER_TMP)" --bin2c $(basename $(<))_dx11 + -$(SILENT) $(SHADERC) --type $(1) --platform windows -p $(2) -O 3 -f $(<) -o "$(SHADER_TMP)" --bin2c $(basename $(<))_dx11 -@cat "$(SHADER_TMP)" >> $(@) -$(SILENT) $(SHADERC) --type $(1) --platform ios -p metal -O 3 -f $(<) -o "$(SHADER_TMP)" --bin2c $(basename $(<))_mtl -@cat "$(SHADER_TMP)" >> $(@) @@ -42,37 +40,37 @@ define shader-embedded endef vs_debugfont.bin.h : vs_debugfont.sc - $(call shader-embedded, v, vs_3_0, vs_4_0) + $(call shader-embedded, v, vs_4_0) fs_debugfont.bin.h : fs_debugfont.sc - $(call shader-embedded, f, ps_3_0, ps_4_0) + $(call shader-embedded, f, ps_4_0) vs_clear.bin.h : vs_clear.sc - $(call shader-embedded, v, vs_3_0, vs_4_0) + $(call shader-embedded, v, vs_4_0) fs_clear0.bin.h : fs_clear0.sc - $(call shader-embedded, f, ps_3_0, ps_4_0) + $(call shader-embedded, f, ps_4_0) fs_clear1.bin.h : fs_clear1.sc - $(call shader-embedded, f, ps_3_0, ps_4_0) + $(call shader-embedded, f, ps_4_0) fs_clear2.bin.h : fs_clear2.sc - $(call shader-embedded, f, ps_3_0, ps_4_0) + $(call shader-embedded, f, ps_4_0) fs_clear3.bin.h : fs_clear3.sc - $(call shader-embedded, f, ps_3_0, ps_4_0) + $(call shader-embedded, f, ps_4_0) fs_clear4.bin.h : fs_clear4.sc - $(call shader-embedded, f, ps_3_0, ps_4_0) + $(call shader-embedded, f, ps_4_0) fs_clear5.bin.h : fs_clear5.sc - $(call shader-embedded, f, ps_3_0, ps_4_0) + $(call shader-embedded, f, ps_4_0) fs_clear6.bin.h : fs_clear6.sc - $(call shader-embedded, f, ps_3_0, ps_4_0) + $(call shader-embedded, f, ps_4_0) fs_clear7.bin.h : fs_clear7.sc - $(call shader-embedded, f, ps_3_0, ps_4_0) + $(call shader-embedded, f, ps_4_0) .PHONY: clean clean: diff --git a/src/renderer_d3d9.cpp b/src/renderer_d3d9.cpp deleted file mode 100644 index 915406b623e..00000000000 --- a/src/renderer_d3d9.cpp +++ /dev/null @@ -1,4606 +0,0 @@ -/* - * Copyright 2011-2023 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE - */ - -#include "bgfx_p.h" - -#if BGFX_CONFIG_RENDERER_DIRECT3D9 -# include "renderer_d3d9.h" -# include - -namespace bgfx { namespace d3d9 -{ - static wchar_t s_viewNameW[BGFX_CONFIG_MAX_VIEWS][BGFX_CONFIG_MAX_VIEW_NAME]; - static char s_viewName [BGFX_CONFIG_MAX_VIEWS][BGFX_CONFIG_MAX_VIEW_NAME]; - - struct PrimInfo - { - D3DPRIMITIVETYPE m_type; - uint32_t m_min; - uint32_t m_div; - uint32_t m_sub; - }; - - static const PrimInfo s_primInfo[] = - { - { D3DPT_TRIANGLELIST, 3, 3, 0 }, - { D3DPT_TRIANGLESTRIP, 3, 1, 2 }, - { D3DPT_LINELIST, 2, 2, 0 }, - { D3DPT_LINESTRIP, 2, 1, 1 }, - { D3DPT_POINTLIST, 1, 1, 0 }, - { D3DPRIMITIVETYPE(0), 0, 0, 0 }, - }; - BX_STATIC_ASSERT(Topology::Count == BX_COUNTOF(s_primInfo)-1); - - static const D3DMULTISAMPLE_TYPE s_checkMsaa[] = - { - D3DMULTISAMPLE_NONE, - D3DMULTISAMPLE_2_SAMPLES, - D3DMULTISAMPLE_4_SAMPLES, - D3DMULTISAMPLE_8_SAMPLES, - D3DMULTISAMPLE_16_SAMPLES, - }; - - static Msaa s_msaa[] = - { - { D3DMULTISAMPLE_NONE, 0 }, - { D3DMULTISAMPLE_2_SAMPLES, 0 }, - { D3DMULTISAMPLE_4_SAMPLES, 0 }, - { D3DMULTISAMPLE_8_SAMPLES, 0 }, - { D3DMULTISAMPLE_16_SAMPLES, 0 }, - }; - - struct Blend - { - D3DBLEND m_src; - D3DBLEND m_dst; - bool m_factor; - }; - - static const Blend s_blendFactor[] = - { - { (D3DBLEND)0, (D3DBLEND)0, false }, // ignored - { D3DBLEND_ZERO, D3DBLEND_ZERO, false }, // ZERO - { D3DBLEND_ONE, D3DBLEND_ONE, false }, // ONE - { D3DBLEND_SRCCOLOR, D3DBLEND_SRCCOLOR, false }, // SRC_COLOR - { D3DBLEND_INVSRCCOLOR, D3DBLEND_INVSRCCOLOR, false }, // INV_SRC_COLOR - { D3DBLEND_SRCALPHA, D3DBLEND_SRCALPHA, false }, // SRC_ALPHA - { D3DBLEND_INVSRCALPHA, D3DBLEND_INVSRCALPHA, false }, // INV_SRC_ALPHA - { D3DBLEND_DESTALPHA, D3DBLEND_DESTALPHA, false }, // DST_ALPHA - { D3DBLEND_INVDESTALPHA, D3DBLEND_INVDESTALPHA, false }, // INV_DST_ALPHA - { D3DBLEND_DESTCOLOR, D3DBLEND_DESTCOLOR, false }, // DST_COLOR - { D3DBLEND_INVDESTCOLOR, D3DBLEND_INVDESTCOLOR, false }, // INV_DST_COLOR - { D3DBLEND_SRCALPHASAT, D3DBLEND_ONE, false }, // SRC_ALPHA_SAT - { D3DBLEND_BLENDFACTOR, D3DBLEND_BLENDFACTOR, true }, // FACTOR - { D3DBLEND_INVBLENDFACTOR, D3DBLEND_INVBLENDFACTOR, true }, // INV_FACTOR - }; - - static const D3DBLENDOP s_blendEquation[] = - { - D3DBLENDOP_ADD, - D3DBLENDOP_SUBTRACT, - D3DBLENDOP_REVSUBTRACT, - D3DBLENDOP_MIN, - D3DBLENDOP_MAX, - }; - - static const D3DCMPFUNC s_cmpFunc[] = - { - (D3DCMPFUNC)0, // ignored - D3DCMP_LESS, - D3DCMP_LESSEQUAL, - D3DCMP_EQUAL, - D3DCMP_GREATEREQUAL, - D3DCMP_GREATER, - D3DCMP_NOTEQUAL, - D3DCMP_NEVER, - D3DCMP_ALWAYS, - }; - - static const D3DSTENCILOP s_stencilOp[] = - { - D3DSTENCILOP_ZERO, - D3DSTENCILOP_KEEP, - D3DSTENCILOP_REPLACE, - D3DSTENCILOP_INCR, - D3DSTENCILOP_INCRSAT, - D3DSTENCILOP_DECR, - D3DSTENCILOP_DECRSAT, - D3DSTENCILOP_INVERT, - }; - - static const D3DRENDERSTATETYPE s_stencilFuncRs[] = - { - D3DRS_STENCILFUNC, - D3DRS_CCW_STENCILFUNC, - }; - - static const D3DRENDERSTATETYPE s_stencilFailRs[] = - { - D3DRS_STENCILFAIL, - D3DRS_CCW_STENCILFAIL, - }; - - static const D3DRENDERSTATETYPE s_stencilZFailRs[] = - { - D3DRS_STENCILZFAIL, - D3DRS_CCW_STENCILZFAIL, - }; - - static const D3DRENDERSTATETYPE s_stencilZPassRs[] = - { - D3DRS_STENCILPASS, - D3DRS_CCW_STENCILPASS, - }; - - static const D3DCULL s_cullMode[] = - { - D3DCULL_NONE, - D3DCULL_CW, - D3DCULL_CCW, - }; - - static const D3DTEXTUREADDRESS s_textureAddress[] = - { - D3DTADDRESS_WRAP, - D3DTADDRESS_MIRROR, - D3DTADDRESS_CLAMP, - D3DTADDRESS_BORDER, - }; - - static const D3DTEXTUREFILTERTYPE s_textureFilter[] = - { - D3DTEXF_LINEAR, - D3DTEXF_POINT, - D3DTEXF_ANISOTROPIC, - }; - - struct TextureFormatInfo - { - D3DFORMAT m_fmt; - }; - - static TextureFormatInfo s_textureFormat[] = - { - { D3DFMT_DXT1 }, // BC1 - { D3DFMT_DXT3 }, // BC2 - { D3DFMT_DXT5 }, // BC3 - { D3DFMT_UNKNOWN }, // BC4 - { D3DFMT_UNKNOWN }, // BC5 - { D3DFMT_UNKNOWN }, // BC6H - { D3DFMT_UNKNOWN }, // BC7 - { D3DFMT_UNKNOWN }, // ETC1 - { D3DFMT_UNKNOWN }, // ETC2 - { D3DFMT_UNKNOWN }, // ETC2A - { D3DFMT_UNKNOWN }, // ETC2A1 - { D3DFMT_UNKNOWN }, // PTC12 - { D3DFMT_UNKNOWN }, // PTC14 - { D3DFMT_UNKNOWN }, // PTC12A - { D3DFMT_UNKNOWN }, // PTC14A - { D3DFMT_UNKNOWN }, // PTC22 - { D3DFMT_UNKNOWN }, // PTC24 - { D3DFMT_UNKNOWN }, // ATC, - { D3DFMT_UNKNOWN }, // ATCE, - { D3DFMT_UNKNOWN }, // ATCI, - { D3DFMT_UNKNOWN }, // ASTC4x4 - { D3DFMT_UNKNOWN }, // ASTC5x4 - { D3DFMT_UNKNOWN }, // ASTC5x5 - { D3DFMT_UNKNOWN }, // ASTC6x5 - { D3DFMT_UNKNOWN }, // ASTC6x6 - { D3DFMT_UNKNOWN }, // ASTC8x5 - { D3DFMT_UNKNOWN }, // ASTC8x6 - { D3DFMT_UNKNOWN }, // ASTC8x8 - { D3DFMT_UNKNOWN }, // ASTC10x5 - { D3DFMT_UNKNOWN }, // ASTC10x6 - { D3DFMT_UNKNOWN }, // ASTC10x8 - { D3DFMT_UNKNOWN }, // ASTC10x10 - { D3DFMT_UNKNOWN }, // ASTC12x10 - { D3DFMT_UNKNOWN }, // ASTC12x12 - { D3DFMT_UNKNOWN }, // Unknown - { D3DFMT_A1 }, // R1 - { D3DFMT_A8 }, // A8 - { D3DFMT_L8 }, // R8 - { D3DFMT_UNKNOWN }, // R8I - { D3DFMT_UNKNOWN }, // R8U - { D3DFMT_UNKNOWN }, // R8S - { D3DFMT_L16 }, // R16 - { D3DFMT_UNKNOWN }, // R16I - { D3DFMT_UNKNOWN }, // R16U - { D3DFMT_R16F }, // R16F - { D3DFMT_UNKNOWN }, // R16S - { D3DFMT_UNKNOWN }, // R32I - { D3DFMT_UNKNOWN }, // R32U - { D3DFMT_R32F }, // R32F - { D3DFMT_A8L8 }, // RG8 - { D3DFMT_UNKNOWN }, // RG8I - { D3DFMT_UNKNOWN }, // RG8U - { D3DFMT_UNKNOWN }, // RG8S - { D3DFMT_G16R16 }, // RG16 - { D3DFMT_UNKNOWN }, // RG16I - { D3DFMT_UNKNOWN }, // RG16U - { D3DFMT_G16R16F }, // RG16F - { D3DFMT_UNKNOWN }, // RG16S - { D3DFMT_UNKNOWN }, // RG32I - { D3DFMT_UNKNOWN }, // RG32U - { D3DFMT_G32R32F }, // RG32F - { D3DFMT_UNKNOWN }, // RGB8 - { D3DFMT_UNKNOWN }, // RGB8I - { D3DFMT_UNKNOWN }, // RGB8U - { D3DFMT_UNKNOWN }, // RGB8S - { D3DFMT_UNKNOWN }, // RGB9E5F - { D3DFMT_A8R8G8B8 }, // BGRA8 - { D3DFMT_UNKNOWN }, // RGBA8 - { D3DFMT_UNKNOWN }, // RGBA8I - { D3DFMT_UNKNOWN }, // RGBA8U - { D3DFMT_UNKNOWN }, // RGBA8S - { D3DFMT_A16B16G16R16 }, // RGBA16 - { D3DFMT_UNKNOWN }, // RGBA16I - { D3DFMT_UNKNOWN }, // RGBA16U - { D3DFMT_A16B16G16R16F }, // RGBA16F - { D3DFMT_UNKNOWN }, // RGBA16S - { D3DFMT_UNKNOWN }, // RGBA32I - { D3DFMT_UNKNOWN }, // RGBA32U - { D3DFMT_A32B32G32R32F }, // RGBA32F - { D3DFMT_R5G6B5 }, // B5G6R5 - { D3DFMT_R5G6B5 }, // R5G6B5 - { D3DFMT_A4R4G4B4 }, // BGRA4 - { D3DFMT_A4R4G4B4 }, // RGBA4 - { D3DFMT_A1R5G5B5 }, // BGR5A1 - { D3DFMT_A1R5G5B5 }, // RGB5A1 - { D3DFMT_A2B10G10R10 }, // RGB10A2 - { D3DFMT_UNKNOWN }, // RG11B10F - { D3DFMT_UNKNOWN }, // UnknownDepth - { D3DFMT_D16 }, // D16 - { D3DFMT_D24X8 }, // D24 - { D3DFMT_D24S8 }, // D24S8 - { D3DFMT_D32 }, // D32 - { D3DFMT_DF16 }, // D16F - { D3DFMT_DF24 }, // D24F - { D3DFMT_D32F_LOCKABLE }, // D32F - { D3DFMT_S8_LOCKABLE }, // D0S8 - }; - BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_textureFormat) ); - - static ExtendedFormat s_extendedFormats[ExtendedFormat::Count] = - { - { D3DFMT_ATI1, 0, D3DRTYPE_TEXTURE, false }, - { D3DFMT_ATI2, 0, D3DRTYPE_TEXTURE, false }, - { D3DFMT_DF16, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, false }, - { D3DFMT_DF24, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, false }, - { D3DFMT_INST, 0, D3DRTYPE_SURFACE, false }, - { D3DFMT_INTZ, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, false }, - { D3DFMT_NULL, D3DUSAGE_RENDERTARGET, D3DRTYPE_SURFACE, false }, - { D3DFMT_RESZ, D3DUSAGE_RENDERTARGET, D3DRTYPE_SURFACE, false }, - { D3DFMT_RAWZ, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, false }, - { D3DFMT_ATOC, 0, D3DRTYPE_SURFACE, false }, - }; - - 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; - typedef IDirect3D9* (WINAPI *Direct3DCreate9Fn)(UINT SDKVersion); - static Direct3DCreate9Fn Direct3DCreate9; - static PFN_D3DPERF_SET_MARKER D3DPERF_SetMarker; - static PFN_D3DPERF_BEGIN_EVENT D3DPERF_BeginEvent; - static PFN_D3DPERF_END_EVENT D3DPERF_EndEvent; - - static const D3DVERTEXELEMENT9 s_attrib[] = - { - { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_NORMAL, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TANGENT, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BINORMAL, 0 }, - { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0 }, - { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 1 }, - { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 2 }, - { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 3 }, - { 0, 0, D3DDECLTYPE_UBYTE4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BLENDINDICES, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_BLENDWEIGHT, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 1 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 2 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 3 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 4 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 5 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 6 }, - { 0, 0, D3DDECLTYPE_FLOAT2, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 7 }, - D3DDECL_END() - }; - BX_STATIC_ASSERT(Attrib::Count == BX_COUNTOF(s_attrib)-1); - - static const uint8_t s_attribType[][4][2] = - { - { // Uint8 - { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, - { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, - { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, - { D3DDECLTYPE_UBYTE4, D3DDECLTYPE_UBYTE4N }, - }, - { // Uint10 - { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, - { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, - { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, - { D3DDECLTYPE_UDEC3, D3DDECLTYPE_DEC3N }, - }, - { // Int16 - { D3DDECLTYPE_SHORT2, D3DDECLTYPE_SHORT2N }, - { D3DDECLTYPE_SHORT2, D3DDECLTYPE_SHORT2N }, - { D3DDECLTYPE_SHORT4, D3DDECLTYPE_SHORT4N }, - { D3DDECLTYPE_SHORT4, D3DDECLTYPE_SHORT4N }, - }, - { // Half - { D3DDECLTYPE_FLOAT16_2, D3DDECLTYPE_FLOAT16_2 }, - { D3DDECLTYPE_FLOAT16_2, D3DDECLTYPE_FLOAT16_2 }, - { D3DDECLTYPE_FLOAT16_4, D3DDECLTYPE_FLOAT16_4 }, - { D3DDECLTYPE_FLOAT16_4, D3DDECLTYPE_FLOAT16_4 }, - }, - { // Float - { D3DDECLTYPE_FLOAT1, D3DDECLTYPE_FLOAT1 }, - { D3DDECLTYPE_FLOAT2, D3DDECLTYPE_FLOAT2 }, - { D3DDECLTYPE_FLOAT3, D3DDECLTYPE_FLOAT3 }, - { D3DDECLTYPE_FLOAT4, D3DDECLTYPE_FLOAT4 }, - }, - }; - BX_STATIC_ASSERT(AttribType::Count == BX_COUNTOF(s_attribType) ); - - static D3DVERTEXELEMENT9* fillVertexLayout(uint8_t _stream, D3DVERTEXELEMENT9* _out, const VertexLayout& _layout) - { - D3DVERTEXELEMENT9* elem = _out; - - for (uint32_t attr = 0; attr < Attrib::Count; ++attr) - { - if (UINT16_MAX != _layout.m_attributes[attr]) - { - uint8_t num; - AttribType::Enum type; - bool normalized; - bool asInt; - _layout.decode(Attrib::Enum(attr), num, type, normalized, asInt); - - bx::memCopy(elem, &s_attrib[attr], sizeof(D3DVERTEXELEMENT9) ); - - elem->Stream = _stream; - elem->Type = s_attribType[type][num-1][normalized]; - elem->Offset = _layout.m_offset[attr]; - ++elem; - } - } - - return elem; - } - - inline bool isLost(HRESULT _hr) - { - return false - || _hr == D3DERR_DEVICELOST - || _hr == D3DERR_DRIVERINTERNALERROR -#if !defined(D3D_DISABLE_9EX) - || _hr == D3DERR_DEVICEHUNG - || _hr == D3DERR_DEVICEREMOVED -#endif // !defined(D3D_DISABLE_9EX) - ; - } - - inline bool useD3D9Pitch(bimg::TextureFormat::Enum _format) - { - // Reference(s): - // - For BC4 and B5 in DX9 LockRect returns wrong number of - // bytes. If actual mip size is used it causes memory corruption. - // https://web.archive.org/web/20190207230133/http://www.aras-p.info/texts/D3D9GPUHacks.html - return true - && _format != bimg::TextureFormat::BC4 - && _format != bimg::TextureFormat::BC5 - ; - } - - static inline uint32_t calcRowPitch(const bimg::ImageBlockInfo& _blockInfo, uint8_t _lod, uint32_t _width) - { - const uint8_t blockWidth = _blockInfo.blockWidth; - const uint8_t blockHeight = _blockInfo.blockHeight; - const uint8_t minBlockX = _blockInfo.minBlockX; - const uint8_t bitsPerPixel = _blockInfo.bitsPerPixel; - - // Calculate the row pitch - const uint32_t minBlkWidth = minBlockX; - const uint32_t lodBlkWidth = (((_width >> _lod) + blockWidth - 1) / blockWidth); - const uint32_t rowBlkWidth = bx::max(minBlkWidth, lodBlkWidth); - const uint32_t pixBlkWidth = rowBlkWidth * blockWidth * blockHeight; - const uint32_t rowPitch = pixBlkWidth * bitsPerPixel / 8u; - - return rowPitch; - } - - struct RendererContextD3D9 : public RendererContextI - { - RendererContextD3D9() - : m_d3d9(NULL) - , m_device(NULL) - , m_flushQuery(NULL) - , m_swapChain(NULL) - , m_captureTexture(NULL) - , m_captureSurface(NULL) - , m_captureResolve(NULL) - , m_maxAnisotropy(1) - , m_initialized(false) - , m_amd(false) - , m_nvidia(false) - , m_atocSupport(false) - , m_instancingSupport(false) - , m_occlusionQuerySupport(false) - , m_timerQuerySupport(false) - , m_rtMsaa(false) - { - } - - ~RendererContextD3D9() - { - } - - bool init(const Init& _init) - { - struct ErrorState - { - enum Enum - { - Default, - LoadedD3D9, - CreatedD3D9, - CreatedDevice, - }; - }; - - ErrorState::Enum errorState = ErrorState::Default; - - m_fbh.idx = kInvalidHandle; - bx::memSet(m_uniforms, 0, sizeof(m_uniforms) ); - bx::memSet(&m_resolution, 0, sizeof(m_resolution) ); - - D3DFORMAT adapterFormat = D3DFMT_X8R8G8B8; - - // Reference(s): - // - https://web.archive.org/web/20190207230309/https://docs.microsoft.com/en-us/windows/desktop/direct3d9/d3dpresent-parameters - bx::memSet(&m_params, 0, sizeof(m_params) ); - m_params.BackBufferWidth = _init.resolution.width; - m_params.BackBufferHeight = _init.resolution.height; - m_params.BackBufferFormat = adapterFormat; - m_params.BackBufferCount = bx::clamp(_init.resolution.numBackBuffers, 2, BGFX_CONFIG_MAX_BACK_BUFFERS); - m_params.MultiSampleType = D3DMULTISAMPLE_NONE; - m_params.MultiSampleQuality = 0; - m_params.EnableAutoDepthStencil = TRUE; - m_params.AutoDepthStencilFormat = D3DFMT_D24S8; - m_params.Flags = D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL; - - m_params.FullScreen_RefreshRateInHz = 0; - m_params.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; - m_params.SwapEffect = D3DSWAPEFFECT_DISCARD; - m_params.hDeviceWindow = NULL; - m_params.Windowed = true; - m_params.BackBufferWidth = _init.resolution.width; - m_params.BackBufferHeight = _init.resolution.height; - - const char* d3d9DllName = -#if BX_PLATFORM_LINUX - "d3d9.so" -#else - "d3d9.dll" -#endif // BX_PLATFORM_LINUX - ; - - m_d3d9Dll = bx::dlopen(d3d9DllName); - - if (NULL == m_d3d9Dll) - { - BX_TRACE("Init error: Failed to load %s.", d3d9DllName); - goto error; - } - - errorState = ErrorState::LoadedD3D9; - - m_nvapi.init(); - - if (BX_ENABLED(BGFX_CONFIG_DEBUG_ANNOTATION) ) - { - D3DPERF_SetMarker = (PFN_D3DPERF_SET_MARKER )bx::dlsym(m_d3d9Dll, "D3DPERF_SetMarker"); - D3DPERF_BeginEvent = (PFN_D3DPERF_BEGIN_EVENT)bx::dlsym(m_d3d9Dll, "D3DPERF_BeginEvent"); - D3DPERF_EndEvent = (PFN_D3DPERF_END_EVENT )bx::dlsym(m_d3d9Dll, "D3DPERF_EndEvent"); - - if (NULL == D3DPERF_SetMarker - || NULL == D3DPERF_BeginEvent - || NULL == D3DPERF_EndEvent) - { - BX_TRACE("Failed to initialize PIX events."); - - D3DPERF_SetMarker = NULL; - D3DPERF_BeginEvent = NULL; - D3DPERF_EndEvent = NULL; - } - } - - m_d3d9ex = NULL; - m_deviceEx = NULL; - - Direct3DCreate9Ex = (Direct3DCreate9ExFn)bx::dlsym(m_d3d9Dll, "Direct3DCreate9Ex"); - if (BX_ENABLED(BGFX_CONFIG_RENDERER_DIRECT3D9EX) - && NULL != Direct3DCreate9Ex) - { - Direct3DCreate9Ex(D3D_SDK_VERSION, &m_d3d9ex); - if (NULL != m_d3d9ex) - { - HRESULT hr = m_d3d9ex->QueryInterface(IID_IDirect3D9, (void**)&m_d3d9); - if (FAILED(hr) ) - { - BX_TRACE("Failed to query D3D9 interface 0x%08x.", hr); - DX_RELEASE(m_d3d9ex, 0); - } - else - { - m_pool = D3DPOOL_DEFAULT; - } - } - } - - if (NULL == m_d3d9) - { - Direct3DCreate9 = (Direct3DCreate9Fn)bx::dlsym(m_d3d9Dll, "Direct3DCreate9"); - - if (NULL == Direct3DCreate9) - { - BX_TRACE("Init error: Function Direct3DCreate9 not found."); - goto error; - } - - m_d3d9 = Direct3DCreate9(D3D_SDK_VERSION); - m_pool = D3DPOOL_MANAGED; - } - - if (NULL == m_d3d9) - { - BX_TRACE("Init error: Unable to create Direct3D."); - goto error; - } - - errorState = ErrorState::CreatedD3D9; - - { - m_adapter = D3DADAPTER_DEFAULT; - m_deviceType = BGFX_PCI_ID_SOFTWARE_RASTERIZER == g_caps.vendorId - ? D3DDEVTYPE_REF - : D3DDEVTYPE_HAL - ; - - uint8_t numGPUs = uint8_t(bx::uint32_min(BX_COUNTOF(g_caps.gpu), m_d3d9->GetAdapterCount() ) ); - for (uint32_t ii = 0; ii < numGPUs; ++ii) - { - D3DADAPTER_IDENTIFIER9 desc; - HRESULT hr = m_d3d9->GetAdapterIdentifier(ii, 0, &desc); - if (SUCCEEDED(hr) ) - { - BX_TRACE("Adapter #%d", ii); - BX_TRACE("\tDriver: %s", desc.Driver); - BX_TRACE("\tDescription: %s", desc.Description); - BX_TRACE("\tDeviceName: %s", desc.DeviceName); - BX_TRACE("\tVendorId: 0x%08x, DeviceId: 0x%08x, SubSysId: 0x%08x, Revision: 0x%08x" - , desc.VendorId - , desc.DeviceId - , desc.SubSysId - , desc.Revision - ); - - g_caps.gpu[ii].vendorId = (uint16_t)desc.VendorId; - g_caps.gpu[ii].deviceId = (uint16_t)desc.DeviceId; - - if (D3DADAPTER_DEFAULT == m_adapter) - { - if ( (BGFX_PCI_ID_NONE != g_caps.vendorId || 0 != g_caps.deviceId) - && (BGFX_PCI_ID_NONE == g_caps.vendorId || desc.VendorId == g_caps.vendorId) - && ( 0 == g_caps.deviceId || desc.DeviceId == g_caps.deviceId) ) - { - m_adapter = ii; - } - - if (BX_ENABLED(BGFX_CONFIG_DEBUG_PERFHUD) - && !bx::strFind(desc.Description, "PerfHUD").isEmpty() ) - { - m_adapter = ii; - m_deviceType = D3DDEVTYPE_REF; - } - } - } - } - - DX_CHECK(m_d3d9->GetAdapterIdentifier(m_adapter, 0, &m_identifier) ); - m_amd = m_identifier.VendorId == BGFX_PCI_ID_AMD; - m_nvidia = m_identifier.VendorId == BGFX_PCI_ID_NVIDIA; - g_caps.vendorId = 0 == m_identifier.VendorId - ? BGFX_PCI_ID_SOFTWARE_RASTERIZER - : (uint16_t)m_identifier.VendorId - ; - g_caps.deviceId = (uint16_t)m_identifier.DeviceId; - - uint32_t behaviorFlags[] = - { - D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE | D3DCREATE_PUREDEVICE, - D3DCREATE_MIXED_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, - D3DCREATE_SOFTWARE_VERTEXPROCESSING | D3DCREATE_FPU_PRESERVE, - }; - - for (uint32_t ii = 0; ii < BX_COUNTOF(behaviorFlags) && NULL == m_device; ++ii) - { - 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 - ) ); - } - } - } - - if (NULL == m_device) - { - BX_TRACE("Init error: Unable to create Direct3D9 device."); - goto error; - } - - errorState = ErrorState::CreatedDevice; - - m_numWindows = 1; - - if (NULL != m_d3d9ex) - { - DX_CHECK(m_device->QueryInterface(IID_IDirect3DDevice9Ex, (void**)&m_deviceEx) ); - } - - { - IDirect3DQuery9* timerQueryTest[3] = {}; - m_timerQuerySupport = true - && SUCCEEDED(m_device->CreateQuery(D3DQUERYTYPE_TIMESTAMPDISJOINT, &timerQueryTest[0]) ) - && SUCCEEDED(m_device->CreateQuery(D3DQUERYTYPE_TIMESTAMP, &timerQueryTest[1]) ) - && SUCCEEDED(m_device->CreateQuery(D3DQUERYTYPE_TIMESTAMPFREQ, &timerQueryTest[2]) ) - ; - DX_RELEASE(timerQueryTest[0], 0); - DX_RELEASE(timerQueryTest[1], 0); - DX_RELEASE(timerQueryTest[2], 0); - } - - { - IDirect3DQuery9* occlusionQueryTest; - m_occlusionQuerySupport = true - && SUCCEEDED(m_device->CreateQuery(D3DQUERYTYPE_OCCLUSION, &occlusionQueryTest) ) - ; - DX_RELEASE(occlusionQueryTest, 0); - } - - DX_CHECK(m_device->GetDeviceCaps(&m_caps) ); - - // For shit GPUs that can create DX9 device but can't do simple stuff. GTFO! - BX_WARN( (D3DPTEXTURECAPS_SQUAREONLY & m_caps.TextureCaps) == 0, "D3DPTEXTURECAPS_SQUAREONLY"); - BX_WARN( (D3DPTEXTURECAPS_MIPMAP & m_caps.TextureCaps) == D3DPTEXTURECAPS_MIPMAP, "D3DPTEXTURECAPS_MIPMAP"); - BX_WARN( (D3DPTEXTURECAPS_ALPHA & m_caps.TextureCaps) == D3DPTEXTURECAPS_ALPHA, "D3DPTEXTURECAPS_ALPHA"); - BX_WARN(m_caps.VertexShaderVersion >= D3DVS_VERSION(2, 0) && m_caps.PixelShaderVersion >= D3DPS_VERSION(2, 1) - , "Shader Model Version (vs: %x, ps: %x)." - , m_caps.VertexShaderVersion - , m_caps.PixelShaderVersion - ); - - if ( (D3DPTEXTURECAPS_SQUAREONLY & m_caps.TextureCaps) != 0 - || (D3DPTEXTURECAPS_MIPMAP & m_caps.TextureCaps) != D3DPTEXTURECAPS_MIPMAP - || (D3DPTEXTURECAPS_ALPHA & m_caps.TextureCaps) != D3DPTEXTURECAPS_ALPHA - || !(m_caps.VertexShaderVersion >= D3DVS_VERSION(2, 0) && m_caps.PixelShaderVersion >= D3DPS_VERSION(2, 1) ) ) - { - BX_TRACE("Init error: Min spec not satisfied."); - goto error; - } - - BX_TRACE("Max vertex shader 3.0 instr. slots: %d", m_caps.MaxVertexShader30InstructionSlots); - BX_TRACE("Max vertex shader constants: %d", m_caps.MaxVertexShaderConst); - BX_TRACE("Max fragment shader 2.0 instr. slots: %d", m_caps.PS20Caps.NumInstructionSlots); - BX_TRACE("Max fragment shader 3.0 instr. slots: %d", m_caps.MaxPixelShader30InstructionSlots); - BX_TRACE("Num simultaneous render targets: %d", m_caps.NumSimultaneousRTs); - BX_TRACE("Max vertex index: %d", m_caps.MaxVertexIndex); - BX_TRACE("Max streams: %d", m_caps.MaxStreams); - - 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 - | ( (m_caps.DevCaps2 & D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES) ? BGFX_CAPS_TEXTURE_BLIT : 0) - | BGFX_CAPS_TEXTURE_READ_BACK - | (m_occlusionQuerySupport ? BGFX_CAPS_OCCLUSION_QUERY : 0) - | ((m_caps.MaxVertexIndex > UINT16_MAX) ? BGFX_CAPS_INDEX32 : 0) - ); - - m_caps.NumSimultaneousRTs = bx::uint32_min(m_caps.NumSimultaneousRTs, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS); - m_caps.MaxStreams = bx::uint32_min(m_caps.MaxStreams, BGFX_CONFIG_MAX_VERTEX_STREAMS); - m_caps.MaxAnisotropy = bx::uint32_max(m_caps.MaxAnisotropy, 1); - - g_caps.limits.maxTextureSize = uint16_t(bx::uint32_min(m_caps.MaxTextureWidth, m_caps.MaxTextureHeight) ); - g_caps.limits.maxFBAttachments = uint8_t(m_caps.NumSimultaneousRTs); - g_caps.limits.maxVertexStreams = uint8_t(m_caps.MaxStreams); - - if (BX_ENABLED(BGFX_CONFIG_RENDERER_USE_EXTENSIONS) ) - { - BX_TRACE("Extended formats:"); - for (uint32_t ii = 0; ii < ExtendedFormat::Count; ++ii) - { - ExtendedFormat& fmt = s_extendedFormats[ii]; - fmt.m_supported = SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter, m_deviceType, adapterFormat, fmt.m_usage, fmt.m_type, fmt.m_fmt) ); - const char* fourcc = (const char*)&fmt.m_fmt; - BX_TRACE("\t%2d: %c%c%c%c %s", ii, fourcc[0], fourcc[1], fourcc[2], fourcc[3], fmt.m_supported ? "supported" : ""); - BX_UNUSED(fourcc); - } - - m_instancingSupport = false - || s_extendedFormats[ExtendedFormat::Inst].m_supported - || (m_caps.VertexShaderVersion >= D3DVS_VERSION(3, 0) ) - ; - - m_atocSupport = false - || s_extendedFormats[ExtendedFormat::Atoc].m_supported - ; - - if (m_amd - && s_extendedFormats[ExtendedFormat::Inst].m_supported) - { // AMD only - m_device->SetRenderState(D3DRS_POINTSIZE, D3DFMT_INST); - } - - if (s_extendedFormats[ExtendedFormat::Intz].m_supported) - { - s_textureFormat[TextureFormat::D24].m_fmt = D3DFMT_INTZ; - s_textureFormat[TextureFormat::D32].m_fmt = D3DFMT_INTZ; - } - - s_textureFormat[TextureFormat::BC4].m_fmt = s_extendedFormats[ExtendedFormat::Ati1].m_supported ? D3DFMT_ATI1 : D3DFMT_UNKNOWN; - s_textureFormat[TextureFormat::BC5].m_fmt = s_extendedFormats[ExtendedFormat::Ati2].m_supported ? D3DFMT_ATI2 : D3DFMT_UNKNOWN; - - g_caps.supported |= m_instancingSupport ? BGFX_CAPS_INSTANCING : 0; - g_caps.supported |= m_atocSupport ? BGFX_CAPS_ALPHA_TO_COVERAGE : 0; - } - - for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii) - { - uint16_t support = BGFX_CAPS_FORMAT_TEXTURE_NONE; - - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , 0 - , D3DRTYPE_TEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_2D : BGFX_CAPS_FORMAT_TEXTURE_NONE; - - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , D3DUSAGE_QUERY_SRGBREAD - , D3DRTYPE_TEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_2D_SRGB : BGFX_CAPS_FORMAT_TEXTURE_NONE; - - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , 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 - , adapterFormat - , D3DUSAGE_QUERY_VERTEXTEXTURE - , D3DRTYPE_TEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_VERTEX : BGFX_CAPS_FORMAT_TEXTURE_NONE; - - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , bimg::isDepth(bimg::TextureFormat::Enum(ii) ) ? D3DUSAGE_DEPTHSTENCIL : D3DUSAGE_RENDERTARGET - , D3DRTYPE_TEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER : BGFX_CAPS_FORMAT_TEXTURE_NONE; - - support |= SUCCEEDED(m_d3d9->CheckDeviceMultiSampleType(m_adapter - , m_deviceType - , s_textureFormat[ii].m_fmt - , true - , D3DMULTISAMPLE_2_SAMPLES - , NULL - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_FRAMEBUFFER_MSAA : BGFX_CAPS_FORMAT_TEXTURE_NONE; - - support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter - , m_deviceType - , adapterFormat - , bimg::isDepth(bimg::TextureFormat::Enum(ii) ) ? D3DUSAGE_DEPTHSTENCIL : D3DUSAGE_RENDERTARGET - , D3DRTYPE_TEXTURE - , s_textureFormat[ii].m_fmt - ) ) ? BGFX_CAPS_FORMAT_TEXTURE_MIP_AUTOGEN : BGFX_CAPS_FORMAT_TEXTURE_NONE; - - g_caps.formats[ii] = support; - } - - m_fmtDepth = D3DFMT_D24S8; - - { - IDirect3DSwapChain9* swapChain; - DX_CHECK(m_device->GetSwapChain(0, &swapChain) ); - - // GPA increases swapchain ref count. - // - // This causes assert in debug. When debugger is present refcount - // checks are off. - setGraphicsDebuggerPresent(1 != getRefCount(swapChain) ); - - DX_RELEASE(swapChain, 0); - } - - // Init reserved part of view name. - for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_VIEWS; ++ii) - { - bx::snprintf(s_viewName[ii], BGFX_CONFIG_MAX_VIEW_NAME_RESERVED + 1, "%3d ", ii); - mbstowcs(s_viewNameW[ii], s_viewName[ii], 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; - - g_internalData.context = m_device; - return true; - - error: - switch (errorState) - { - case ErrorState::CreatedDevice: - if (NULL != m_d3d9ex) - { - DX_RELEASE(m_deviceEx, 1); - DX_RELEASE(m_device, 0); - } - else - { - DX_RELEASE(m_device, 0); - } - BX_FALLTHROUGH; - - case ErrorState::CreatedD3D9: - if (NULL != m_d3d9ex) - { - DX_RELEASE(m_d3d9, 1); - DX_RELEASE(m_d3d9ex, 0); - } - else - { - DX_RELEASE(m_d3d9, 0); - } - BX_FALLTHROUGH; - - case ErrorState::LoadedD3D9: - m_nvapi.shutdown(); - bx::dlclose(m_d3d9Dll); - BX_FALLTHROUGH; - - case ErrorState::Default: - break; - } - - return false; - } - - void shutdown() - { - preReset(); - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_indexBuffers); ++ii) - { - m_indexBuffers[ii].destroy(); - } - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_vertexBuffers); ++ii) - { - m_vertexBuffers[ii].destroy(); - } - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_shaders); ++ii) - { - m_shaders[ii].destroy(); - } - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_textures); ++ii) - { - m_textures[ii].destroy(); - } - - if (NULL != m_d3d9ex) - { - DX_RELEASE(m_deviceEx, 1); - DX_RELEASE(m_device, 0); - DX_RELEASE(m_d3d9, 1); - DX_RELEASE(m_d3d9ex, 0); - } - else - { - DX_RELEASE(m_device, 0); - DX_RELEASE(m_d3d9, 0); - } - - m_nvapi.shutdown(); - bx::dlclose(m_d3d9Dll); - - m_initialized = false; - } - - RendererType::Enum getRendererType() const override - { - return RendererType::Direct3D9; - } - - const char* getRendererName() const override - { - if (NULL != m_d3d9ex) - { - return BGFX_RENDERER_DIRECT3D9_NAME " Ex"; - } - - return BGFX_RENDERER_DIRECT3D9_NAME; - } - - void createIndexBuffer(IndexBufferHandle _handle, const Memory* _mem, uint16_t _flags) override - { - m_indexBuffers[_handle.idx].create(_mem->size, _mem->data, _flags); - } - - void destroyIndexBuffer(IndexBufferHandle _handle) override - { - m_indexBuffers[_handle.idx].destroy(); - } - - void createVertexLayout(VertexLayoutHandle _handle, const VertexLayout& _layout) override - { - VertexLayout& layout = m_vertexLayouts[_handle.idx]; - bx::memCopy(&layout, &_layout, sizeof(VertexLayout) ); - dump(layout); - } - - void destroyVertexLayout(VertexLayoutHandle /*_handle*/) override - { - } - - void createVertexBuffer(VertexBufferHandle _handle, const Memory* _mem, VertexLayoutHandle _layoutHandle, uint16_t /*_flags*/) override - { - m_vertexBuffers[_handle.idx].create(_mem->size, _mem->data, _layoutHandle); - } - - void destroyVertexBuffer(VertexBufferHandle _handle) override - { - m_vertexBuffers[_handle.idx].destroy(); - } - - void createDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _size, uint16_t _flags) override - { - m_indexBuffers[_handle.idx].create(_size, NULL, _flags); - } - - void updateDynamicIndexBuffer(IndexBufferHandle _handle, uint32_t _offset, uint32_t _size, const Memory* _mem) override - { - m_indexBuffers[_handle.idx].update(_offset, bx::uint32_min(_size, _mem->size), _mem->data); - } - - void destroyDynamicIndexBuffer(IndexBufferHandle _handle) override - { - m_indexBuffers[_handle.idx].destroy(); - } - - void createDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _size, uint16_t /*_flags*/) override - { - VertexLayoutHandle layoutHandle = BGFX_INVALID_HANDLE; - m_vertexBuffers[_handle.idx].create(_size, NULL, layoutHandle); - } - - void updateDynamicVertexBuffer(VertexBufferHandle _handle, uint32_t _offset, uint32_t _size, const Memory* _mem) override - { - m_vertexBuffers[_handle.idx].update(_offset, bx::uint32_min(_size, _mem->size), _mem->data); - } - - void destroyDynamicVertexBuffer(VertexBufferHandle _handle) override - { - m_vertexBuffers[_handle.idx].destroy(); - } - - void createShader(ShaderHandle _handle, const Memory* _mem) override - { - m_shaders[_handle.idx].create(_mem); - } - - void destroyShader(ShaderHandle _handle) override - { - m_shaders[_handle.idx].destroy(); - } - - void createProgram(ProgramHandle _handle, ShaderHandle _vsh, ShaderHandle _fsh) override - { - m_program[_handle.idx].create(&m_shaders[_vsh.idx], isValid(_fsh) ? &m_shaders[_fsh.idx] : NULL); - } - - void destroyProgram(ProgramHandle _handle) override - { - m_program[_handle.idx].destroy(); - } - - void* createTexture(TextureHandle _handle, const Memory* _mem, uint64_t _flags, uint8_t _skip) override - { - m_textures[_handle.idx].create(_mem, _flags, _skip); - return NULL; - } - - void updateTextureBegin(TextureHandle _handle, uint8_t _side, uint8_t _mip) override - { - m_updateTexture = &m_textures[_handle.idx]; - m_updateTexture->updateBegin(_side, _mip); - } - - 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) override - { - m_updateTexture->update(_side, _mip, _rect, _z, _depth, _pitch, _mem); - } - - void updateTextureEnd() override - { - m_updateTexture->updateEnd(); - m_updateTexture = NULL; - } - - void readTexture(TextureHandle _handle, void* _data, uint8_t _mip) override - { - TextureD3D9& texture = m_textures[_handle.idx]; - - D3DLOCKED_RECT lockedRect; - DX_CHECK(texture.m_texture2d->LockRect(_mip - , &lockedRect - , NULL - , D3DLOCK_NO_DIRTY_UPDATE|D3DLOCK_NOSYSLOCK|D3DLOCK_READONLY - ) ); - - uint32_t srcWidth = bx::uint32_max(1, texture.m_width >>_mip); - uint32_t srcHeight = bx::uint32_max(1, texture.m_height>>_mip); - uint32_t srcPitch = lockedRect.Pitch; - uint8_t* src = (uint8_t*)lockedRect.pBits; - - const uint8_t bpp = bimg::getBitsPerPixel(bimg::TextureFormat::Enum(texture.m_textureFormat) ); - uint8_t* dst = (uint8_t*)_data; - uint32_t dstPitch = srcWidth*bpp/8; - - uint32_t pitch = bx::uint32_min(srcPitch, dstPitch); - - for (uint32_t yy = 0, height = srcHeight; yy < height; ++yy) - { - bx::memCopy(dst, src, pitch); - - src += srcPitch; - dst += dstPitch; - } - - DX_CHECK(texture.m_texture2d->UnlockRect(_mip) ); - } - - void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height, uint8_t _numMips, uint16_t _numLayers) override - { - TextureD3D9& texture = m_textures[_handle.idx]; - - uint32_t size = sizeof(uint32_t) + sizeof(TextureCreate); - const Memory* mem = alloc(size); - - bx::StaticMemoryBlockWriter writer(mem->data, mem->size); - uint32_t magic = BGFX_CHUNK_MAGIC_TEX; - bx::write(&writer, magic, bx::ErrorAssert{}); - - TextureCreate tc; - tc.m_width = _width; - tc.m_height = _height; - tc.m_depth = 0; - tc.m_numLayers = _numLayers; - tc.m_numMips = _numMips; - tc.m_format = TextureFormat::Enum(texture.m_requestedFormat); - tc.m_cubeMap = false; - tc.m_mem = NULL; - bx::write(&writer, tc, bx::ErrorAssert{}); - - texture.destroy(true); - texture.create(mem, texture.m_flags, 0); - - release(mem); - } - - void overrideInternal(TextureHandle _handle, uintptr_t _ptr) override - { - // Resource ref. counts might be messed up outside of bgfx. - // Disabling ref. count check once texture is overridden. - setGraphicsDebuggerPresent(true); - m_textures[_handle.idx].overrideInternal(_ptr); - } - - uintptr_t getInternal(TextureHandle _handle) override - { - // Resource ref. counts might be messed up outside of bgfx. - // Disabling ref. count check once texture is overridden. - setGraphicsDebuggerPresent(true); - return uintptr_t(m_textures[_handle.idx].m_ptr); - } - - void destroyTexture(TextureHandle _handle) override - { - m_textures[_handle.idx].destroy(); - } - - void createFrameBuffer(FrameBufferHandle _handle, uint8_t _num, const Attachment* _attachment) override - { - m_frameBuffers[_handle.idx].create(_num, _attachment); - } - - void createFrameBuffer(FrameBufferHandle _handle, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _format, TextureFormat::Enum _depthFormat) override - { - uint16_t denseIdx = m_numWindows++; - m_windows[denseIdx] = _handle; - m_frameBuffers[_handle.idx].create(denseIdx, _nwh, _width, _height, _format, _depthFormat); - } - - void destroyFrameBuffer(FrameBufferHandle _handle) override - { - uint16_t denseIdx = m_frameBuffers[_handle.idx].destroy(); - if (UINT16_MAX != denseIdx) - { - --m_numWindows; - if (m_numWindows > 1) - { - FrameBufferHandle handle = m_windows[m_numWindows]; - m_windows[m_numWindows] = {kInvalidHandle}; - if (m_numWindows != denseIdx) - { - m_windows[denseIdx] = handle; - m_frameBuffers[handle.idx].m_denseIdx = denseIdx; - } - } - } - } - - void createUniform(UniformHandle _handle, UniformType::Enum _type, uint16_t _num, const char* _name) override - { - if (NULL != m_uniforms[_handle.idx]) - { - bx::free(g_allocator, m_uniforms[_handle.idx]); - } - - const uint32_t size = bx::alignUp(g_uniformTypeSize[_type]*_num, 16); - void* data = bx::alloc(g_allocator, size); - bx::memSet(data, 0, size); - m_uniforms[_handle.idx] = data; - m_uniformReg.add(_handle, _name); - } - - void destroyUniform(UniformHandle _handle) override - { - bx::free(g_allocator, m_uniforms[_handle.idx]); - m_uniforms[_handle.idx] = NULL; - m_uniformReg.remove(_handle); - } - - void requestScreenShot(FrameBufferHandle _handle, const char* _filePath) override - { -#if BX_PLATFORM_WINDOWS - IDirect3DSwapChain9* swapChain = isValid(_handle) - ? m_frameBuffers[_handle.idx].m_swapChain - : m_swapChain - ; - - if (NULL == swapChain) - { - BX_TRACE("Unable to capture screenshot %s.", _filePath); - return; - } - - D3DPRESENT_PARAMETERS params; - DX_CHECK(swapChain->GetPresentParameters(¶ms)); - - IDirect3DSurface9* surface; - D3DDEVICE_CREATION_PARAMETERS dcp; - DX_CHECK(m_device->GetCreationParameters(&dcp) ); - - D3DDISPLAYMODE dm; - DX_CHECK(m_d3d9->GetAdapterDisplayMode(dcp.AdapterOrdinal, &dm) ); - - DX_CHECK(m_device->CreateOffscreenPlainSurface(dm.Width - , dm.Height - , D3DFMT_A8R8G8B8 - , D3DPOOL_SCRATCH - , &surface - , NULL - ) ); - - HWND nwh = params.hDeviceWindow; - - SetWindowPos(nwh, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - - DX_CHECK(m_device->GetFrontBufferData(0, surface) ); - - SetWindowPos(nwh, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); - - D3DLOCKED_RECT rect; - DX_CHECK(surface->LockRect(&rect - , NULL - , D3DLOCK_NO_DIRTY_UPDATE|D3DLOCK_NOSYSLOCK|D3DLOCK_READONLY - ) ); - - RECT rc; - GetClientRect(nwh, &rc); - POINT point; - point.x = rc.left; - point.y = rc.top; - ClientToScreen(nwh, &point); - uint8_t* data = (uint8_t*)rect.pBits; - uint32_t bytesPerPixel = rect.Pitch/dm.Width; - - g_callback->screenShot(_filePath - , params.BackBufferWidth - , params.BackBufferHeight - , rect.Pitch - , &data[point.y*rect.Pitch+point.x*bytesPerPixel] - , params.BackBufferHeight*rect.Pitch - , false - ); - - DX_CHECK(surface->UnlockRect() ); - DX_RELEASE(surface, 0); -#else - BX_TRACE("Screenshot not supported!"); - BX_UNUSED(_handle, _filePath); -#endif // BX_PLATFORM_WINDOWS - } - - void updateViewName(ViewId _id, const char* _name) override - { - if (BX_ENABLED(BGFX_CONFIG_DEBUG_ANNOTATION) ) - { - mbstowcs(&s_viewNameW[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] - , _name - , BX_COUNTOF(s_viewNameW[0])-BGFX_CONFIG_MAX_VIEW_NAME_RESERVED - ); - } - - bx::strCopy(&s_viewName[_id][BGFX_CONFIG_MAX_VIEW_NAME_RESERVED] - , BX_COUNTOF(s_viewName[0]) - BGFX_CONFIG_MAX_VIEW_NAME_RESERVED - , _name - ); - } - - void updateUniform(uint16_t _loc, const void* _data, uint32_t _size) override - { - bx::memCopy(m_uniforms[_loc], _data, _size); - } - - void invalidateOcclusionQuery(OcclusionQueryHandle _handle) override - { - m_occlusionQuery.invalidate(_handle); - } - - void setMarker(const char* _marker, uint16_t _len) override - { - if (BX_ENABLED(BGFX_CONFIG_DEBUG_ANNOTATION) ) - { - uint32_t size = _len*sizeof(wchar_t); - wchar_t* name = (wchar_t*)alloca(size+2); - mbstowcs(name, _marker, size); - name[_len] = L'\0'; - PIX_SETMARKER(kColorMarker, name); - } - } - - virtual void setName(Handle _handle, const char* _name, uint16_t _len) override - { - BX_UNUSED(_handle, _name, _len) - } - - void submitBlit(BlitState& _bs, uint16_t _view); - - void submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) override; - - void blitSetup(TextVideoMemBlitter& _blitter) override - { - uint32_t width = m_params.BackBufferWidth; - uint32_t height = m_params.BackBufferHeight; - - FrameBufferHandle fbh = BGFX_INVALID_HANDLE; - setFrameBuffer(fbh, false, false); - - D3DVIEWPORT9 vp; - vp.X = 0; - vp.Y = 0; - vp.Width = width; - vp.Height = height; - vp.MinZ = 0.0f; - vp.MaxZ = 1.0f; - - IDirect3DDevice9* device = m_device; - DX_CHECK(device->SetViewport(&vp) ); - DX_CHECK(device->SetRenderState(D3DRS_STENCILENABLE, FALSE) ); - DX_CHECK(device->SetRenderState(D3DRS_ZENABLE, FALSE) ); - DX_CHECK(device->SetRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS) ); - DX_CHECK(device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE) ); - DX_CHECK(device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE) ); - DX_CHECK(device->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATER) ); - DX_CHECK(device->SetRenderState(D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_RED|D3DCOLORWRITEENABLE_GREEN|D3DCOLORWRITEENABLE_BLUE) ); - DX_CHECK(device->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID) ); - - ProgramD3D9& program = m_program[_blitter.m_program.idx]; - DX_CHECK(device->SetVertexShader(program.m_vsh->m_vertexShader) ); - DX_CHECK(device->SetPixelShader(program.m_fsh->m_pixelShader) ); - - VertexBufferD3D9& vb = m_vertexBuffers[_blitter.m_vb->handle.idx]; - VertexLayout& layout = m_vertexLayouts[_blitter.m_vb->layoutHandle.idx]; - DX_CHECK(device->SetStreamSource(0, vb.m_ptr, 0, layout.m_stride) ); - setInputLayout(layout, 0); - - IndexBufferD3D9& ib = m_indexBuffers[_blitter.m_ib->handle.idx]; - DX_CHECK(device->SetIndices(ib.m_ptr) ); - - float proj[16]; - bx::mtxOrtho(proj, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f, 0.0f, false); - - PredefinedUniform& predefined = program.m_predefined[0]; - uint8_t flags = predefined.m_type; - setShaderUniform(flags, predefined.m_loc, proj, 4); - - m_textures[_blitter.m_texture.idx].commit(0, BGFX_SAMPLER_INTERNAL_DEFAULT, NULL); - } - - void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) override - { - const uint32_t numVertices = _numIndices*4/6; - if (0 < numVertices) - { - m_indexBuffers[_blitter.m_ib->handle.idx].update(0, _numIndices * 2, _blitter.m_ib->data, true); - m_vertexBuffers[_blitter.m_vb->handle.idx].update(0, numVertices*_blitter.m_layout.m_stride, _blitter.m_vb->data, true); - - DX_CHECK(m_device->DrawIndexedPrimitive(D3DPT_TRIANGLELIST - , 0 - , 0 - , numVertices - , 0 - , _numIndices / 3 - ) ); - } - } - - void updateMsaa() - { - for (uint32_t ii = 1, last = 0; ii < BX_COUNTOF(s_checkMsaa); ++ii) - { - D3DMULTISAMPLE_TYPE msaa = s_checkMsaa[ii]; - DWORD quality; - - HRESULT hr = m_d3d9->CheckDeviceMultiSampleType(m_adapter - , m_deviceType - , m_params.BackBufferFormat - , m_params.Windowed - , msaa - , &quality - ); - - if (SUCCEEDED(hr) ) - { - s_msaa[ii].m_type = msaa; - s_msaa[ii].m_quality = bx::uint32_imax(0, quality-1); - last = ii; - } - else - { - s_msaa[ii] = s_msaa[last]; - } - } - } - - void updateResolution(const Resolution& _resolution) - { - m_maxAnisotropy = !!(_resolution.reset & BGFX_RESET_MAXANISOTROPY) - ? m_caps.MaxAnisotropy - : 1 - ; - const uint32_t maskFlags = ~(0 - | BGFX_RESET_MAXANISOTROPY - | BGFX_RESET_DEPTH_CLAMP - | BGFX_RESET_SUSPEND - ); - - if (m_resolution.width != _resolution.width - || m_resolution.height != _resolution.height - || (m_resolution.reset&maskFlags) != (_resolution.reset&maskFlags) ) - { - uint32_t flags = _resolution.reset & (~BGFX_RESET_INTERNAL_FORCE); - - m_resolution = _resolution; - m_resolution.reset = flags; - - m_textVideoMem.resize(false, _resolution.width, _resolution.height); - m_textVideoMem.clear(); - - D3DDEVICE_CREATION_PARAMETERS dcp; - DX_CHECK(m_device->GetCreationParameters(&dcp) ); - - D3DDISPLAYMODE dm; - DX_CHECK(m_d3d9->GetAdapterDisplayMode(dcp.AdapterOrdinal, &dm) ); - - m_params.BackBufferFormat = dm.Format; - - m_params.BackBufferWidth = _resolution.width; - m_params.BackBufferHeight = _resolution.height; - m_params.FullScreen_RefreshRateInHz = BGFX_RESET_FULLSCREEN == (m_resolution.reset&BGFX_RESET_FULLSCREEN_MASK) ? 60 : 0; - m_params.PresentationInterval = !!(m_resolution.reset&BGFX_RESET_VSYNC) ? D3DPRESENT_INTERVAL_ONE : D3DPRESENT_INTERVAL_IMMEDIATE; - - updateMsaa(); - - Msaa& msaa = s_msaa[(m_resolution.reset&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT]; - m_params.MultiSampleType = msaa.m_type; - m_params.MultiSampleQuality = msaa.m_quality; - - preReset(); - DX_CHECK(m_device->Reset(&m_params) ); - postReset(); - } - } - - void setFrameBuffer(FrameBufferHandle _fbh, bool _msaa = true, bool _needPresent = true) - { - if (isValid(m_fbh) - && m_fbh.idx != _fbh.idx) - { - FrameBufferD3D9& frameBuffer = m_frameBuffers[m_fbh.idx]; - frameBuffer.resolve(); - } - - if (!isValid(_fbh) ) - { - m_needPresent |= _needPresent; - DX_CHECK(m_device->SetRenderTarget(0, m_backBufferColor) ); - for (uint32_t ii = 1, num = g_caps.limits.maxFBAttachments; ii < num; ++ii) - { - DX_CHECK(m_device->SetRenderTarget(ii, NULL) ); - } - DX_CHECK(m_device->SetDepthStencilSurface(m_backBufferDepthStencil) ); - - DX_CHECK(m_device->SetRenderState(D3DRS_SRGBWRITEENABLE, 0 != (m_resolution.reset & BGFX_RESET_SRGB_BACKBUFFER) ) ); - } - else - { - m_frameBuffers[_fbh.idx].set(); - } - - m_fbh = _fbh; - m_rtMsaa = _msaa; - } - - void setShaderUniform(uint8_t _flags, uint32_t _regIndex, const void* _val, uint32_t _numRegs) - { - if (_flags&kUniformFragmentBit) - { - DX_CHECK(m_device->SetPixelShaderConstantF(_regIndex, (const float*)_val, _numRegs) ); - } - else - { - DX_CHECK(m_device->SetVertexShaderConstantF(_regIndex, (const float*)_val, _numRegs) ); - } - } - - void setShaderUniform4f(uint8_t _flags, uint32_t _regIndex, const void* _val, uint32_t _numRegs) - { - setShaderUniform(_flags, _regIndex, _val, _numRegs); - } - - void setShaderUniform4x4f(uint8_t _flags, uint32_t _regIndex, const void* _val, uint32_t _numRegs) - { - setShaderUniform(_flags, _regIndex, _val, _numRegs); - } - - void reset() - { - preReset(); - - HRESULT hr; - - do - { - hr = m_device->Reset(&m_params); - } while (FAILED(hr) ); - - postReset(); - } - - void flush() - { - m_flushQuery->Issue(D3DISSUE_END); - m_flushQuery->GetData(NULL, 0, D3DGETDATA_FLUSH); - } - - bool isDeviceRemoved() override - { - return false; - } - - void flip() override - { - if (NULL != m_swapChain) - { - for (uint32_t ii = 0, num = m_numWindows; ii < num; ++ii) - { - HRESULT hr = S_OK; - if (0 == ii) - { - if (m_needPresent) - { - hr = m_swapChain->Present(NULL, NULL, (HWND)g_platformData.nwh, NULL, 0); - m_needPresent = false; - } - else - { - flush(); - } - } - else - { - hr = m_frameBuffers[m_windows[ii].idx].present(); - } - - if (isLost(hr) ) - { - do - { - do - { - hr = m_device->TestCooperativeLevel(); - } - while (D3DERR_DEVICENOTRESET != hr); - - reset(); - hr = m_device->TestCooperativeLevel(); - } - while (FAILED(hr) ); - - break; - } - else if (FAILED(hr) ) - { - BX_TRACE("Present failed with err 0x%08x.", hr); - } - } - } - } - - void preReset() - { - m_needPresent = false; - - invalidateSamplerState(); - m_inputLayoutCache.invalidate(); - - for (uint32_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage) - { - DX_CHECK(m_device->SetTexture(stage, NULL) ); - } - - DX_CHECK(m_device->SetRenderTarget(0, m_backBufferColor) ); - for (uint32_t ii = 1, num = g_caps.limits.maxFBAttachments; ii < num; ++ii) - { - DX_CHECK(m_device->SetRenderTarget(ii, NULL) ); - } - DX_CHECK(m_device->SetDepthStencilSurface(m_backBufferDepthStencil) ); - DX_CHECK(m_device->SetVertexShader(NULL) ); - DX_CHECK(m_device->SetPixelShader(NULL) ); - DX_CHECK(m_device->SetStreamSource(0, NULL, 0, 0) ); - DX_CHECK(m_device->SetIndices(NULL) ); - - DX_RELEASE(m_backBufferColor, 0); - DX_RELEASE(m_backBufferDepthStencil, 0); - DX_RELEASE(m_swapChain, 0); - - capturePreReset(); - - DX_RELEASE(m_flushQuery, 0); - if (m_timerQuerySupport) - { - m_gpuTimer.preReset(); - } - - if (m_occlusionQuerySupport) - { - m_occlusionQuery.preReset(); - } - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_indexBuffers); ++ii) - { - m_indexBuffers[ii].preReset(); - } - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_vertexBuffers); ++ii) - { - m_vertexBuffers[ii].preReset(); - } - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_frameBuffers); ++ii) - { - m_frameBuffers[ii].preReset(); - } - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_textures); ++ii) - { - m_textures[ii].preReset(); - } - } - - void postReset() - { - DX_CHECK(m_device->GetSwapChain(0, &m_swapChain) ); - DX_CHECK(m_swapChain->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &m_backBufferColor) ); - DX_CHECK(m_device->GetDepthStencilSurface(&m_backBufferDepthStencil) ); - - DX_CHECK(m_device->CreateQuery(D3DQUERYTYPE_EVENT, &m_flushQuery) ); - if (m_timerQuerySupport) - { - m_gpuTimer.postReset(); - } - - if (m_occlusionQuerySupport) - { - m_occlusionQuery.postReset(); - } - - capturePostReset(); - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_indexBuffers); ++ii) - { - m_indexBuffers[ii].postReset(); - } - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_vertexBuffers); ++ii) - { - m_vertexBuffers[ii].postReset(); - } - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_textures); ++ii) - { - m_textures[ii].postReset(); - } - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_frameBuffers); ++ii) - { - m_frameBuffers[ii].postReset(); - } - } - - void invalidateSamplerState() - { - for (uint32_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage) - { - m_samplerFlags[stage] = UINT32_MAX; - } - } - - static void setSamplerState(IDirect3DDevice9* _device, DWORD _stage, D3DSAMPLERSTATETYPE _type, DWORD _value) - { - DX_CHECK(_device->SetSamplerState(_stage, _type, _value) ); - if (4 > _stage) - { - DX_CHECK(_device->SetSamplerState(D3DVERTEXTEXTURESAMPLER0 + _stage, _type, _value) ); - } - } - - void setSamplerState(uint8_t _stage, uint64_t _flags, const float _rgba[4]) - { - const uint64_t flags = _flags&( (~BGFX_SAMPLER_RESERVED_MASK) | BGFX_SAMPLER_BITS_MASK | BGFX_TEXTURE_SRGB); - BX_ASSERT(_stage < BX_COUNTOF(m_samplerFlags), ""); - if (m_samplerFlags[_stage] != flags) - { - m_samplerFlags[_stage] = flags; - IDirect3DDevice9* device = m_device; - D3DTEXTUREADDRESS tau = s_textureAddress[(_flags&BGFX_SAMPLER_U_MASK)>>BGFX_SAMPLER_U_SHIFT]; - D3DTEXTUREADDRESS tav = s_textureAddress[(_flags&BGFX_SAMPLER_V_MASK)>>BGFX_SAMPLER_V_SHIFT]; - D3DTEXTUREADDRESS taw = s_textureAddress[(_flags&BGFX_SAMPLER_W_MASK)>>BGFX_SAMPLER_W_SHIFT]; - D3DTEXTUREFILTERTYPE minFilter = s_textureFilter[(_flags&BGFX_SAMPLER_MIN_MASK)>>BGFX_SAMPLER_MIN_SHIFT]; - D3DTEXTUREFILTERTYPE magFilter = s_textureFilter[(_flags&BGFX_SAMPLER_MAG_MASK)>>BGFX_SAMPLER_MAG_SHIFT]; - D3DTEXTUREFILTERTYPE mipFilter = s_textureFilter[(_flags&BGFX_SAMPLER_MIP_MASK)>>BGFX_SAMPLER_MIP_SHIFT]; - - setSamplerState(device, _stage, D3DSAMP_ADDRESSU, tau); - setSamplerState(device, _stage, D3DSAMP_ADDRESSV, tav); - setSamplerState(device, _stage, D3DSAMP_ADDRESSW, taw); - setSamplerState(device, _stage, D3DSAMP_MINFILTER, minFilter); - setSamplerState(device, _stage, D3DSAMP_MAGFILTER, magFilter); - setSamplerState(device, _stage, D3DSAMP_MIPFILTER, mipFilter); - setSamplerState(device, _stage, D3DSAMP_MAXANISOTROPY, m_maxAnisotropy); - setSamplerState(device, _stage, D3DSAMP_SRGBTEXTURE, 0 != (flags & BGFX_TEXTURE_SRGB) ); - if (NULL != _rgba) - { - if (needBorderColor(_flags) ) - { - DWORD bc = D3DCOLOR_COLORVALUE(_rgba[0], _rgba[1], _rgba[2], _rgba[3]); - setSamplerState(device - , _stage - , D3DSAMP_BORDERCOLOR - , bc - ); - } - } - } - } - - bool isVisible(Frame* _render, OcclusionQueryHandle _handle, bool _visible) - { - m_occlusionQuery.resolve(_render); - return _visible == (0 != _render->m_occlusion[_handle.idx]); - } - - void capturePreReset() - { - if (NULL != m_captureSurface) - { - g_callback->captureEnd(); - } - DX_RELEASE(m_captureSurface, 1); - DX_RELEASE(m_captureTexture, 0); - DX_RELEASE(m_captureResolve, 0); - } - - void capturePostReset() - { - if (m_resolution.reset&BGFX_RESET_CAPTURE) - { - uint32_t width = m_params.BackBufferWidth; - uint32_t height = m_params.BackBufferHeight; - D3DFORMAT fmt = m_params.BackBufferFormat; - - DX_CHECK(m_device->CreateTexture(width - , height - , 1 - , 0 - , fmt - , D3DPOOL_SYSTEMMEM - , &m_captureTexture - , NULL - ) ); - - DX_CHECK(m_captureTexture->GetSurfaceLevel(0 - , &m_captureSurface - ) ); - - if (m_params.MultiSampleType != D3DMULTISAMPLE_NONE) - { - DX_CHECK(m_device->CreateRenderTarget(width - , height - , fmt - , D3DMULTISAMPLE_NONE - , 0 - , false - , &m_captureResolve - , NULL - ) ); - } - - g_callback->captureBegin(width, height, width*4, TextureFormat::BGRA8, false); - } - } - - void capture() - { - if (NULL != m_captureSurface) - { - IDirect3DSurface9* resolve = m_backBufferColor; - - if (NULL != m_captureResolve) - { - resolve = m_captureResolve; - DX_CHECK(m_device->StretchRect(m_backBufferColor - , 0 - , m_captureResolve - , NULL - , D3DTEXF_NONE - ) ); - } - - HRESULT hr = m_device->GetRenderTargetData(resolve, m_captureSurface); - if (SUCCEEDED(hr) ) - { - D3DLOCKED_RECT rect; - DX_CHECK(m_captureSurface->LockRect(&rect - , NULL - , D3DLOCK_NO_DIRTY_UPDATE|D3DLOCK_NOSYSLOCK|D3DLOCK_READONLY - ) ); - - g_callback->captureFrame(rect.pBits, m_params.BackBufferHeight*rect.Pitch); - - DX_CHECK(m_captureSurface->UnlockRect() ); - } - } - } - - void commit(UniformBuffer& _uniformBuffer) - { - _uniformBuffer.reset(); - - IDirect3DDevice9* device = m_device; - - for (;;) - { - uint32_t opcode = _uniformBuffer.read(); - - if (UniformType::End == opcode) - { - break; - } - - UniformType::Enum type; - uint16_t loc; - uint16_t num; - uint16_t copy; - UniformBuffer::decodeOpcode(opcode, type, loc, num, copy); - - const char* data; - if (copy) - { - data = _uniformBuffer.read(g_uniformTypeSize[type]*num); - } - else - { - UniformHandle handle; - bx::memCopy(&handle, _uniformBuffer.read(sizeof(UniformHandle) ), sizeof(UniformHandle) ); - data = (const char*)m_uniforms[handle.idx]; - } - -#define CASE_IMPLEMENT_UNIFORM(_uniform, _dxsuffix, _type) \ - case UniformType::_uniform: \ - { \ - _type* value = (_type*)data; \ - DX_CHECK(device->SetVertexShaderConstant##_dxsuffix(loc, value, num) ); \ - } \ - break; \ - \ - case UniformType::_uniform|kUniformFragmentBit: \ - { \ - _type* value = (_type*)data; \ - DX_CHECK(device->SetPixelShaderConstant##_dxsuffix(loc, value, num) ); \ - } \ - break - - switch ( (int32_t)type) - { - case UniformType::Mat3: - { - float* value = (float*)data; - for (uint32_t ii = 0, count = num/3; ii < count; ++ii, loc += 3, value += 9) - { - Matrix4 mtx; - mtx.un.val[ 0] = value[0]; - mtx.un.val[ 1] = value[1]; - mtx.un.val[ 2] = value[2]; - mtx.un.val[ 3] = 0.0f; - mtx.un.val[ 4] = value[3]; - mtx.un.val[ 5] = value[4]; - mtx.un.val[ 6] = value[5]; - mtx.un.val[ 7] = 0.0f; - mtx.un.val[ 8] = value[6]; - mtx.un.val[ 9] = value[7]; - mtx.un.val[10] = value[8]; - mtx.un.val[11] = 0.0f; - DX_CHECK(device->SetVertexShaderConstantF(loc, &mtx.un.val[0], 3) ); - } - } - break; - - case UniformType::Mat3|kUniformFragmentBit: - { - float* value = (float*)data; - for (uint32_t ii = 0, count = num/3; ii < count; ++ii, loc += 3, value += 9) - { - Matrix4 mtx; - mtx.un.val[ 0] = value[0]; - mtx.un.val[ 1] = value[1]; - mtx.un.val[ 2] = value[2]; - mtx.un.val[ 3] = 0.0f; - mtx.un.val[ 4] = value[3]; - mtx.un.val[ 5] = value[4]; - mtx.un.val[ 6] = value[5]; - mtx.un.val[ 7] = 0.0f; - mtx.un.val[ 8] = value[6]; - mtx.un.val[ 9] = value[7]; - mtx.un.val[10] = value[8]; - mtx.un.val[11] = 0.0f; - DX_CHECK(device->SetPixelShaderConstantF(loc, &mtx.un.val[0], 3) ); - } - } - break; - - CASE_IMPLEMENT_UNIFORM(Sampler, I, int); - CASE_IMPLEMENT_UNIFORM(Vec4, F, float); - CASE_IMPLEMENT_UNIFORM(Mat4, F, float); - - case UniformType::End: - break; - - default: - BX_TRACE("%4d: INVALID 0x%08x, t %d, l %d, n %d, c %d", _uniformBuffer.getPos(), opcode, type, loc, num, copy); - break; - } -#undef CASE_IMPLEMENT_UNIFORM - } - } - - void clearQuad(ClearQuad& _clearQuad, const Rect& _rect, const Clear& _clear, const float _palette[][4]) - { - IDirect3DDevice9* device = m_device; - - uint32_t numMrt = 1; - FrameBufferHandle fbh = m_fbh; - if (isValid(fbh) ) - { - const FrameBufferD3D9& fb = m_frameBuffers[fbh.idx]; - numMrt = bx::uint32_max(1, fb.m_num); - } - - if (1 == numMrt) - { - D3DCOLOR color = 0; - DWORD flags = 0; - - if (BGFX_CLEAR_COLOR & _clear.m_flags) - { - if (BGFX_CLEAR_COLOR_USE_PALETTE & _clear.m_flags) - { - uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE-1, _clear.m_index[0]); - const float* rgba = _palette[index]; - const float rr = rgba[0]; - const float gg = rgba[1]; - const float bb = rgba[2]; - const float aa = rgba[3]; - color = D3DCOLOR_COLORVALUE(rr, gg, bb, aa); - } - else - { - color = D3DCOLOR_RGBA(_clear.m_index[0], _clear.m_index[1], _clear.m_index[2], _clear.m_index[3]); - } - - flags |= D3DCLEAR_TARGET; - DX_CHECK(device->SetRenderState(D3DRS_COLORWRITEENABLE - , D3DCOLORWRITEENABLE_RED - | D3DCOLORWRITEENABLE_GREEN - | D3DCOLORWRITEENABLE_BLUE - | D3DCOLORWRITEENABLE_ALPHA - ) ); - } - - if (BGFX_CLEAR_DEPTH & _clear.m_flags) - { - flags |= D3DCLEAR_ZBUFFER; - DX_CHECK(device->SetRenderState(D3DRS_ZWRITEENABLE, TRUE) ); - } - - if (BGFX_CLEAR_STENCIL & _clear.m_flags) - { - flags |= D3DCLEAR_STENCIL; - } - - if (0 != flags) - { - RECT rc; - rc.left = _rect.m_x; - rc.top = _rect.m_y; - rc.right = _rect.m_x + _rect.m_width; - rc.bottom = _rect.m_y + _rect.m_height; - DX_CHECK(device->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE) ); - DX_CHECK(device->SetScissorRect(&rc) ); - DX_CHECK(device->Clear(0, NULL, flags, color, _clear.m_depth, _clear.m_stencil) ); - DX_CHECK(device->SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE) ); - } - } - else - { - DX_CHECK(device->SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE) ); - DX_CHECK(device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE) ); - DX_CHECK(device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE) ); - - if (BGFX_CLEAR_COLOR & _clear.m_flags) - { - DX_CHECK(device->SetRenderState(D3DRS_COLORWRITEENABLE - , D3DCOLORWRITEENABLE_RED - | D3DCOLORWRITEENABLE_GREEN - | D3DCOLORWRITEENABLE_BLUE - | D3DCOLORWRITEENABLE_ALPHA - ) ); - } - else - { - DX_CHECK(device->SetRenderState(D3DRS_COLORWRITEENABLE, 0) ); - } - - if (BGFX_CLEAR_DEPTH & _clear.m_flags) - { - DX_CHECK(device->SetRenderState(D3DRS_ZWRITEENABLE, TRUE) ); - DX_CHECK(device->SetRenderState(D3DRS_ZENABLE, TRUE) ); - DX_CHECK(device->SetRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS) ); - } - else - { - DX_CHECK(device->SetRenderState(D3DRS_ZWRITEENABLE, FALSE) ); - DX_CHECK(device->SetRenderState(D3DRS_ZENABLE, FALSE) ); - } - - if (BGFX_CLEAR_STENCIL & _clear.m_flags) - { - DX_CHECK(device->SetRenderState(D3DRS_STENCILENABLE, TRUE) ); - DX_CHECK(device->SetRenderState(D3DRS_TWOSIDEDSTENCILMODE, TRUE) ); - DX_CHECK(device->SetRenderState(D3DRS_STENCILREF, _clear.m_stencil) ); - DX_CHECK(device->SetRenderState(D3DRS_STENCILMASK, 0xff) ); - DX_CHECK(device->SetRenderState(D3DRS_STENCILFUNC, D3DCMP_ALWAYS) ); - DX_CHECK(device->SetRenderState(D3DRS_STENCILFAIL, D3DSTENCILOP_REPLACE) ); - DX_CHECK(device->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_REPLACE) ); - DX_CHECK(device->SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_REPLACE) ); - } - else - { - DX_CHECK(device->SetRenderState(D3DRS_STENCILENABLE, FALSE) ); - } - - VertexBufferD3D9& vb = m_vertexBuffers[_clearQuad.m_vb.idx]; - VertexLayout& layout = _clearQuad.m_layout; - uint32_t stride = _clearQuad.m_layout.m_stride; - - ProgramD3D9& program = m_program[_clearQuad.m_program[numMrt-1].idx]; - device->SetVertexShader(program.m_vsh->m_vertexShader); - device->SetPixelShader(program.m_fsh->m_pixelShader); - - float mrtClearDepth[4] = { _clear.m_depth }; - DX_CHECK(device->SetVertexShaderConstantF(0, mrtClearDepth, 1)); - - float mrtClearColor[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4]; - - if (BGFX_CLEAR_COLOR_USE_PALETTE & _clear.m_flags) - { - for (uint32_t ii = 0; ii < numMrt; ++ii) - { - uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_COLOR_PALETTE - 1, _clear.m_index[ii]); - bx::memCopy(mrtClearColor[ii], _palette[index], 16); - } - } - else - { - float rgba[4] = - { - _clear.m_index[0] * 1.0f / 255.0f, - _clear.m_index[1] * 1.0f / 255.0f, - _clear.m_index[2] * 1.0f / 255.0f, - _clear.m_index[3] * 1.0f / 255.0f, - }; - - for (uint32_t ii = 0; ii < numMrt; ++ii) - { - bx::memCopy(mrtClearColor[ii], rgba, 16); - } - } - - DX_CHECK(device->SetPixelShaderConstantF(0, mrtClearColor[0], numMrt)); - - DX_CHECK(device->SetStreamSource(0, vb.m_ptr, 0, stride) ); - DX_CHECK(device->SetStreamSourceFreq(0, 1) ); - DX_CHECK(device->SetStreamSource(1, NULL, 0, 0) ); - setInputLayout(layout, 0); - DX_CHECK(device->SetIndices(NULL) ); - DX_CHECK(device->DrawPrimitive(D3DPT_TRIANGLESTRIP - , 0 - , 2 - ) ); - } - } - - void setInputLayout(uint8_t _numStreams, const VertexLayout** _layouts, uint16_t _numInstanceData) - { - bx::HashMurmur2A murmur; - murmur.begin(); - murmur.add(_numInstanceData); - for (uint8_t stream = 0; stream < _numStreams; ++stream) - { - murmur.add(_layouts[stream]->m_hash); - } - uint64_t layoutHash = murmur.end(); - - IDirect3DVertexDeclaration9* layout = m_inputLayoutCache.find(layoutHash); - if (NULL == layout) - { - D3DVERTEXELEMENT9 vertexElements[Attrib::Count+1+BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT]; - D3DVERTEXELEMENT9* elem = vertexElements; - - for (uint8_t stream = 0; stream < _numStreams; ++stream) - { - elem = fillVertexLayout(stream, elem, *_layouts[stream]); - } - - const D3DVERTEXELEMENT9 inst = { _numStreams, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 }; - - for (uint8_t ii = 0; ii < _numInstanceData; ++ii) - { - bx::memCopy(elem, &inst, sizeof(D3DVERTEXELEMENT9) ); - elem->UsageIndex = uint8_t(7-ii); // TEXCOORD7 = i_data0, TEXCOORD6 = i_data1, etc. - elem->Offset = ii*16; - ++elem; - } - - bx::memCopy(elem, &s_attrib[Attrib::Count], sizeof(D3DVERTEXELEMENT9) ); - - DX_CHECK(m_device->CreateVertexDeclaration(vertexElements, &layout) ); - - m_inputLayoutCache.add(layoutHash, layout); - } - - DX_CHECK(m_device->SetVertexDeclaration(layout) ); - } - - void setInputLayout(const VertexLayout& _layout, uint16_t _numInstanceData) - { - const VertexLayout* layouts[1] = { &_layout }; - setInputLayout(BX_COUNTOF(layouts), layouts, _numInstanceData); - } - - D3DCAPS9 m_caps; - - IDirect3D9Ex* m_d3d9ex; - IDirect3DDevice9Ex* m_deviceEx; - - IDirect3D9* m_d3d9; - IDirect3DDevice9* m_device; - IDirect3DQuery9* m_flushQuery; - TimerQueryD3D9 m_gpuTimer; - OcclusionQueryD3D9 m_occlusionQuery; - D3DPOOL m_pool; - - IDirect3DSwapChain9* m_swapChain; - - bool m_needPresent; - uint16_t m_numWindows; - FrameBufferHandle m_windows[BGFX_CONFIG_MAX_FRAME_BUFFERS]; - - IDirect3DSurface9* m_backBufferColor; - IDirect3DSurface9* m_backBufferDepthStencil; - - IDirect3DTexture9* m_captureTexture; - IDirect3DSurface9* m_captureSurface; - IDirect3DSurface9* m_captureResolve; - - IDirect3DVertexDeclaration9* m_instanceDataDecls[BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT]; - - void* m_d3d9Dll; - NvApi m_nvapi; - uint32_t m_adapter; - D3DDEVTYPE m_deviceType; - D3DPRESENT_PARAMETERS m_params; - uint32_t m_maxAnisotropy; - D3DADAPTER_IDENTIFIER9 m_identifier; - Resolution m_resolution; - - bool m_initialized; - bool m_amd; - bool m_nvidia; - bool m_atocSupport; - bool m_instancingSupport; - bool m_occlusionQuerySupport; - bool m_timerQuerySupport; - - D3DFORMAT m_fmtDepth; - - IndexBufferD3D9 m_indexBuffers[BGFX_CONFIG_MAX_INDEX_BUFFERS]; - VertexBufferD3D9 m_vertexBuffers[BGFX_CONFIG_MAX_VERTEX_BUFFERS]; - ShaderD3D9 m_shaders[BGFX_CONFIG_MAX_SHADERS]; - ProgramD3D9 m_program[BGFX_CONFIG_MAX_PROGRAMS]; - TextureD3D9 m_textures[BGFX_CONFIG_MAX_TEXTURES]; - VertexLayout m_vertexLayouts[BGFX_CONFIG_MAX_VERTEX_LAYOUTS]; - FrameBufferD3D9 m_frameBuffers[BGFX_CONFIG_MAX_FRAME_BUFFERS]; - UniformRegistry m_uniformReg; - void* m_uniforms[BGFX_CONFIG_MAX_UNIFORMS]; - - uint64_t m_samplerFlags[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS]; - - TextureD3D9* m_updateTexture; - uint8_t* m_updateTextureBits; - uint32_t m_updateTexturePitch; - uint8_t m_updateTextureSide; - uint8_t m_updateTextureMip; - - StateCacheT m_inputLayoutCache; - - TextVideoMem m_textVideoMem; - - FrameBufferHandle m_fbh; - bool m_rtMsaa; - }; - - static RendererContextD3D9* s_renderD3D9; - - RendererContextI* rendererCreate(const Init& _init) - { - s_renderD3D9 = BX_NEW(g_allocator, RendererContextD3D9); - if (!s_renderD3D9->init(_init) ) - { - bx::deleteObject(g_allocator, s_renderD3D9); - s_renderD3D9 = NULL; - } - return s_renderD3D9; - } - - void rendererDestroy() - { - s_renderD3D9->shutdown(); - bx::deleteObject(g_allocator, s_renderD3D9); - s_renderD3D9 = NULL; - } - - void IndexBufferD3D9::create(uint32_t _size, void* _data, uint16_t _flags) - { - m_size = _size; - m_flags = _flags; - - uint32_t usage = D3DUSAGE_WRITEONLY; - D3DPOOL pool = s_renderD3D9->m_pool; - - if (NULL == _data) - { - usage |= D3DUSAGE_DYNAMIC; - pool = D3DPOOL_DEFAULT; - m_dynamic = (uint8_t*)bx::alloc(g_allocator, _size); - } - - const D3DFORMAT format = 0 == (_flags & BGFX_BUFFER_INDEX32) - ? D3DFMT_INDEX16 - : D3DFMT_INDEX32 - ; - - DX_CHECK(s_renderD3D9->m_device->CreateIndexBuffer(m_size - , usage - , format - , pool - , &m_ptr - , NULL - ) ); - - if (NULL != _data) - { - update(0, _size, _data); - } - } - - void IndexBufferD3D9::preReset() - { - if (NULL != m_dynamic) - { - DX_RELEASE(m_ptr, 0); - } - } - - void IndexBufferD3D9::postReset() - { - if (NULL != m_dynamic) - { - const D3DFORMAT format = 0 == (m_flags & BGFX_BUFFER_INDEX32) - ? D3DFMT_INDEX16 - : D3DFMT_INDEX32 - ; - - DX_CHECK(s_renderD3D9->m_device->CreateIndexBuffer(m_size - , D3DUSAGE_WRITEONLY|D3DUSAGE_DYNAMIC - , format - , D3DPOOL_DEFAULT - , &m_ptr - , NULL - ) ); - - update(0, m_size, m_dynamic); - } - } - - void VertexBufferD3D9::create(uint32_t _size, void* _data, VertexLayoutHandle _layoutHandle) - { - m_size = _size; - m_layoutHandle = _layoutHandle; - - uint32_t usage = D3DUSAGE_WRITEONLY; - D3DPOOL pool = s_renderD3D9->m_pool; - - if (NULL == _data) - { - usage |= D3DUSAGE_DYNAMIC; - pool = D3DPOOL_DEFAULT; - m_dynamic = (uint8_t*)bx::alloc(g_allocator, _size); - } - - DX_CHECK(s_renderD3D9->m_device->CreateVertexBuffer(m_size - , usage - , 0 - , pool - , &m_ptr - , NULL - ) ); - - if (NULL != _data) - { - update(0, _size, _data); - } - } - - void VertexBufferD3D9::preReset() - { - if (NULL != m_dynamic) - { - DX_RELEASE(m_ptr, 0); - } - } - - void VertexBufferD3D9::postReset() - { - if (NULL != m_dynamic) - { - DX_CHECK(s_renderD3D9->m_device->CreateVertexBuffer(m_size - , D3DUSAGE_WRITEONLY|D3DUSAGE_DYNAMIC - , 0 - , D3DPOOL_DEFAULT - , &m_ptr - , NULL - ) ); - - update(0, m_size, m_dynamic); - } - } - - void ShaderD3D9::create(const Memory* _mem) - { - bx::MemoryReader reader(_mem->data, _mem->size); - - bx::ErrorAssert err; - - uint32_t magic; - bx::read(&reader, magic, &err); - - const bool fragment = isShaderType(magic, 'F'); - - uint32_t hashIn; - bx::read(&reader, hashIn, &err); - - uint32_t hashOut; - - if (isShaderVerLess(magic, 6) ) - { - hashOut = hashIn; - } - else - { - bx::read(&reader, hashOut, &err); - } - - uint16_t count; - bx::read(&reader, count, &err); - - m_numPredefined = 0; - - BX_TRACE("Shader consts %d", count); - - uint8_t fragmentBit = fragment ? kUniformFragmentBit : 0; - - if (0 < count) - { - for (uint32_t ii = 0; ii < count; ++ii) - { - uint8_t nameSize = 0; - bx::read(&reader, nameSize, &err); - - char name[256] = {}; - bx::read(&reader, &name, nameSize, &err); - name[nameSize] = '\0'; - - uint8_t type = 0; - bx::read(&reader, type, &err); - - uint8_t num = 0; - bx::read(&reader, num, &err); - - uint16_t regIndex = 0; - bx::read(&reader, regIndex, &err); - - uint16_t regCount = 0; - bx::read(&reader, regCount, &err); - - if (!isShaderVerLess(magic, 8) ) - { - uint16_t texInfo = 0; - bx::read(&reader, texInfo, &err); - } - - if (!isShaderVerLess(magic, 10) ) - { - uint16_t texFormat = 0; - bx::read(&reader, texFormat, &err); - } - - const char* kind = "invalid"; - - PredefinedUniform::Enum predefined = nameToPredefinedUniformEnum(name); - if (PredefinedUniform::Count != predefined) - { - kind = "predefined"; - m_predefined[m_numPredefined].m_loc = regIndex; - m_predefined[m_numPredefined].m_count = regCount; - m_predefined[m_numPredefined].m_type = uint8_t(predefined|fragmentBit); - m_numPredefined++; - } - else if (0 == (kUniformSamplerBit & type) ) - { - const UniformRegInfo* info = s_renderD3D9->m_uniformReg.find(name); - BX_WARN(NULL != info, "User defined uniform '%s' is not found, it won't be set.", name); - - if (NULL != info) - { - if (NULL == m_constantBuffer) - { - m_constantBuffer = UniformBuffer::create(1024); - } - - kind = "user"; - m_constantBuffer->writeUniformHandle( (UniformType::Enum)(type|fragmentBit), regIndex, info->m_handle, regCount); - } - } - else - { - kind = "sampler"; - } - - BX_TRACE("\t%s: %s (%s), num %2d, r.index %3d, r.count %2d" - , kind - , name - , getUniformTypeName(UniformType::Enum(type&~kUniformMask) ) - , num - , regIndex - , regCount - ); - BX_UNUSED(kind); - } - - if (NULL != m_constantBuffer) - { - m_constantBuffer->finish(); - } - } - - uint32_t shaderSize; - bx::read(&reader, shaderSize, &err); - - const DWORD* code = (const DWORD*)reader.getDataPtr(); - - if (fragment) - { - m_type = 1; - DX_CHECK(s_renderD3D9->m_device->CreatePixelShader(code, &m_pixelShader) ); - BGFX_FATAL(NULL != m_pixelShader, bgfx::Fatal::InvalidShader, "Failed to create fragment shader."); - } - else - { - m_type = 0; - DX_CHECK(s_renderD3D9->m_device->CreateVertexShader(code, &m_vertexShader) ); - BGFX_FATAL(NULL != m_vertexShader, bgfx::Fatal::InvalidShader, "Failed to create vertex shader."); - } - } - - void TextureD3D9::createTexture(uint32_t _width, uint32_t _height, uint8_t _numMips) - { - m_type = Texture2D; - const bimg::TextureFormat::Enum fmt = (bimg::TextureFormat::Enum)m_textureFormat; - - DWORD usage = 0; - 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 (bimg::isDepth(fmt) ) - { - usage = D3DUSAGE_DEPTHSTENCIL; - } - else if (readBack) - { - usage = 0; - pool = D3DPOOL_SYSTEMMEM; - } - else if (renderTarget || blit) - { - usage = 0 - | D3DUSAGE_RENDERTARGET - | (1 < _numMips ? D3DUSAGE_AUTOGENMIPMAP : 0) - ; - } - - IDirect3DDevice9* device = s_renderD3D9->m_device; - - if (renderTarget) - { - uint32_t msaaQuality = ( (m_flags&BGFX_TEXTURE_RT_MSAA_MASK)>>BGFX_TEXTURE_RT_MSAA_SHIFT); - msaaQuality = bx::uint32_satsub(msaaQuality, 1); - - bool writeOnly = 0 != (m_flags&BGFX_TEXTURE_RT_WRITE_ONLY); - - if (0 != msaaQuality - || writeOnly) - { - const Msaa& msaa = s_msaa[msaaQuality]; - - if (bimg::isDepth(fmt) ) - { - DX_CHECK(device->CreateDepthStencilSurface( - m_width - , m_height - , s_textureFormat[m_textureFormat].m_fmt - , msaa.m_type - , msaa.m_quality - , FALSE - , &m_surface - , NULL - ) ); - } - else - { - DX_CHECK(device->CreateRenderTarget( - m_width - , m_height - , s_textureFormat[m_textureFormat].m_fmt - , msaa.m_type - , msaa.m_quality - , FALSE - , &m_surface - , NULL - ) ); - } - - if (writeOnly) - { - // This is render buffer, there is no sampling, no need - // to create texture. - return; - } - } - } - - DX_CHECK(device->CreateTexture(_width - , _height - , _numMips - , usage - , s_textureFormat[fmt].m_fmt - , pool - , &m_texture2d - , 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 - , _numMips - , bimg::getName(fmt) - ); - } - - 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; - - IDirect3DDevice9* device = s_renderD3D9->m_device; - DX_CHECK(device->CreateVolumeTexture(_width - , _height - , _depth - , _numMips - , 0 - , s_textureFormat[fmt].m_fmt - , 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 - , _depth - , _numMips - , getName(fmt) - ); - } - - void TextureD3D9::createCubeTexture(uint32_t _width, uint8_t _numMips) - { - m_type = TextureCube; - const bimg::TextureFormat::Enum fmt = (bimg::TextureFormat::Enum)m_textureFormat; - - DWORD usage = 0; - - const bool renderTarget = 0 != (m_flags&BGFX_TEXTURE_RT_MASK); - const bool blit = 0 != (m_flags&BGFX_TEXTURE_BLIT_DST); - if (bimg::isDepth(fmt) ) - { - usage = D3DUSAGE_DEPTHSTENCIL; - } - else if (renderTarget || blit) - { - usage = D3DUSAGE_RENDERTARGET; - } - - IDirect3DDevice9* device = s_renderD3D9->m_device; - DX_CHECK(device->CreateCubeTexture(_width - , _numMips - , usage - , s_textureFormat[fmt].m_fmt - , 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)." - , _width - , _numMips - , getName(fmt) - ); - } - - uint8_t* TextureD3D9::lock(uint8_t _side, uint8_t _lod, uint32_t& _pitch, uint32_t& _slicePitch, const Rect* _rect) - { - switch (m_type) - { - case Texture2D: - { - D3DLOCKED_RECT lockedRect; - - if (NULL != _rect) - { - RECT rect; - 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_staging2d->LockRect(_lod, &lockedRect, &rect, 0) ); - DX_CHECK(m_staging2d->AddDirtyRect(&rect) ); - } - else - { - DX_CHECK(m_staging2d->LockRect(_lod, &lockedRect, NULL, 0) ); - DX_CHECK(m_staging2d->AddDirtyRect(NULL) ); - } - - _pitch = lockedRect.Pitch; - _slicePitch = 0; - return (uint8_t*)lockedRect.pBits; - } - - case Texture3D: - { - D3DLOCKED_BOX box; - 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; - } - - case TextureCube: - { - D3DLOCKED_RECT lockedRect; - - if (NULL != _rect) - { - RECT rect; - 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_stagingCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, &rect, 0) ); - DX_CHECK(m_textureCube->AddDirtyRect(D3DCUBEMAP_FACES(_side), &rect) ); - } - else - { - DX_CHECK(m_stagingCube->LockRect(D3DCUBEMAP_FACES(_side), _lod, &lockedRect, NULL, 0) ); - DX_CHECK(m_textureCube->AddDirtyRect(D3DCUBEMAP_FACES(_side), NULL) ); - } - - _pitch = lockedRect.Pitch; - _slicePitch = 0; - return (uint8_t*)lockedRect.pBits; - } - } - - BX_ASSERT(false, "You should not be here."); - _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_staging2d->UnlockRect(_lod) ); - DX_CHECK(device->UpdateTexture(m_staging2d, m_texture2d) ); - } - return; - - case Texture3D: - { - DX_CHECK(m_staging3d->UnlockBox(_lod) ); - DX_CHECK(device->UpdateTexture(m_staging3d, m_texture3d) ); - } - return; - - case TextureCube: - { - DX_CHECK(m_stagingCube->UnlockRect(D3DCUBEMAP_FACES(_side), _lod) ); - DX_CHECK(device->UpdateTexture(m_stagingCube, m_textureCube) ); - } - return; - } - - BX_ASSERT(false, "You should not be here."); - } - - void TextureD3D9::dirty(uint8_t _side, const Rect& _rect, uint16_t _z, uint16_t _depth) - { - switch (m_type) - { - case Texture2D: - { - RECT rect; - 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) ); - } - return; - - case Texture3D: - { - D3DBOX box; - 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; - DX_CHECK(m_texture3d->AddDirtyBox(&box) ); - } - return; - - case TextureCube: - { - RECT rect; - 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) ); - } - return; - } - - BX_ASSERT(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_ASSERT(false, ""); - break; - - case TextureCube: - DX_CHECK(m_textureCube->GetCubeMapSurface(D3DCUBEMAP_FACES(_side), _mip, &surface) ); - break; - } - - return surface; - } - - void TextureD3D9::create(const Memory* _mem, uint64_t _flags, uint8_t _skip) - { - bimg::ImageContainer imageContainer; - - if (bimg::imageParse(imageContainer, _mem->data, _mem->size) ) - { - const bimg::ImageBlockInfo& blockInfo = bimg::getBlockInfo(bimg::TextureFormat::Enum(imageContainer.m_format) ); - - const uint8_t startLod = bx::min(_skip, imageContainer.m_numMips-1); - - bimg::TextureInfo ti; - bimg::imageGetSize( - &ti - , uint16_t(imageContainer.m_width >>startLod) - , uint16_t(imageContainer.m_height>>startLod) - , uint16_t(imageContainer.m_depth >>startLod) - , imageContainer.m_cubeMap - , 1 < imageContainer.m_numMips - , imageContainer.m_numLayers - , imageContainer.m_format - ); - ti.numMips = bx::min(imageContainer.m_numMips-startLod, ti.numMips); - - m_flags = _flags; - m_width = ti.width; - m_height = ti.height; - m_depth = ti.depth; - m_numMips = ti.numMips; - m_requestedFormat = uint8_t(imageContainer.m_format); - m_textureFormat = uint8_t(getViableTextureFormat(imageContainer) ); - const bool convert = m_textureFormat != m_requestedFormat; - - uint8_t bpp = bimg::getBitsPerPixel(bimg::TextureFormat::Enum(m_textureFormat) ); - - if (imageContainer.m_cubeMap) - { - createCubeTexture(ti.width, ti.numMips); - } - else if (imageContainer.m_depth > 1) - { - createVolumeTexture(ti.width, ti.height, ti.depth, ti.numMips); - } - else - { - createTexture(ti.width, ti.height, ti.numMips); - } - - BX_TRACE("Texture %3d: %s (requested: %s), %dx%d%s%s." - , this - s_renderD3D9->m_textures - , getName( (TextureFormat::Enum)m_textureFormat) - , getName( (TextureFormat::Enum)m_requestedFormat) - , ti.width - , ti.height - , imageContainer.m_cubeMap ? "x6" : "" - , 0 != (m_flags&BGFX_TEXTURE_RT_MASK) ? " (render target)" : "" - ); - - if (0 != (_flags&BGFX_TEXTURE_RT_WRITE_ONLY) ) - { - return; - } - - const bool useMipSize = useD3D9Pitch(imageContainer.m_format); - for (uint8_t side = 0, numSides = imageContainer.m_cubeMap ? 6 : 1; side < numSides; ++side) - { - uint32_t width = ti.width; - uint32_t height = ti.height; - uint32_t depth = ti.depth; - uint32_t mipWidth = ti.width; - uint32_t mipHeight = ti.height; - - for (uint8_t lod = 0, num = ti.numMips; lod < num; ++lod) - { - width = bx::max(1, width); - height = bx::max(1, height); - depth = bx::max(1, depth); - mipWidth = bx::max(blockInfo.blockWidth, mipWidth); - mipHeight = bx::max(blockInfo.blockHeight, mipHeight); - uint32_t mipSize = width*height*depth*bpp/8; - - bimg::ImageMip mip; - if (bimg::imageGetRawData(imageContainer, side, lod+startLod, _mem->data, _mem->size, mip) ) - { - uint32_t pitch; - uint32_t slicePitch; - uint8_t* bits = lock(side, lod, pitch, slicePitch); - - if (convert) - { - if (width != mipWidth - || height != mipHeight) - { - uint32_t srcpitch = mipWidth*bpp/8; - - uint8_t* temp = (uint8_t*)bx::alloc(g_allocator, srcpitch*mipHeight); - bimg::imageDecodeToBgra8( - g_allocator - , temp - , mip.m_data - , mip.m_width - , mip.m_height - , srcpitch - , mip.m_format - ); - - bx::memCopy(bits, pitch, temp, srcpitch, pitch, height); - - bx::free(g_allocator, temp); - } - else - { - bimg::imageDecodeToBgra8(g_allocator, bits, mip.m_data, mip.m_width, mip.m_height, pitch, mip.m_format); - } - } - else - { - uint32_t size = useMipSize ? mip.m_size : mipSize; - switch (m_textureFormat) - { - case TextureFormat::R5G6B5: - bimg::imageConvert(bits, 16, bx::packB5G6R5, mip.m_data, bx::unpackR5G6B5, size); - break; - - case TextureFormat::RGBA4: - bimg::imageConvert(bits, 16, bx::packBgra4, mip.m_data, bx::unpackRgba4, size); - break; - - case TextureFormat::RGB5A1: - bimg::imageConvert(bits, 16, bx::packBgr5a1, mip.m_data, bx::unpackRgb5a1, size); - break; - - default: - bx::memCopy(bits, mip.m_data, size); - break; - } - } - - unlock(side, lod); - } - - width >>= 1; - height >>= 1; - depth >>= 1; - mipWidth >>= 1; - mipHeight >>= 1; - } - } - } - } - - void TextureD3D9::updateBegin(uint8_t _side, uint8_t _mip) - { - uint32_t slicePitch; - s_renderD3D9->m_updateTextureSide = _side; - s_renderD3D9->m_updateTextureMip = _mip; - s_renderD3D9->m_updateTextureBits = lock(_side, _mip, s_renderD3D9->m_updateTexturePitch, slicePitch); - } - - void TextureD3D9::update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem) - { - const bimg::ImageBlockInfo & blockInfo = bimg::getBlockInfo(bimg::TextureFormat::Enum(m_textureFormat) ); - const uint16_t blockHeight = blockInfo.blockHeight; - const uint16_t bpp = blockInfo.bitsPerPixel; - const bool useLockedPitch = useD3D9Pitch(bimg::TextureFormat::Enum(m_textureFormat) ); - const uint32_t rectpitch = calcRowPitch(blockInfo, 0, _rect.m_width); - const uint32_t srcpitch = UINT16_MAX == _pitch ? rectpitch : _pitch; - const uint32_t dstpitch = (useLockedPitch) ? s_renderD3D9->m_updateTexturePitch : calcRowPitch(blockInfo, _mip, m_width); - uint8_t* bits = s_renderD3D9->m_updateTextureBits + _rect.m_y*dstpitch/blockHeight + _rect.m_x*blockHeight*bpp/8; - - const bool convert = m_textureFormat != m_requestedFormat; - - uint8_t* data = _mem->data; - uint8_t* temp = NULL; - - if (convert) - { - temp = (uint8_t*)bx::alloc(g_allocator, rectpitch*_rect.m_height); - bimg::imageDecodeToBgra8(g_allocator, temp, data, _rect.m_width, _rect.m_height, srcpitch, bimg::TextureFormat::Enum(m_requestedFormat) ); - data = temp; - } - - { - uint8_t* src = data; - uint8_t* dst = bits; - for (uint32_t yy = 0, height = _rect.m_height; yy < height; yy += blockHeight) - { - switch (m_textureFormat) - { - case TextureFormat::R5G6B5: - bimg::imageConvert(dst, 16, bx::packB5G6R5, src, bx::unpackR5G6B5, rectpitch); - break; - - case TextureFormat::RGBA4: - bimg::imageConvert(dst, 16, bx::packBgra4, src, bx::unpackRgba4, rectpitch); - break; - - case TextureFormat::RGB5A1: - bimg::imageConvert(dst, 16, bx::packBgr5a1, src, bx::unpackRgb5a1, rectpitch); - break; - - default: - bx::memCopy(dst, src, rectpitch); - break; - } - src += srcpitch; - dst += dstpitch; - } - } - - if (NULL != temp) - { - bx::free(g_allocator, temp); - } - - if (0 == _mip) - { - dirty(_side, _rect, _z, _depth); - } - } - - void TextureD3D9::updateEnd() - { - unlock(s_renderD3D9->m_updateTextureSide, s_renderD3D9->m_updateTextureMip); - } - - void TextureD3D9::commit(uint8_t _stage, uint32_t _flags, const float _palette[][4]) - { - const uint64_t flags = (m_flags & BGFX_TEXTURE_SRGB) - | (0 == (BGFX_SAMPLER_INTERNAL_DEFAULT & _flags) ? _flags : uint32_t(m_flags) ) - ; - uint32_t index = (flags & BGFX_SAMPLER_BORDER_COLOR_MASK) >> BGFX_SAMPLER_BORDER_COLOR_SHIFT; - s_renderD3D9->setSamplerState(_stage, flags, _palette[index]); - - IDirect3DDevice9* device = s_renderD3D9->m_device; - DX_CHECK(device->SetTexture(_stage, m_ptr) ); - if (4 > _stage) - { - DX_CHECK(device->SetTexture(D3DVERTEXTEXTURESAMPLER0 + _stage, m_ptr) ); - } - } - - void TextureD3D9::resolve(uint8_t _resolve) const - { - if (NULL != m_surface - && NULL != m_ptr) - { - IDirect3DSurface9* surface = getSurface(); - DX_CHECK(s_renderD3D9->m_device->StretchRect(m_surface - , NULL - , surface - , NULL - , D3DTEXF_LINEAR - ) ); - DX_RELEASE(surface, 1); - - if (1 < m_numMips - && 0 != (_resolve & BGFX_RESOLVE_AUTO_GEN_MIPS) ) - { - m_ptr->GenerateMipSubLevels(); - } - } - } - - void TextureD3D9::preReset() - { - TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat; - if (TextureFormat::Unknown != fmt) - { - DX_RELEASE(m_ptr, 0); - DX_RELEASE(m_surface, 0); - } - } - - void TextureD3D9::postReset() - { - TextureFormat::Enum fmt = (TextureFormat::Enum)m_textureFormat; - if (TextureFormat::Unknown != fmt) - { - 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; - } - } - } - - void FrameBufferD3D9::create(uint8_t _num, const Attachment* _attachment) - { - for (uint32_t ii = 0; ii < BX_COUNTOF(m_surface); ++ii) - { - m_surface[ii] = NULL; - } - - m_denseIdx = UINT16_MAX; - m_dsIdx = UINT8_MAX; - m_num = 0; - m_numTh = _num; - m_needResolve = false; - bx::memCopy(m_attachment, _attachment, _num*sizeof(Attachment) ); - - for (uint32_t ii = 0; ii < _num; ++ii) - { - const Attachment& at = m_attachment[ii]; - - if (isValid(at.handle) ) - { - const TextureD3D9& texture = s_renderD3D9->m_textures[at.handle.idx]; - - if (NULL != texture.m_surface) - { - m_surface[ii] = texture.m_surface; - m_surface[ii]->AddRef(); - } - else - { - m_surface[ii] = texture.getSurface(uint8_t(at.layer), uint8_t(at.mip) ); - } - - if (0 == m_num) - { - m_width = texture.m_width; - m_height = texture.m_height; - } - - if (bimg::isDepth(bimg::TextureFormat::Enum(texture.m_textureFormat) ) ) - { - m_dsIdx = uint8_t(ii); - } - else - { - ++m_num; - } - - m_needResolve |= true - && (NULL != texture.m_surface) - && (NULL != texture.m_texture2d) - ; - } - } - - if (0 == m_num) - { - createNullColorRT(); - } - } - - void FrameBufferD3D9::create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _format, TextureFormat::Enum _depthFormat) - { - BX_UNUSED(_depthFormat); - - m_hwnd = (HWND)_nwh; - - m_width = bx::uint32_max(_width, 16); - m_height = bx::uint32_max(_height, 16); - - D3DPRESENT_PARAMETERS params; - bx::memCopy(¶ms, &s_renderD3D9->m_params, sizeof(D3DPRESENT_PARAMETERS) ); - params.BackBufferFormat = TextureFormat::Count == _format ? params.BackBufferFormat : s_textureFormat[_format].m_fmt; - params.BackBufferWidth = m_width; - params.BackBufferHeight = m_height; - params.MultiSampleType = s_msaa[0].m_type; - params.MultiSampleQuality = s_msaa[0].m_quality; - - DX_CHECK(s_renderD3D9->m_device->CreateAdditionalSwapChain(¶ms, &m_swapChain) ); - DX_CHECK(m_swapChain->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &m_surface[0]) ); - - DX_CHECK(s_renderD3D9->m_device->CreateDepthStencilSurface( - params.BackBufferWidth - , params.BackBufferHeight - , params.AutoDepthStencilFormat - , params.MultiSampleType - , params.MultiSampleQuality - , FALSE - , &m_surface[1] - , NULL - ) ); - - m_dsIdx = 1; - m_denseIdx = _denseIdx; - m_num = 1; - m_needResolve = false; - m_needPresent = false; - } - - uint16_t FrameBufferD3D9::destroy() - { - if (NULL != m_hwnd) - { - DX_RELEASE(m_surface[0], 0); - DX_RELEASE(m_surface[1], 0); - DX_RELEASE(m_swapChain, 0); - } - else - { - uint32_t num = m_numTh; - num += uint32_t(0 < m_numTh && 0 == m_num); - - for (uint32_t ii = 0; ii < num; ++ii) - { - IDirect3DSurface9* ptr = m_surface[ii]; - if (NULL != ptr) - { - ptr->Release(); - m_surface[ii] = NULL; - } - } - } - - m_hwnd = NULL; - m_num = 0; - m_numTh = 0; - m_needPresent = false; - - uint16_t denseIdx = m_denseIdx; - m_denseIdx = UINT16_MAX; - - return denseIdx; - } - - HRESULT FrameBufferD3D9::present() - { - if (m_needPresent) - { - HRESULT hr = m_swapChain->Present(NULL, NULL, m_hwnd, NULL, 0); - m_needPresent = false; - return hr; - } - - return S_OK; - } - - void FrameBufferD3D9::resolve() const - { - if (m_needResolve) - { - for (uint32_t ii = 0, num = m_numTh; ii < num; ++ii) - { - const Attachment& at = m_attachment[ii]; - - if (isValid(at.handle) ) - { - const TextureD3D9& texture = s_renderD3D9->m_textures[at.handle.idx]; - texture.resolve(at.resolve); - } - } - } - } - - void FrameBufferD3D9::preReset() - { - if (NULL != m_hwnd) - { - DX_RELEASE(m_surface[0], 0); - DX_RELEASE(m_surface[1], 0); - DX_RELEASE(m_swapChain, 0); - } - else - { - uint32_t num = m_numTh; - num += uint32_t(0 < m_numTh && 0 == m_num); - - for (uint32_t ii = 0; ii < num; ++ii) - { - m_surface[ii]->Release(); - m_surface[ii] = NULL; - } - } - } - - void FrameBufferD3D9::postReset() - { - if (NULL != m_hwnd) - { - D3DPRESENT_PARAMETERS params; - bx::memCopy(¶ms, &s_renderD3D9->m_params, sizeof(D3DPRESENT_PARAMETERS) ); - params.BackBufferWidth = m_width; - params.BackBufferHeight = m_height; - - DX_CHECK(s_renderD3D9->m_device->CreateAdditionalSwapChain(¶ms, &m_swapChain) ); - DX_CHECK(m_swapChain->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &m_surface[0]) ); - DX_CHECK(s_renderD3D9->m_device->CreateDepthStencilSurface(params.BackBufferWidth - , params.BackBufferHeight - , params.AutoDepthStencilFormat - , params.MultiSampleType - , params.MultiSampleQuality - , FALSE - , &m_surface[1] - , NULL - ) ); - } - else if (0 < m_numTh) - { - for (uint32_t ii = 0, num = m_numTh; ii < num; ++ii) - { - const Attachment& at = m_attachment[ii]; - - if (isValid(at.handle) ) - { - TextureD3D9& texture = s_renderD3D9->m_textures[at.handle.idx]; - - if (NULL != texture.m_surface) - { - m_surface[ii] = texture.m_surface; - m_surface[ii]->AddRef(); - } - else if (Access::Write == at.access) - { - m_surface[ii] = texture.getSurface(uint8_t(at.layer), uint8_t(at.mip) ); - } - else - { - BX_ASSERT(false, ""); - } - } - } - - if (0 == m_num) - { - createNullColorRT(); - } - } - } - - void FrameBufferD3D9::createNullColorRT() - { - DX_CHECK(s_renderD3D9->m_device->CreateRenderTarget( - m_width - , m_height - , D3DFMT_NULL - , D3DMULTISAMPLE_NONE - , 0 - , false - , &m_surface[1] - , NULL - ) ); - } - - void FrameBufferD3D9::set() - { - m_needPresent = UINT16_MAX != m_denseIdx; - - // If frame buffer has only depth attachment D3DFMT_NULL - // render target is created. - const uint32_t fbnum = bx::uint32_max(2, m_numTh); - const uint8_t dsIdx = m_dsIdx; - - IDirect3DDevice9* device = s_renderD3D9->m_device; - - DX_CHECK(device->SetDepthStencilSurface(UINT8_MAX == dsIdx - ? s_renderD3D9->m_backBufferDepthStencil - : m_surface[dsIdx] - ) ); - - uint32_t rtIdx = 0; - for (uint32_t ii = 0; ii < fbnum; ++ii) - { - IDirect3DSurface9* surface = m_surface[ii]; - if (ii != dsIdx) - { - DX_CHECK(device->SetRenderTarget(rtIdx, surface) ); - ++rtIdx; - } - } - - for (uint32_t ii = rtIdx, num = g_caps.limits.maxFBAttachments; ii < num; ++ii) - { - DX_CHECK(device->SetRenderTarget(ii, NULL) ); - } - - DX_CHECK(device->SetRenderState(D3DRS_SRGBWRITEENABLE, FALSE) ); - } - - void TimerQueryD3D9::postReset() - { - IDirect3DDevice9* device = s_renderD3D9->m_device; - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_query); ++ii) - { - Query& frame = m_query[ii]; - DX_CHECK(device->CreateQuery(D3DQUERYTYPE_TIMESTAMPDISJOINT, &frame.m_disjoint) ); - DX_CHECK(device->CreateQuery(D3DQUERYTYPE_TIMESTAMP, &frame.m_begin) ); - DX_CHECK(device->CreateQuery(D3DQUERYTYPE_TIMESTAMP, &frame.m_end) ); - DX_CHECK(device->CreateQuery(D3DQUERYTYPE_TIMESTAMPFREQ, &frame.m_freq) ); - } - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_result); ++ii) - { - Result& result = m_result[ii]; - result.reset(); - } - - m_control.reset(); - } - - void TimerQueryD3D9::preReset() - { - for (uint32_t ii = 0; ii < BX_COUNTOF(m_query); ++ii) - { - Query& frame = m_query[ii]; - DX_RELEASE(frame.m_disjoint, 0); - DX_RELEASE(frame.m_begin, 0); - DX_RELEASE(frame.m_end, 0); - DX_RELEASE(frame.m_freq, 0); - } - } - - uint32_t TimerQueryD3D9::begin(uint32_t _resultIdx, uint32_t _frameNum) - { - while (0 == m_control.reserve(1) ) - { - update(); - } - - Result& result = m_result[_resultIdx]; - ++result.m_pending; - - const uint32_t idx = m_control.m_current; - Query& query = m_query[idx]; - query.m_resultIdx = _resultIdx; - query.m_ready = false; - query.m_frameNum = _frameNum; - - query.m_disjoint->Issue(D3DISSUE_BEGIN); - query.m_begin->Issue(D3DISSUE_END); - - m_control.commit(1); - - return idx; - } - - void TimerQueryD3D9::end(uint32_t _idx) - { - Query& query = m_query[_idx]; - query.m_ready = true; - - query.m_disjoint->Issue(D3DISSUE_END); - query.m_freq->Issue(D3DISSUE_END); - query.m_end->Issue(D3DISSUE_END); - - while (update() ) - { - } - } - - bool TimerQueryD3D9::update() - { - if (0 != m_control.available() ) - { - Query& query = m_query[m_control.m_read]; - - if (!query.m_ready) - { - return false; - } - - uint64_t timeEnd; - const bool flush = BX_COUNTOF(m_query)-1 == m_control.available(); - HRESULT hr = query.m_end->GetData(&timeEnd, sizeof(timeEnd), flush ? D3DGETDATA_FLUSH : 0); - if (S_OK == hr - || isLost(hr) ) - { - m_control.consume(1); - - uint64_t timeBegin; - DX_CHECK(query.m_begin->GetData(&timeBegin, sizeof(timeBegin), 0) ); - - uint64_t freq; - DX_CHECK(query.m_freq->GetData(&freq, sizeof(freq), 0) ); - - Result& result = m_result[query.m_resultIdx]; - --result.m_pending; - result.m_frameNum = query.m_frameNum; - - result.m_frequency = freq; - result.m_begin = timeBegin; - result.m_end = timeEnd; - - return true; - } - } - - return false; - } - - void OcclusionQueryD3D9::postReset() - { - IDirect3DDevice9* device = s_renderD3D9->m_device; - - for (uint32_t ii = 0; ii < BX_COUNTOF(m_query); ++ii) - { - Query& query = m_query[ii]; - DX_CHECK(device->CreateQuery(D3DQUERYTYPE_OCCLUSION, &query.m_ptr) ); - } - } - - void OcclusionQueryD3D9::preReset() - { - for (uint32_t ii = 0; ii < BX_COUNTOF(m_query); ++ii) - { - Query& query = m_query[ii]; - DX_RELEASE(query.m_ptr, 0); - } - } - - void OcclusionQueryD3D9::begin(Frame* _render, OcclusionQueryHandle _handle) - { - while (0 == m_control.reserve(1) ) - { - resolve(_render, true); - } - - Query& query = m_query[m_control.m_current]; - query.m_ptr->Issue(D3DISSUE_BEGIN); - query.m_handle = _handle; - } - - void OcclusionQueryD3D9::end() - { - Query& query = m_query[m_control.m_current]; - query.m_ptr->Issue(D3DISSUE_END); - m_control.commit(1); - } - - void OcclusionQueryD3D9::resolve(Frame* _render, bool) - { - while (0 != m_control.available() ) - { - Query& query = m_query[m_control.m_read]; - - if (isValid(query.m_handle) ) - { - uint32_t result; - HRESULT hr = query.m_ptr->GetData(&result, sizeof(result), 0); - if (S_FALSE == hr) - { - break; - } - - _render->m_occlusion[query.m_handle.idx] = int32_t(result); - } - - m_control.consume(1); - } - } - - void OcclusionQueryD3D9::invalidate(OcclusionQueryHandle _handle) - { - const uint32_t size = m_control.m_size; - - for (uint32_t ii = 0, num = m_control.available(); ii < num; ++ii) - { - Query& query = m_query[(m_control.m_read + ii) % size]; - if (query.m_handle.idx == _handle.idx) - { - query.m_handle.idx = bgfx::kInvalidHandle; - } - } - } - - void RendererContextD3D9::submitBlit(BlitState& _bs, uint16_t _view) - { - while (_bs.hasItem(_view) ) - { - const BlitItem& blit = _bs.advance(); - - const TextureD3D9& src = m_textures[blit.m_src.idx]; - const TextureD3D9& dst = m_textures[blit.m_dst.idx]; - - RECT srcRect = { LONG(blit.m_srcX), LONG(blit.m_srcY), LONG(blit.m_srcX + blit.m_width), LONG(blit.m_srcY + blit.m_height) }; - RECT dstRect = { LONG(blit.m_dstX), LONG(blit.m_dstY), LONG(blit.m_dstX + blit.m_width), LONG(blit.m_dstY + blit.m_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) - - bool depth = bimg::isDepth(bimg::TextureFormat::Enum(src.m_textureFormat) ); - HRESULT hr = m_device->StretchRect(srcSurface - , depth ? NULL : &srcRect - , dstSurface - , depth ? NULL : &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(); - } - } - - void RendererContextD3D9::submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter) - { - IDirect3DDevice9* device = m_device; - - updateResolution(_render->m_resolution); - - BGFX_D3D9_PROFILER_BEGIN_LITERAL("rendererSubmit", kColorView); - - int64_t timeBegin = bx::getHPCounter(); - int64_t captureElapsed = 0; - - uint32_t frameQueryIdx = UINT32_MAX; - - device->BeginScene(); - if (m_timerQuerySupport) - { - frameQueryIdx = m_gpuTimer.begin(BGFX_CONFIG_MAX_VIEWS, _render->m_frameNum); - } - - if (0 < _render->m_iboffset) - { - BGFX_PROFILER_SCOPE("bgfx/Update transient index buffer", kColorResource); - TransientIndexBuffer* ib = _render->m_transientIb; - m_indexBuffers[ib->handle.idx].update(0, _render->m_iboffset, ib->data, true); - } - - if (0 < _render->m_vboffset) - { - BGFX_PROFILER_SCOPE("bgfx/Update transient vertex buffer", kColorResource); - TransientVertexBuffer* vb = _render->m_transientVb; - m_vertexBuffers[vb->handle.idx].update(0, _render->m_vboffset, vb->data, true); - } - - _render->sort(); - - RenderDraw currentState; - currentState.clear(); - currentState.m_stateFlags = BGFX_STATE_NONE; - currentState.m_stencil = packStencil(BGFX_STENCIL_NONE, BGFX_STENCIL_NONE); - - RenderBind currentBind; - currentBind.clear(); - - static ViewState viewState; - viewState.reset(_render); - - DX_CHECK(device->SetRenderState(D3DRS_FILLMODE, _render->m_debug&BGFX_DEBUG_WIREFRAME ? D3DFILL_WIREFRAME : D3DFILL_SOLID) ); - ProgramHandle currentProgram = BGFX_INVALID_HANDLE; - SortKey key; - uint16_t view = UINT16_MAX; - FrameBufferHandle fbh = { BGFX_CONFIG_MAX_FRAME_BUFFERS }; - uint32_t blendFactor = 0; - - BlitState bs(_render); - - uint8_t primIndex; - { - const uint64_t pt = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0; - primIndex = uint8_t(pt>>BGFX_STATE_PT_SHIFT); - } - PrimInfo prim = s_primInfo[primIndex]; - - bool viewHasScissor = false; - Rect viewScissorRect; - viewScissorRect.clear(); - - uint32_t statsNumPrimsSubmitted[BX_COUNTOF(s_primInfo)] = {}; - uint32_t statsNumPrimsRendered[BX_COUNTOF(s_primInfo)] = {}; - uint32_t statsNumInstances[BX_COUNTOF(s_primInfo)] = {}; - uint32_t statsNumIndices = 0; - uint32_t statsKeyType[2] = {}; - - invalidateSamplerState(); - - Profiler profiler( - _render - , m_gpuTimer - , s_viewName - , m_timerQuerySupport - ); - - if (m_occlusionQuerySupport) - { - m_occlusionQuery.resolve(_render); - } - - if (0 == (_render->m_debug&BGFX_DEBUG_IFH) ) - { - for (uint32_t item = 0, numItems = _render->m_numRenderItems; item < numItems; ++item) - { - const uint64_t encodedKey = _render->m_sortKeys[item]; - const bool isCompute = key.decode(encodedKey, _render->m_viewRemap); - statsKeyType[isCompute]++; - - if (isCompute) - { - BX_ASSERT(false, "Compute is not supported on DirectX 9."); - continue; - } - - const uint32_t itemIdx = _render->m_sortValues[item]; - const RenderDraw& draw = _render->m_renderItem[itemIdx].draw; - const RenderBind& renderBind = _render->m_renderItemBind[itemIdx]; - - const bool hasOcclusionQuery = 0 != (draw.m_stateFlags & BGFX_STATE_INTERNAL_OCCLUSION_QUERY); - { - const bool occluded = true - && isValid(draw.m_occlusionQuery) - && !hasOcclusionQuery - && !isVisible(_render, draw.m_occlusionQuery, 0 != (draw.m_submitFlags&BGFX_SUBMIT_INTERNAL_OCCLUSION_VISIBLE) ) - ; - - if (occluded - || _render->m_frameCache.isZeroArea(viewScissorRect, draw.m_scissor) ) - { - continue; - } - } - - const uint64_t newFlags = draw.m_stateFlags; - uint64_t changedFlags = currentState.m_stateFlags ^ draw.m_stateFlags; - currentState.m_stateFlags = newFlags; - - const uint64_t newStencil = draw.m_stencil; - uint64_t changedStencil = currentState.m_stencil ^ draw.m_stencil; - currentState.m_stencil = newStencil; - - if (key.m_view != view) - { - currentState.clear(); - currentState.m_scissor = !draw.m_scissor; - changedFlags = BGFX_STATE_MASK; - changedStencil = packStencil(BGFX_STENCIL_MASK, BGFX_STENCIL_MASK); - currentState.m_stateFlags = newFlags; - currentState.m_stencil = newStencil; - - view = key.m_view; - currentProgram = BGFX_INVALID_HANDLE; - - if (item > 0) - { - profiler.end(); - } - - BGFX_D3D9_PROFILER_END(); - BGFX_D3D9_PROFILER_BEGIN(view, kColorView); - - profiler.begin(view); - - if (_render->m_view[view].m_fbh.idx != fbh.idx) - { - fbh = _render->m_view[view].m_fbh; - setFrameBuffer(fbh); - } - - viewState.m_rect = _render->m_view[view].m_rect; - const Rect& scissorRect = _render->m_view[view].m_scissor; - viewHasScissor = !scissorRect.isZero(); - viewScissorRect = viewHasScissor ? scissorRect : viewState.m_rect; - - D3DVIEWPORT9 vp; - vp.X = viewState.m_rect.m_x; - vp.Y = viewState.m_rect.m_y; - vp.Width = viewState.m_rect.m_width; - vp.Height = viewState.m_rect.m_height; - vp.MinZ = 0.0f; - vp.MaxZ = 1.0f; - DX_CHECK(device->SetViewport(&vp) ); - - Clear& clear = _render->m_view[view].m_clear; - - if (BGFX_CLEAR_NONE != (clear.m_flags & BGFX_CLEAR_MASK) ) - { - clearQuad(_clearQuad, viewState.m_rect, clear, _render->m_colorPalette); - } - - DX_CHECK(device->SetRenderState(D3DRS_STENCILENABLE, FALSE) ); - DX_CHECK(device->SetRenderState(D3DRS_ZENABLE, TRUE) ); - DX_CHECK(device->SetRenderState(D3DRS_ZFUNC, D3DCMP_LESS) ); - DX_CHECK(device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE) ); - DX_CHECK(device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE) ); - DX_CHECK(device->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATER) ); - - submitBlit(bs, view); - } - - uint16_t scissor = draw.m_scissor; - if (currentState.m_scissor != scissor) - { - currentState.m_scissor = scissor; - - if (UINT16_MAX == scissor) - { - DX_CHECK(device->SetRenderState(D3DRS_SCISSORTESTENABLE, viewHasScissor) ); - if (viewHasScissor) - { - RECT rc; - rc.left = viewScissorRect.m_x; - rc.top = viewScissorRect.m_y; - rc.right = viewScissorRect.m_x + viewScissorRect.m_width; - rc.bottom = viewScissorRect.m_y + viewScissorRect.m_height; - DX_CHECK(device->SetScissorRect(&rc) ); - } - } - else - { - Rect scissorRect; - scissorRect.setIntersect(viewScissorRect, _render->m_frameCache.m_rectCache.m_cache[scissor]); - - DX_CHECK(device->SetRenderState(D3DRS_SCISSORTESTENABLE, true) ); - RECT rc; - rc.left = scissorRect.m_x; - rc.top = scissorRect.m_y; - rc.right = scissorRect.m_x + scissorRect.m_width; - rc.bottom = scissorRect.m_y + scissorRect.m_height; - DX_CHECK(device->SetScissorRect(&rc) ); - } - } - - if (0 != changedStencil) - { - bool enable = 0 != newStencil; - DX_CHECK(device->SetRenderState(D3DRS_STENCILENABLE, enable) ); - - if (0 != newStencil) - { - uint32_t fstencil = unpackStencil(0, newStencil); - uint32_t bstencil = unpackStencil(1, newStencil); - uint8_t frontAndBack = bstencil != BGFX_STENCIL_NONE && bstencil != fstencil; - DX_CHECK(device->SetRenderState(D3DRS_TWOSIDEDSTENCILMODE, 0 != frontAndBack) ); - - uint32_t fchanged = unpackStencil(0, changedStencil); - if ( (BGFX_STENCIL_FUNC_REF_MASK|BGFX_STENCIL_FUNC_RMASK_MASK) & fchanged) - { - uint32_t ref = (fstencil&BGFX_STENCIL_FUNC_REF_MASK)>>BGFX_STENCIL_FUNC_REF_SHIFT; - DX_CHECK(device->SetRenderState(D3DRS_STENCILREF, ref) ); - - uint32_t rmask = (fstencil&BGFX_STENCIL_FUNC_RMASK_MASK)>>BGFX_STENCIL_FUNC_RMASK_SHIFT; - DX_CHECK(device->SetRenderState(D3DRS_STENCILMASK, rmask) ); - } - -// uint32_t bchanged = unpackStencil(1, changedStencil); -// if (BGFX_STENCIL_FUNC_RMASK_MASK & bchanged) -// { -// uint32_t wmask = (bstencil&BGFX_STENCIL_FUNC_RMASK_MASK)>>BGFX_STENCIL_FUNC_RMASK_SHIFT; -// DX_CHECK(device->SetRenderState(D3DRS_STENCILWRITEMASK, wmask) ); -// } - - for (uint8_t ii = 0, num = frontAndBack+1; ii < num; ++ii) - { - uint32_t stencil = unpackStencil(ii, newStencil); - uint32_t changed = unpackStencil(ii, changedStencil); - - if ( (BGFX_STENCIL_TEST_MASK|BGFX_STENCIL_FUNC_REF_MASK|BGFX_STENCIL_FUNC_RMASK_MASK) & changed) - { - uint32_t func = (stencil&BGFX_STENCIL_TEST_MASK)>>BGFX_STENCIL_TEST_SHIFT; - DX_CHECK(device->SetRenderState(s_stencilFuncRs[ii], s_cmpFunc[func]) ); - } - - if ( (BGFX_STENCIL_OP_FAIL_S_MASK|BGFX_STENCIL_OP_FAIL_Z_MASK|BGFX_STENCIL_OP_PASS_Z_MASK) & changed) - { - uint32_t sfail = (stencil&BGFX_STENCIL_OP_FAIL_S_MASK)>>BGFX_STENCIL_OP_FAIL_S_SHIFT; - DX_CHECK(device->SetRenderState(s_stencilFailRs[ii], s_stencilOp[sfail]) ); - - uint32_t zfail = (stencil&BGFX_STENCIL_OP_FAIL_Z_MASK)>>BGFX_STENCIL_OP_FAIL_Z_SHIFT; - DX_CHECK(device->SetRenderState(s_stencilZFailRs[ii], s_stencilOp[zfail]) ); - - uint32_t zpass = (stencil&BGFX_STENCIL_OP_PASS_Z_MASK)>>BGFX_STENCIL_OP_PASS_Z_SHIFT; - DX_CHECK(device->SetRenderState(s_stencilZPassRs[ii], s_stencilOp[zpass]) ); - } - } - } - } - - if ( (0 - | BGFX_STATE_CULL_MASK -// | BGFX_STATE_FRONT_CCW - | BGFX_STATE_WRITE_Z - | BGFX_STATE_DEPTH_TEST_MASK - | BGFX_STATE_WRITE_RGB - | BGFX_STATE_WRITE_A - | BGFX_STATE_BLEND_MASK - | BGFX_STATE_BLEND_EQUATION_MASK - | BGFX_STATE_ALPHA_REF_MASK - | BGFX_STATE_PT_MASK - | BGFX_STATE_POINT_SIZE_MASK - | BGFX_STATE_MSAA - ) & changedFlags) - { - if (BGFX_STATE_CULL_MASK & changedFlags) - { - uint32_t cull = (newFlags&BGFX_STATE_CULL_MASK)>>BGFX_STATE_CULL_SHIFT; - DX_CHECK(device->SetRenderState(D3DRS_CULLMODE, s_cullMode[cull]) ); - } - - if (BGFX_STATE_WRITE_Z & changedFlags) - { - DX_CHECK(device->SetRenderState(D3DRS_ZWRITEENABLE, !!(BGFX_STATE_WRITE_Z & newFlags) ) ); - } - - if (BGFX_STATE_DEPTH_TEST_MASK & changedFlags) - { - uint32_t func = (newFlags&BGFX_STATE_DEPTH_TEST_MASK)>>BGFX_STATE_DEPTH_TEST_SHIFT; - DX_CHECK(device->SetRenderState(D3DRS_ZENABLE, 0 != func) ); - - if (0 != func) - { - DX_CHECK(device->SetRenderState(D3DRS_ZFUNC, s_cmpFunc[func]) ); - } - } - - if (BGFX_STATE_ALPHA_REF_MASK & changedFlags) - { - uint32_t ref = (newFlags&BGFX_STATE_ALPHA_REF_MASK)>>BGFX_STATE_ALPHA_REF_SHIFT; - viewState.m_alphaRef = ref/255.0f; - } - - if ( (BGFX_STATE_PT_POINTS|BGFX_STATE_POINT_SIZE_MASK) & changedFlags) - { - DX_CHECK(device->SetRenderState(D3DRS_POINTSIZE, castfu( (float)( (newFlags&BGFX_STATE_POINT_SIZE_MASK)>>BGFX_STATE_POINT_SIZE_SHIFT) ) ) ); - } - - if (BGFX_STATE_MSAA & changedFlags) - { - DX_CHECK(device->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, (newFlags&BGFX_STATE_MSAA) == BGFX_STATE_MSAA) ); - } - - if (BGFX_STATE_LINEAA & changedFlags) - { - DX_CHECK(m_device->SetRenderState(D3DRS_ANTIALIASEDLINEENABLE, !!(newFlags&BGFX_STATE_LINEAA) ) ); - } - - if ( (BGFX_STATE_WRITE_A|BGFX_STATE_WRITE_RGB) & changedFlags) - { - uint32_t writeEnable = 0; - writeEnable |= (newFlags&BGFX_STATE_WRITE_R) ? D3DCOLORWRITEENABLE_RED : 0; - writeEnable |= (newFlags&BGFX_STATE_WRITE_G) ? D3DCOLORWRITEENABLE_GREEN : 0; - writeEnable |= (newFlags&BGFX_STATE_WRITE_B) ? D3DCOLORWRITEENABLE_BLUE : 0; - writeEnable |= (newFlags&BGFX_STATE_WRITE_A) ? D3DCOLORWRITEENABLE_ALPHA : 0; - DX_CHECK(device->SetRenderState(D3DRS_COLORWRITEENABLE, writeEnable) ); - } - - if ( ( (0 - | BGFX_STATE_BLEND_MASK - | BGFX_STATE_BLEND_EQUATION_MASK - | BGFX_STATE_BLEND_ALPHA_TO_COVERAGE - ) & changedFlags) - || blendFactor != draw.m_rgba) - { - bool enabled = !!(BGFX_STATE_BLEND_MASK & newFlags); - DX_CHECK(device->SetRenderState(D3DRS_ALPHABLENDENABLE, enabled) ); - - if (m_atocSupport - && BGFX_STATE_BLEND_ALPHA_TO_COVERAGE & changedFlags) - { - DX_CHECK(m_device->SetRenderState(D3DRS_ADAPTIVETESS_Y - , !!(newFlags&BGFX_STATE_BLEND_ALPHA_TO_COVERAGE) - ? D3DFMT_ATOC - : 0 - ) ); - } - - if (enabled) - { - const uint32_t blend = uint32_t( (newFlags&BGFX_STATE_BLEND_MASK)>>BGFX_STATE_BLEND_SHIFT); - const uint32_t equation = uint32_t( (newFlags&BGFX_STATE_BLEND_EQUATION_MASK)>>BGFX_STATE_BLEND_EQUATION_SHIFT); - - const uint32_t srcRGB = (blend )&0xf; - const uint32_t dstRGB = (blend>> 4)&0xf; - const uint32_t srcA = (blend>> 8)&0xf; - const uint32_t dstA = (blend>>12)&0xf; - - const uint32_t equRGB = (equation )&0x7; - const uint32_t equA = (equation>>3)&0x7; - - DX_CHECK(device->SetRenderState(D3DRS_SRCBLEND, s_blendFactor[srcRGB].m_src) ); - DX_CHECK(device->SetRenderState(D3DRS_DESTBLEND, s_blendFactor[dstRGB].m_dst) ); - DX_CHECK(device->SetRenderState(D3DRS_BLENDOP, s_blendEquation[equRGB]) ); - - const bool separate = srcRGB != srcA || dstRGB != dstA || equRGB != equA; - - DX_CHECK(device->SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, separate) ); - if (separate) - { - DX_CHECK(device->SetRenderState(D3DRS_SRCBLENDALPHA, s_blendFactor[srcA].m_src) ); - DX_CHECK(device->SetRenderState(D3DRS_DESTBLENDALPHA, s_blendFactor[dstA].m_dst) ); - DX_CHECK(device->SetRenderState(D3DRS_BLENDOPALPHA, s_blendEquation[equA]) ); - } - - if ( (s_blendFactor[srcRGB].m_factor || s_blendFactor[dstRGB].m_factor) - && blendFactor != draw.m_rgba) - { - const uint32_t rgba = draw.m_rgba; - D3DCOLOR color = D3DCOLOR_RGBA( - rgba>>24 - , (rgba>>16)&0xff - , (rgba>> 8)&0xff - , (rgba )&0xff - ); - DX_CHECK(device->SetRenderState(D3DRS_BLENDFACTOR, color) ); - } - } - - blendFactor = draw.m_rgba; - } - - const uint64_t pt = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : newFlags&BGFX_STATE_PT_MASK; - primIndex = uint8_t(pt>>BGFX_STATE_PT_SHIFT); - prim = s_primInfo[primIndex]; - } - - bool programChanged = false; - bool constantsChanged = draw.m_uniformBegin < draw.m_uniformEnd; - rendererUpdateUniforms(this, _render->m_uniformBuffer[draw.m_uniformIdx], draw.m_uniformBegin, draw.m_uniformEnd); - - if (key.m_program.idx != currentProgram.idx) - { - currentProgram = key.m_program; - - if (!isValid(currentProgram) ) - { - device->SetVertexShader(NULL); - device->SetPixelShader(NULL); - } - else - { - ProgramD3D9& program = m_program[currentProgram.idx]; - device->SetVertexShader(program.m_vsh->m_vertexShader); - device->SetPixelShader(NULL == program.m_fsh - ? NULL - : program.m_fsh->m_pixelShader - ); - } - - programChanged = - constantsChanged = true; - } - - if (isValid(currentProgram) ) - { - ProgramD3D9& program = m_program[currentProgram.idx]; - - if (constantsChanged) - { - UniformBuffer* vcb = program.m_vsh->m_constantBuffer; - if (NULL != vcb) - { - commit(*vcb); - } - - if (NULL != program.m_fsh) - { - UniformBuffer* fcb = program.m_fsh->m_constantBuffer; - if (NULL != fcb) - { - commit(*fcb); - } - } - } - - viewState.setPredefined<4>(this, view, program, _render, draw); - } - - { - for (uint8_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage) - { - const Binding& bind = renderBind.m_bind[stage]; - Binding& current = currentBind.m_bind[stage]; - - if (current.m_idx != bind.m_idx - || current.m_samplerFlags != bind.m_samplerFlags - || programChanged) - { - if (kInvalidHandle != bind.m_idx) - { - m_textures[bind.m_idx].commit(stage, bind.m_samplerFlags, _render->m_colorPalette); - } - else - { - DX_CHECK(device->SetTexture(stage, NULL) ); - } - } - - current = bind; - } - } - - bool vertexStreamChanged = hasVertexStreamChanged(currentState, draw); - - if (programChanged - || vertexStreamChanged) - { - currentState.m_streamMask = draw.m_streamMask; - currentState.m_instanceDataBuffer.idx = draw.m_instanceDataBuffer.idx; - currentState.m_instanceDataOffset = draw.m_instanceDataOffset; - currentState.m_instanceDataStride = draw.m_instanceDataStride; - - const VertexLayout* layouts[BGFX_CONFIG_MAX_VERTEX_STREAMS]; - - const bool instanced = true - && isValid(draw.m_instanceDataBuffer) - && m_instancingSupport - ; - - const uint32_t freq = instanced - ? D3DSTREAMSOURCE_INDEXEDDATA|draw.m_numInstances - : 1 - ; - - uint32_t numVertices = draw.m_numVertices; - uint8_t numStreams = 0; - for (uint32_t idx = 0, streamMask = draw.m_streamMask - ; 0 != streamMask - ; streamMask >>= 1, idx += 1, ++numStreams - ) - { - const uint32_t ntz = bx::uint32_cnttz(streamMask); - streamMask >>= ntz; - idx += ntz; - - currentState.m_stream[idx].m_layoutHandle = draw.m_stream[idx].m_layoutHandle; - currentState.m_stream[idx].m_handle = draw.m_stream[idx].m_handle; - currentState.m_stream[idx].m_startVertex = draw.m_stream[idx].m_startVertex; - - const uint16_t handle = draw.m_stream[idx].m_handle.idx; - const VertexBufferD3D9& vb = m_vertexBuffers[handle]; - const uint16_t layoutIdx = isValid(draw.m_stream[idx].m_layoutHandle) - ? draw.m_stream[idx].m_layoutHandle.idx - : vb.m_layoutHandle.idx; - const VertexLayout& layout = m_vertexLayouts[layoutIdx]; - const uint32_t stride = layout.m_stride; - - layouts[numStreams] = &layout; - - numVertices = bx::uint32_min(UINT32_MAX == draw.m_numVertices - ? vb.m_size/stride - : draw.m_numVertices - , numVertices - ); - - DX_CHECK(device->SetStreamSourceFreq(0, freq) ); - DX_CHECK(device->SetStreamSource(numStreams, vb.m_ptr, 0, stride) ); - } - - if (0 < numStreams) - { - if (instanced) - { - const VertexBufferD3D9& inst = m_vertexBuffers[draw.m_instanceDataBuffer.idx]; - DX_CHECK(device->SetStreamSourceFreq(numStreams, UINT(D3DSTREAMSOURCE_INSTANCEDATA|1) ) ); - DX_CHECK(device->SetStreamSource(numStreams, inst.m_ptr, draw.m_instanceDataOffset, draw.m_instanceDataStride) ); - setInputLayout(numStreams, layouts, draw.m_instanceDataStride/16); - } - else - { - DX_CHECK(device->SetStreamSource(numStreams, NULL, 0, 0) ); - setInputLayout(numStreams, layouts, 0); - } - } - else - { - DX_CHECK(device->SetStreamSource(0, NULL, 0, 0) ); - DX_CHECK(device->SetStreamSource(1, NULL, 0, 0) ); - } - } - - if (currentState.m_indexBuffer.idx != draw.m_indexBuffer.idx) - { - currentState.m_indexBuffer = draw.m_indexBuffer; - - uint16_t handle = draw.m_indexBuffer.idx; - if (kInvalidHandle != handle) - { - const IndexBufferD3D9& ib = m_indexBuffers[handle]; - DX_CHECK(device->SetIndices(ib.m_ptr) ); - } - else - { - DX_CHECK(device->SetIndices(NULL) ); - } - } - - if (0 != currentState.m_streamMask) - { - uint32_t numVertices = draw.m_numVertices; - uint32_t numIndices = 0; - uint32_t numPrimsSubmitted = 0; - uint32_t numInstances = 0; - uint32_t numPrimsRendered = 0; - - if (hasOcclusionQuery) - { - m_occlusionQuery.begin(_render, draw.m_occlusionQuery); - } - - if (isValid(draw.m_indexBuffer) ) - { - if (UINT32_MAX == draw.m_numIndices) - { - const IndexBufferD3D9& ib = m_indexBuffers[draw.m_indexBuffer.idx]; - const bool isIndex16 = draw.isIndex16(); - const uint32_t indexSize = isIndex16 ? 2 : 4; - numIndices = ib.m_size/indexSize; - numPrimsSubmitted = numIndices/prim.m_div - prim.m_sub; - numInstances = draw.m_numInstances; - numPrimsRendered = numPrimsSubmitted*draw.m_numInstances; - - DX_CHECK(device->DrawIndexedPrimitive(prim.m_type - , draw.m_stream[0].m_startVertex - , 0 - , numVertices - , 0 - , numPrimsSubmitted - ) ); - } - else if (prim.m_min <= draw.m_numIndices) - { - numIndices = draw.m_numIndices; - numPrimsSubmitted = numIndices/prim.m_div - prim.m_sub; - numInstances = draw.m_numInstances; - numPrimsRendered = numPrimsSubmitted*draw.m_numInstances; - - DX_CHECK(device->DrawIndexedPrimitive(prim.m_type - , draw.m_stream[0].m_startVertex - , 0 - , numVertices - , draw.m_startIndex - , numPrimsSubmitted - ) ); - } - } - else - { - numPrimsSubmitted = numVertices/prim.m_div - prim.m_sub; - numInstances = draw.m_numInstances; - numPrimsRendered = numPrimsSubmitted*draw.m_numInstances; - - DX_CHECK(device->DrawPrimitive(prim.m_type - , draw.m_stream[0].m_startVertex - , numPrimsSubmitted - ) ); - } - - if (hasOcclusionQuery) - { - m_occlusionQuery.end(); - } - - statsNumPrimsSubmitted[primIndex] += numPrimsSubmitted; - statsNumPrimsRendered[primIndex] += numPrimsRendered; - statsNumInstances[primIndex] += numInstances; - statsNumIndices += numIndices; - } - } - - submitBlit(bs, BGFX_CONFIG_MAX_VIEWS); - - if (0 < _render->m_numRenderItems) - { - if (0 != (m_resolution.reset & BGFX_RESET_FLUSH_AFTER_RENDER) ) - { - flush(); - } - - captureElapsed = -bx::getHPCounter(); - capture(); - captureElapsed += bx::getHPCounter(); - - profiler.end(); - } - } - - BGFX_D3D9_PROFILER_END(); - - int64_t timeEnd = bx::getHPCounter(); - int64_t frameTime = timeEnd - timeBegin; - - static int64_t min = frameTime; - static int64_t max = frameTime; - min = min > frameTime ? frameTime : min; - max = max < frameTime ? frameTime : max; - - static uint32_t maxGpuLatency = 0; - static double maxGpuElapsed = 0.0f; - double elapsedGpuMs = 0.0; - - if (UINT32_MAX != frameQueryIdx) - { - m_gpuTimer.end(frameQueryIdx); - - const TimerQueryD3D9::Result& result = m_gpuTimer.m_result[BGFX_CONFIG_MAX_VIEWS]; - double toGpuMs = 1000.0 / double(result.m_frequency); - elapsedGpuMs = (result.m_end - result.m_begin) * toGpuMs; - maxGpuElapsed = elapsedGpuMs > maxGpuElapsed ? elapsedGpuMs : maxGpuElapsed; - - maxGpuLatency = bx::uint32_imax(maxGpuLatency, result.m_pending-1); - } - - const int64_t timerFreq = bx::getHPFrequency(); - - Stats& perfStats = _render->m_perfStats; - perfStats.cpuTimeBegin = timeBegin; - perfStats.cpuTimeEnd = timeEnd; - perfStats.cpuTimerFreq = timerFreq; - const TimerQueryD3D9::Result& result = m_gpuTimer.m_result[BGFX_CONFIG_MAX_VIEWS]; - perfStats.gpuTimeBegin = result.m_begin; - perfStats.gpuTimeEnd = result.m_end; - perfStats.gpuTimerFreq = result.m_frequency; - perfStats.numDraw = statsKeyType[0]; - perfStats.numCompute = statsKeyType[1]; - perfStats.numBlit = _render->m_numBlitItems; - perfStats.maxGpuLatency = maxGpuLatency; - perfStats.gpuFrameNum = result.m_frameNum; - bx::memCopy(perfStats.numPrims, statsNumPrimsRendered, sizeof(perfStats.numPrims) ); - m_nvapi.getMemoryInfo(perfStats.gpuMemoryUsed, perfStats.gpuMemoryMax); - - if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) ) - { - BGFX_D3D9_PROFILER_BEGIN_LITERAL("debugstats", kColorFrame); - - m_needPresent = true; - TextVideoMem& tvm = m_textVideoMem; - - static int64_t next = timeEnd; - - if (timeEnd >= next) - { - next = timeEnd + timerFreq; - - double freq = double(timerFreq); - double toMs = 1000.0/freq; - - tvm.clear(); - uint16_t pos = 0; - tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x8c : 0x8f - , " %s / " BX_COMPILER_NAME - " / " BX_CPU_NAME - " / " BX_ARCH_NAME - " / " BX_PLATFORM_NAME - " / Version 1.%d.%d (commit: " BGFX_REV_SHA1 ")" - , getRendererName() - , BGFX_API_VERSION - , BGFX_REV_NUMBER - ); - - const D3DADAPTER_IDENTIFIER9& identifier = m_identifier; - tvm.printf(0, pos++, 0x8f, " Device: %s (%s)", identifier.Description, identifier.Driver); - - char processMemoryUsed[16]; - bx::prettify(processMemoryUsed, BX_COUNTOF(processMemoryUsed), bx::getProcessMemoryUsed() ); - tvm.printf(0, pos++, 0x8f, " Memory: %s (process) ", processMemoryUsed); - - pos = 10; - tvm.printf(10, pos++, 0x8b, " Frame: %7.3f, % 7.3f \x1f, % 7.3f \x1e [ms] / % 6.2f FPS " - , double(frameTime)*toMs - , double(min)*toMs - , double(max)*toMs - , freq/frameTime - ); - - const uint32_t msaa = (m_resolution.reset&BGFX_RESET_MSAA_MASK)>>BGFX_RESET_MSAA_SHIFT; - tvm.printf(10, pos++, 0x8b, " Reset flags: [%c] vsync, [%c] MSAAx%d, [%c] MaxAnisotropy " - , !!(m_resolution.reset&BGFX_RESET_VSYNC) ? '\xfe' : ' ' - , 0 != msaa ? '\xfe' : ' ' - , 1<m_numRenderItems - , statsKeyType[0] - , statsKeyType[1] - , elapsedCpuMs - , elapsedCpuMs > maxGpuElapsed ? '>' : '<' - , maxGpuElapsed - , maxGpuLatency - ); - maxGpuLatency = 0; - maxGpuElapsed = 0.0; - - for (uint32_t ii = 0; ii < Topology::Count; ++ii) - { - tvm.printf(10, pos++, 0x8b, " %10s: %7d (#inst: %5d), submitted: %7d" - , getName(Topology::Enum(ii) ) - , statsNumPrimsRendered[ii] - , statsNumInstances[ii] - , statsNumPrimsSubmitted[ii] - ); - } - - tvm.printf(10, pos++, 0x8b, " Indices: %7d ", statsNumIndices); -// tvm.printf(10, pos++, 0x8b, " Uniform size: %7d, Max: %7d ", _render->m_uniformEnd, _render->m_uniformMax); - tvm.printf(10, pos++, 0x8b, " DVB size: %7d ", _render->m_vboffset); - tvm.printf(10, pos++, 0x8b, " DIB size: %7d ", _render->m_iboffset); - - pos++; - tvm.printf(10, pos++, 0x8b, " Occlusion queries: %3d ", m_occlusionQuery.m_control.available() ); - - pos++; - tvm.printf(10, pos++, 0x8b, " State cache: "); - tvm.printf(10, pos++, 0x8b, " Input "); - tvm.printf(10, pos++, 0x8b, " %6d " - , m_inputLayoutCache.getCount() - ); - pos++; - - double captureMs = double(captureElapsed)*toMs; - tvm.printf(10, pos++, 0x8b, " Capture: %7.4f [ms]", captureMs); - - uint8_t attr[2] = { 0x8c, 0x8a }; - uint8_t attrIndex = _render->m_waitSubmit < _render->m_waitRender; - - tvm.printf(10, pos++, attr[attrIndex&1], " Submit wait: %7.4f [ms]", _render->m_waitSubmit*toMs); - tvm.printf(10, pos++, attr[(attrIndex+1)&1], " Render wait: %7.4f [ms]", _render->m_waitRender*toMs); - - min = frameTime; - max = frameTime; - } - - blit(this, _textVideoMemBlitter, tvm); - - BGFX_D3D9_PROFILER_END(); - } - else if (_render->m_debug & BGFX_DEBUG_TEXT) - { - BGFX_D3D9_PROFILER_BEGIN_LITERAL("debugtext", kColorFrame); - - blit(this, _textVideoMemBlitter, _render->m_textVideoMem); - - BGFX_D3D9_PROFILER_END(); - } - - device->EndScene(); - } -} /* namespace d3d9 */ } // namespace bgfx - -#else - -namespace bgfx { namespace d3d9 -{ - RendererContextI* rendererCreate(const Init& _init) - { - BX_UNUSED(_init); - return NULL; - } - - void rendererDestroy() - { - } -} /* namespace d3d9 */ } // namespace bgfx - -#endif // BGFX_CONFIG_RENDERER_DIRECT3D9 diff --git a/src/renderer_d3d9.h b/src/renderer_d3d9.h deleted file mode 100644 index 52c803f003a..00000000000 --- a/src/renderer_d3d9.h +++ /dev/null @@ -1,513 +0,0 @@ -/* - * Copyright 2011-2023 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE - */ - -#ifndef BGFX_RENDERER_D3D9_H_HEADER_GUARD -#define BGFX_RENDERER_D3D9_H_HEADER_GUARD - -#define BGFX_CONFIG_RENDERER_DIRECT3D9EX (BX_PLATFORM_LINUX || BX_PLATFORM_WINDOWS) - -#include -#include -#include - -#ifndef D3DSTREAMSOURCE_INDEXEDDATA -# define D3DSTREAMSOURCE_INDEXEDDATA (1<<30) -#endif// D3DSTREAMSOURCE_INDEXEDDATA - -#ifndef D3DSTREAMSOURCE_INSTANCEDATA -# define D3DSTREAMSOURCE_INSTANCEDATA (2<<30) -#endif // D3DSTREAMSOURCE_INSTANCEDATA - -#include "renderer.h" -#include "renderer_d3d.h" -#include "nvapi.h" - -#define BGFX_D3D9_PROFILER_BEGIN(_view, _abgr) \ - BX_MACRO_BLOCK_BEGIN \ - PIX_BEGINEVENT(_abgr, s_viewNameW[_view]); \ - BGFX_PROFILER_BEGIN(s_viewName[view], _abgr); \ - BX_MACRO_BLOCK_END - -#define BGFX_D3D9_PROFILER_BEGIN_LITERAL(_name, _abgr) \ - BX_MACRO_BLOCK_BEGIN \ - PIX_BEGINEVENT(_abgr, L"" _name); \ - BGFX_PROFILER_BEGIN_LITERAL("" _name, _abgr); \ - BX_MACRO_BLOCK_END - -#define BGFX_D3D9_PROFILER_END() \ - BX_MACRO_BLOCK_BEGIN \ - BGFX_PROFILER_END(); \ - PIX_ENDEVENT(); \ - BX_MACRO_BLOCK_END - -namespace bgfx { namespace d3d9 -{ -# if defined(D3D_DISABLE_9EX) -# define D3DFMT_S8_LOCKABLE D3DFORMAT( 85) -# define D3DFMT_A1 D3DFORMAT(118) -# endif // defined(D3D_DISABLE_9EX) - -# ifndef D3DFMT_ATI1 -# define D3DFMT_ATI1 ( (D3DFORMAT)BX_MAKEFOURCC('A', 'T', 'I', '1') ) -# endif // D3DFMT_ATI1 - -# ifndef D3DFMT_ATI2 -# define D3DFMT_ATI2 ( (D3DFORMAT)BX_MAKEFOURCC('A', 'T', 'I', '2') ) -# endif // D3DFMT_ATI2 - -# ifndef D3DFMT_ATOC -# define D3DFMT_ATOC ( (D3DFORMAT)BX_MAKEFOURCC('A', 'T', 'O', 'C') ) -# endif // D3DFMT_ATOC - -# ifndef D3DFMT_DF16 -# define D3DFMT_DF16 ( (D3DFORMAT)BX_MAKEFOURCC('D', 'F', '1', '6') ) -# endif // D3DFMT_DF16 - -# ifndef D3DFMT_DF24 -# define D3DFMT_DF24 ( (D3DFORMAT)BX_MAKEFOURCC('D', 'F', '2', '4') ) -# endif // D3DFMT_DF24 - -# ifndef D3DFMT_INST -# define D3DFMT_INST ( (D3DFORMAT)BX_MAKEFOURCC('I', 'N', 'S', 'T') ) -# endif // D3DFMT_INST - -# ifndef D3DFMT_INTZ -# define D3DFMT_INTZ ( (D3DFORMAT)BX_MAKEFOURCC('I', 'N', 'T', 'Z') ) -# endif // D3DFMT_INTZ - -# ifndef D3DFMT_NULL -# define D3DFMT_NULL ( (D3DFORMAT)BX_MAKEFOURCC('N', 'U', 'L', 'L') ) -# endif // D3DFMT_NULL - -# ifndef D3DFMT_RESZ -# define D3DFMT_RESZ ( (D3DFORMAT)BX_MAKEFOURCC('R', 'E', 'S', 'Z') ) -# endif // D3DFMT_RESZ - -# ifndef D3DFMT_RAWZ -# define D3DFMT_RAWZ ( (D3DFORMAT)BX_MAKEFOURCC('R', 'A', 'W', 'Z') ) -# endif // D3DFMT_RAWZ - -# ifndef D3DFMT_S8_LOCKABLE -# define D3DFMT_S8_LOCKABLE ( (D3DFORMAT)85) -# endif // D3DFMT_S8_LOCKABLE - -# ifndef D3DFMT_A1 -# define D3DFMT_A1 ( (D3DFORMAT)118) -# endif // D3DFMT_A1 - - struct ExtendedFormat - { - enum Enum - { - Ati1, - Ati2, - Df16, - Df24, - Inst, - Intz, - Null, - Resz, - Rawz, - Atoc, - - Count, - }; - - D3DFORMAT m_fmt; - DWORD m_usage; - D3DRESOURCETYPE m_type; - bool m_supported; - }; - - struct Msaa - { - D3DMULTISAMPLE_TYPE m_type; - DWORD m_quality; - }; - - struct IndexBufferD3D9 - { - IndexBufferD3D9() - : m_ptr(NULL) - , m_dynamic(NULL) - , m_size(0) - , m_flags(BGFX_BUFFER_NONE) - { - } - - void create(uint32_t _size, void* _data, uint16_t _flags); - void update(uint32_t _offset, uint32_t _size, void* _data, bool _discard = false) - { - if (NULL != m_dynamic - && _data != m_dynamic) - { - bx::memCopy(&m_dynamic[_offset], _data, _size); - } - - void* buffer; - DX_CHECK(m_ptr->Lock(_offset - , _size - , &buffer - , _discard || (m_dynamic && 0 == _offset && m_size == _size) ? D3DLOCK_DISCARD : 0 - ) ); - - bx::memCopy(buffer, _data, _size); - - DX_CHECK(m_ptr->Unlock() ); - } - - void destroy() - { - if (NULL != m_ptr) - { - DX_RELEASE(m_ptr, 0); - - if (NULL != m_dynamic) - { - bx::free(g_allocator, m_dynamic); - m_dynamic = NULL; - } - } - } - - void preReset(); - void postReset(); - - IDirect3DIndexBuffer9* m_ptr; - uint8_t* m_dynamic; - uint32_t m_size; - uint16_t m_flags; - }; - - struct VertexBufferD3D9 - { - VertexBufferD3D9() - : m_ptr(NULL) - , m_dynamic(NULL) - , m_size(0) - { - } - - void create(uint32_t _size, void* _data, VertexLayoutHandle _layoutHandle); - void update(uint32_t _offset, uint32_t _size, void* _data, bool _discard = false) - { - if (NULL != m_dynamic - && _data != m_dynamic) - { - bx::memCopy(&m_dynamic[_offset], _data, _size); - } - - void* buffer; - DX_CHECK(m_ptr->Lock(_offset - , _size - , &buffer - , _discard || (m_dynamic && 0 == _offset && m_size == _size) ? D3DLOCK_DISCARD : 0 - ) ); - - bx::memCopy(buffer, _data, _size); - - DX_CHECK(m_ptr->Unlock() ); - } - - void destroy() - { - if (NULL != m_ptr) - { - DX_RELEASE(m_ptr, 0); - - if (NULL != m_dynamic) - { - bx::free(g_allocator, m_dynamic); - m_dynamic = NULL; - } - } - } - - void preReset(); - void postReset(); - - IDirect3DVertexBuffer9* m_ptr; - uint8_t* m_dynamic; - uint32_t m_size; - VertexLayoutHandle m_layoutHandle; - }; - - struct ShaderD3D9 - { - ShaderD3D9() - : m_vertexShader(NULL) - , m_constantBuffer(NULL) - , m_numPredefined(0) - , m_type(0) - { - } - - void create(const Memory* _mem); - - void destroy() - { - if (NULL != m_constantBuffer) - { - UniformBuffer::destroy(m_constantBuffer); - m_constantBuffer = NULL; - } - m_numPredefined = 0; - - switch (m_type) - { - case 0: DX_RELEASE(m_vertexShader, 0); BX_FALLTHROUGH; - default: DX_RELEASE(m_pixelShader, 0); - } - } - - union - { - // X360 doesn't have interface inheritance (can't use IUnknown*). - IDirect3DVertexShader9* m_vertexShader; - IDirect3DPixelShader9* m_pixelShader; - }; - UniformBuffer* m_constantBuffer; - PredefinedUniform m_predefined[PredefinedUniform::Count]; - uint8_t m_numPredefined; - uint8_t m_type; - }; - - struct ProgramD3D9 - { - void create(const ShaderD3D9* _vsh, const ShaderD3D9* _fsh) - { - m_vsh = _vsh; - m_fsh = _fsh; - - bx::memCopy(&m_predefined[0], _vsh->m_predefined, _vsh->m_numPredefined*sizeof(PredefinedUniform) ); - m_numPredefined = _vsh->m_numPredefined; - - if (NULL != _fsh) - { - bx::memCopy(&m_predefined[_vsh->m_numPredefined], _fsh->m_predefined, _fsh->m_numPredefined*sizeof(PredefinedUniform) ); - m_numPredefined += _fsh->m_numPredefined; - } - } - - void destroy() - { - m_numPredefined = 0; - m_vsh = NULL; - m_fsh = NULL; - } - - const ShaderD3D9* m_vsh; - const ShaderD3D9* m_fsh; - - PredefinedUniform m_predefined[PredefinedUniform::Count*2]; - uint8_t m_numPredefined; - }; - - struct TextureD3D9 - { - enum Enum - { - Texture2D, - Texture3D, - TextureCube, - }; - - 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, 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, uint64_t _flags, uint8_t _skip); - - void destroy(bool _resize = false) - { - if (0 == (m_flags & BGFX_SAMPLER_INTERNAL_SHARED) ) - { - if (_resize) - { - // BK - at the time of resize there might be one reference held by frame buffer - // surface. This frame buffer will be recreated later, and release reference - // to existing surface. That's why here we don't care about ref count. - m_ptr->Release(); - } - else - { - DX_RELEASE(m_ptr, 0); - } - } - DX_RELEASE(m_surface, 0); - DX_RELEASE(m_staging, 0); - m_textureFormat = TextureFormat::Unknown; - } - - void overrideInternal(uintptr_t _ptr) - { - destroy(); - m_flags |= BGFX_SAMPLER_INTERNAL_SHARED; - m_ptr = (IDirect3DBaseTexture9*)_ptr; - } - - void updateBegin(uint8_t _side, uint8_t _mip); - void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem); - void updateEnd(); - void commit(uint8_t _stage, uint32_t _flags, const float _palette[][4]); - void resolve(uint8_t _resolve) const; - - void preReset(); - void postReset(); - - union - { - IDirect3DBaseTexture9* m_ptr; - IDirect3DTexture9* m_texture2d; - IDirect3DVolumeTexture9* m_texture3d; - IDirect3DCubeTexture9* m_textureCube; - }; - - IDirect3DSurface9* m_surface; - - union - { - IDirect3DBaseTexture9* m_staging; - IDirect3DTexture9* m_staging2d; - IDirect3DVolumeTexture9* m_staging3d; - IDirect3DCubeTexture9* m_stagingCube; - }; - - uint64_t m_flags; - uint32_t m_width; - uint32_t m_height; - uint32_t m_depth; - uint8_t m_numMips; - uint8_t m_type; - uint8_t m_requestedFormat; - uint8_t m_textureFormat; - }; - - struct FrameBufferD3D9 - { - FrameBufferD3D9() - : m_hwnd(NULL) - , m_denseIdx(UINT16_MAX) - , m_num(0) - , m_numTh(0) - , m_dsIdx(UINT8_MAX) - , m_needResolve(false) - , m_needPresent(false) - { - } - - void create(uint8_t _num, const Attachment* _attachment); - void create(uint16_t _denseIdx, void* _nwh, uint32_t _width, uint32_t _height, TextureFormat::Enum _format, TextureFormat::Enum _depthFormat); - uint16_t destroy(); - HRESULT present(); - void resolve() const; - void preReset(); - void postReset(); - void createNullColorRT(); - void set(); - - IDirect3DSurface9* m_surface[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS-1]; - IDirect3DSwapChain9* m_swapChain; - HWND m_hwnd; - uint32_t m_width; - uint32_t m_height; - - Attachment m_attachment[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS]; - uint16_t m_denseIdx; - uint8_t m_num; - uint8_t m_numTh; - uint8_t m_dsIdx; - bool m_needResolve; - bool m_needPresent; - }; - - struct TimerQueryD3D9 - { - TimerQueryD3D9() - : m_control(BX_COUNTOF(m_query) ) - { - } - - void postReset(); - void preReset(); - uint32_t begin(uint32_t _resultIdx, uint32_t _frameNum); - void end(uint32_t _idx); - bool update(); - - struct Query - { - IDirect3DQuery9* m_disjoint; - IDirect3DQuery9* m_begin; - IDirect3DQuery9* m_end; - IDirect3DQuery9* m_freq; - uint32_t m_resultIdx; - uint32_t m_frameNum; - bool m_ready; - }; - - struct Result - { - void reset() - { - m_begin = 0; - m_end = 0; - m_frequency = 1; - m_pending = 0; - m_frameNum = 0; - } - - uint64_t m_begin; - uint64_t m_end; - uint64_t m_frequency; - uint32_t m_pending; - uint32_t m_frameNum; - }; - - Result m_result[BGFX_CONFIG_MAX_VIEWS+1]; - - Query m_query[BGFX_CONFIG_MAX_VIEWS*4]; - bx::RingBufferControl m_control; - }; - - struct OcclusionQueryD3D9 - { - OcclusionQueryD3D9() - : m_control(BX_COUNTOF(m_query) ) - { - } - - void postReset(); - void preReset(); - void begin(Frame* _render, OcclusionQueryHandle _handle); - void end(); - void resolve(Frame* _render, bool _wait = false); - void invalidate(OcclusionQueryHandle _handle); - - struct Query - { - IDirect3DQuery9* m_ptr; - OcclusionQueryHandle m_handle; - }; - - Query m_query[BGFX_CONFIG_MAX_OCCLUSION_QUERIES]; - bx::RingBufferControl m_control; - }; - -} /* namespace d3d9 */ } // namespace bgfx - -#endif // BGFX_RENDERER_D3D9_H_HEADER_GUARD diff --git a/src/shader.cpp b/src/shader.cpp index 9e0ba24c273..97de1fe2610 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -5,7 +5,6 @@ #include "bgfx_p.h" #include "shader_dxbc.h" -#include "shader_dx9bc.h" #include "shader_spirv.h" namespace bgfx @@ -128,19 +127,6 @@ namespace bgfx return true; } - static bool printAsm(uint32_t _offset, const Dx9bcInstruction& _instruction, void* _userData) - { - BX_UNUSED(_offset); - bx::WriterI* writer = reinterpret_cast(_userData); - char temp[512]; - toString(temp, sizeof(temp), _instruction); - - bx::Error err; - bx::write(writer, temp, (int32_t)bx::strLen(temp), &err); - bx::write(writer, '\n', &err); - return true; - } - static bool printAsm(uint32_t _offset, const SpvInstruction& _instruction, void* _userData) { BX_UNUSED(_offset); @@ -173,9 +159,8 @@ namespace bgfx } else { - Dx9bc dx9bc; - read(_reader, dx9bc, _err); - parse(dx9bc.shader, printAsm, _writer, _err); + BX_TRACE("Unrecognized shader binary format (magic: 0x%08x)!", magic); + BX_ERROR_SET(_err, kShaderInvalidHeader, "Failed to read shader binary. Invalid magic number."); } } diff --git a/src/shader.h b/src/shader.h index 0a2f507ebae..29f6b71a985 100644 --- a/src/shader.h +++ b/src/shader.h @@ -10,6 +10,9 @@ namespace bgfx { + BX_ERROR_RESULT(kShaderInvalidHeader, BX_MAKEFOURCC('S', 'H', 0, 1) ); + BX_ERROR_RESULT(kShaderInvalidInstruction, BX_MAKEFOURCC('S', 'H', 0, 2) ); + struct DescriptorType { enum Enum diff --git a/src/shader_dx9bc.cpp b/src/shader_dx9bc.cpp deleted file mode 100644 index 4501435c64a..00000000000 --- a/src/shader_dx9bc.cpp +++ /dev/null @@ -1,755 +0,0 @@ -/* - * Copyright 2011-2023 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE - */ - -#include "bgfx_p.h" -#include "shader_dx9bc.h" - -BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-parameter"); -BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG("-Wunneeded-internal-declaration"); - -namespace bgfx -{ - struct Dx9bcOpcodeInfo - { - uint8_t numOperands; - uint8_t numValues; - }; - - static const Dx9bcOpcodeInfo s_dx9bcOpcodeInfo[] = - { - { 0, 0 }, // NOP - { 2, 0 }, // MOV - { 3, 0 }, // ADD - { 1, 0 }, // SUB - { 4, 0 }, // MAD - { 3, 0 }, // MUL - { 2, 0 }, // RCP - { 2, 0 }, // RSQ - { 3, 0 }, // DP3 - { 3, 0 }, // DP4 - { 3, 0 }, // MIN - { 3, 0 }, // MAX - { 3, 0 }, // SLT - { 3, 0 }, // SGE - { 2, 0 }, // EXP - { 2, 0 }, // LOG - { 1, 0 }, // LIT - { 1, 0 }, // DST - { 4, 0 }, // LRP - { 2, 0 }, // FRC - { 1, 0 }, // M4X4 - { 1, 0 }, // M4X3 - { 1, 0 }, // M3X4 - { 1, 0 }, // M3X3 - { 1, 0 }, // M3X2 - { 0, 0 }, // CALL - { 0, 0 }, // CALLNZ - { 0, 0 }, // LOOP - { 0, 0 }, // RET - { 0, 0 }, // ENDLOOP - { 0, 0 }, // LABEL - { 1, 1 }, // DCL - { 3, 0 }, // POW - { 1, 0 }, // CRS - { 1, 0 }, // SGN - { 1, 0 }, // ABS - { 2, 0 }, // NRM - { 4, 0 }, // SINCOS - { 1, 0 }, // REP - { 0, 0 }, // ENDREP - { 1, 0 }, // IF - { 2, 0 }, // IFC - { 0, 0 }, // ELSE - { 0, 0 }, // ENDIF - { 0, 0 }, // BREAK - { 2, 0 }, // BREAKC - { 2, 0 }, // MOVA - { 1, 4 }, // DEFB - { 1, 4 }, // DEFI - { 0, 0 }, // 0 - { 0, 0 }, // 1 - { 0, 0 }, // 2 - { 0, 0 }, // 3 - { 0, 0 }, // 4 - { 0, 0 }, // 5 - { 0, 0 }, // 6 - { 0, 0 }, // 7 - { 0, 0 }, // 8 - { 0, 0 }, // 9 - { 0, 0 }, // 10 - { 0, 0 }, // 11 - { 0, 0 }, // 12 - { 0, 0 }, // 13 - { 0, 0 }, // 14 - { 1, 0 }, // TEXCOORD - { 1, 0 }, // TEXKILL - { 3, 0 }, // TEX - { 1, 0 }, // TEXBEM - { 1, 0 }, // TEXBEM1 - { 1, 0 }, // TEXREG2AR - { 1, 0 }, // TEXREG2GB - { 1, 0 }, // TEXM3X2PAD - { 1, 0 }, // TEXM3X2TEX - { 1, 0 }, // TEXM3X3PAD - { 1, 0 }, // TEXM3X3TEX - { 1, 0 }, // TEXM3X3DIFF - { 1, 0 }, // TEXM3X3SPEC - { 1, 0 }, // TEXM3X3VSPEC - { 2, 0 }, // EXPP - { 2, 0 }, // LOGP - { 4, 0 }, // CND - { 1, 4 }, // DEF - { 1, 0 }, // TEXREG2RGB - { 1, 0 }, // TEXDP3TEX - { 1, 0 }, // TEXM3X2DEPTH - { 1, 0 }, // TEXDP3 - { 1, 0 }, // TEXM3X3 - { 1, 0 }, // TEXDEPTH - { 4, 0 }, // CMP - { 1, 0 }, // BEM - { 4, 0 }, // DP2ADD - { 2, 0 }, // DSX - { 2, 0 }, // DSY - { 5, 0 }, // TEXLDD - { 1, 0 }, // SETP - { 3, 0 }, // TEXLDL - { 0, 0 }, // BREAKP - }; - BX_STATIC_ASSERT(BX_COUNTOF(s_dx9bcOpcodeInfo) == Dx9bcOpcode::Count); - - static const char* s_dx9bcOpcode[] = - { - "nop", - "mov", - "add", - "sub", - "mad", - "mul", - "rcp", - "rsq", - "dp3", - "dp4", - "min", - "max", - "slt", - "sge", - "exp", - "log", - "lit", - "dst", - "lrp", - "frc", - "m4x4", - "m4x3", - "m3x4", - "m3x3", - "m3x2", - "call", - "callnz", - "loop", - "ret", - "endloop", - "label", - "dcl", - "pow", - "crs", - "sgn", - "abs", - "nrm", - "sincos", - "rep", - "endrep", - "if", - "ifc", - "else", - "endif", - "break", - "breakc", - "mova", - "defb", - "defi", - - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - - "texcoord", - "texkill", - "tex", - "texbem", - "texbem1", - "texreg2ar", - "texreg2gb", - "texm3x2pad", - "texm3x2tex", - "texm3x3pad", - "texm3x3tex", - "texm3x3diff", - "texm3x3spec", - "texm3x3vspec", - "expp", - "logp", - "cnd", - "def", - "texreg2rgb", - "texdp3tex", - "texm3x2depth", - "texdp3", - "texm3x3", - "texdepth", - "cmp", - "bem", - "dp2add", - "dsx", - "dsy", - "texldd", - "setp", - "texldl", - "breakp", - }; - BX_STATIC_ASSERT(BX_COUNTOF(s_dx9bcOpcode) == Dx9bcOpcode::Count); - - const char* getName(Dx9bcOpcode::Enum _opcode) - { - BX_ASSERT(_opcode < Dx9bcOpcode::Count, "Unknown opcode id %d (%x).", _opcode, _opcode); - return s_dx9bcOpcode[_opcode]; - } - - static const char* s_dx9bcOperandType[] = - { - "r", // Temporary Register File - "v", // Input Register File - "c", // Constant Register File - "t", // Texture Register File (PS) - "oPos", // Rasterizer Register File - "oD", // Attribute Output Register File - "oT", // Texture Coordinate Output Register File - "output", // Output register file for VS3.0+ - "i", // Constant Integer Vector Register File - "oColor", // Color Output Register File - "oDepth", // Depth Output Register File - "s", // Sampler State Register File - "c", // Constant Register File 2048 - 4095 - "c", // Constant Register File 4096 - 6143 - "c", // Constant Register File 6144 - 8191 - "b", // Constant Boolean register file - "aL", // Loop counter register file - "tempfloat16", // 16-bit float temp register file - "misctype", // Miscellaneous (single) registers. - "label", // Label - "p", // Predicate register - }; - BX_STATIC_ASSERT(BX_COUNTOF(s_dx9bcOperandType) == Dx9bcOperandType::Count); - - static const char* s_dx9bcDeclUsage[] = - { - "position", - "blendweight", - "blendindices", - "normal", - "psize", - "texcoord", - "tangent", - "binormal", - "tessfactor", - "positiont", - "color", - "fog", - "depth", - "sample", - }; - BX_STATIC_ASSERT(BX_COUNTOF(s_dx9bcDeclUsage) == Dx9bcDeclUsage::Count); - - int32_t read(bx::ReaderI* _reader, Dx9bcSubOperand& _subOperand, bx::Error* _err) - { - int32_t size = 0; - - uint32_t token; - size += bx::read(_reader, token, _err); - - _subOperand.type = Dx9bcOperandType::Enum( ( (token & UINT32_C(0x70000000) ) >> 28) - | ( (token & UINT32_C(0x00001800) ) >> 8) ); - _subOperand.regIndex = (token & UINT32_C(0x000007ff) ); - _subOperand.swizzleBits = uint8_t( (token & UINT32_C(0x00ff0000) ) >> 16); - - return size; - } - - int32_t write(bx::WriterI* _writer, const Dx9bcSubOperand& _subOperand, bx::Error* _err) - { - int32_t size = 0; - - uint32_t token = 0; - token |= (_subOperand.type << 28) & UINT32_C(0x70000000); - token |= (_subOperand.type << 8) & UINT32_C(0x00001800); - token |= _subOperand.regIndex & UINT32_C(0x000007ff); - token |= (_subOperand.swizzleBits << 16) & UINT32_C(0x00ff0000); - size += bx::write(_writer, token, _err); - - return size; - } - - int32_t read(bx::ReaderI* _reader, Dx9bcOperand& _operand, bx::Error* _err) - { - int32_t size = 0; - - uint32_t token; - size += bx::read(_reader, token, _err); - - _operand.type = Dx9bcOperandType::Enum( ( (token & UINT32_C(0x70000000) ) >> 28) - | ( (token & UINT32_C(0x00001800) ) >> 8) ); - _operand.regIndex = (token & UINT32_C(0x000007ff) ); - _operand.addrMode = Dx9bcOperandAddrMode::Enum( (token & UINT32_C(0x00002000) ) >> 13); - - if (_operand.destination) - { - // Destination Parameter Token - // https://msdn.microsoft.com/en-us/library/ff552738.aspx - - _operand.writeMask = uint8_t( (token & UINT32_C(0x000f0000) ) >> 16); - _operand.saturate = 0 != (token & UINT32_C(0x00100000) ); - _operand.partialPrecision = 0 != (token & UINT32_C(0x00200000) ); - _operand.centroid = 0 != (token & UINT32_C(0x00400000) ); - } - else - { - // Source Parameter Token - // https://msdn.microsoft.com/en-us/library/ff569716%28v=vs.85%29.aspx - - _operand.writeMask = 0; - _operand.saturate = false; - _operand.partialPrecision = false; - _operand.centroid = false; - _operand.swizzleBits = uint8_t( (token & UINT32_C(0x00ff0000) ) >> 16); - } - - if (Dx9bcOperandAddrMode::Relative == _operand.addrMode) - { - size += read(_reader, _operand.subOperand, _err); - } - - return size; - } - - int32_t write(bx::WriterI* _writer, const Dx9bcOperand& _operand, bx::Error* _err) - { - int32_t size = 0; - - uint32_t token = 0; - token |= (_operand.type << 28) & UINT32_C(0x70000000); - token |= (_operand.type << 8) & UINT32_C(0x00001800); - token |= _operand.regIndex & UINT32_C(0x000007ff); - token |= (_operand.addrMode << 13) & UINT32_C(0x00002000); - size += bx::write(_writer, token, _err); - - if (Dx9bcOperandAddrMode::Relative == _operand.addrMode) - { - size += write(_writer, _operand.subOperand, _err); - } - - return size; - } - - int32_t read(bx::ReaderI* _reader, Dx9bcInstruction& _instruction, bx::Error* _err) - { - int32_t size = 0; - - uint32_t token; - size += bx::read(_reader, token, _err); - - _instruction.opcode = Dx9bcOpcode::Enum( (token & UINT32_C(0x0000ffff) ) ); - - if (Dx9bcOpcode::Comment == _instruction.opcode) - { - _instruction.specific = 0; - _instruction.length = uint16_t( (token & UINT32_C(0x7fff0000) ) >> 16) + 1; - _instruction.predicated = false; - _instruction.coissue = false; - } - else - { - _instruction.specific = uint8_t( (token & UINT32_C(0x00ff0000) ) >> 16); - _instruction.length = uint8_t( (token & UINT32_C(0x0f000000) ) >> 24) + 1; - _instruction.predicated = 0 != (token & UINT32_C(0x10000000) ); - _instruction.coissue = 0 != (token & UINT32_C(0x40000000) ); - } - - if (Dx9bcOpcode::Count <= _instruction.opcode) - { - if (Dx9bcOpcode::Comment == _instruction.opcode) - { - for (int32_t ii = 0, num = _instruction.length-1; ii < num; ++ii) - { - uint32_t tmp; - size += bx::read(_reader, tmp, _err); - } - } - - return size; - } - - uint32_t currOp = 0; - - const Dx9bcOpcodeInfo& info = s_dx9bcOpcodeInfo[bx::uint32_min(_instruction.opcode, Dx9bcOpcode::Count)]; - _instruction.numOperands = info.numOperands; - _instruction.numValues = info.numValues; - - switch (_instruction.opcode) - { - case Dx9bcOpcode::SINCOS: - if (5 > _instruction.length) - { - _instruction.numOperands = 2; - } - break; - - default: - break; - }; - -//BX_TRACE("%d (%d), %d, %d, 0x%08x" -// , _instruction.opcode -// , bx::uint32_min(_instruction.opcode, Dx9bcOpcode::Count) -// , _instruction.length -// , _instruction.numOperands -// , token -// ); - - const bool valuesBeforeOpcode = false - || Dx9bcOpcode::DCL == _instruction.opcode - ; - - if (valuesBeforeOpcode - && 0 < info.numValues) - { - size += read(_reader, _instruction.value, info.numValues*sizeof(uint32_t), _err); - } - - _instruction.operand[0].destination = true; - - switch (_instruction.numOperands) - { - case 6: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 5: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 4: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 3: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 2: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 1: size += read(_reader, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 0: - if (!valuesBeforeOpcode - && 0 < info.numValues) - { - size += read(_reader, _instruction.value, info.numValues*sizeof(uint32_t), _err); - } - break; - - default: - BX_ASSERT(false, "Instruction %s with invalid number of operands %d (numValues %d)." - , getName(_instruction.opcode) - , _instruction.numOperands - , info.numValues - ); - break; - } - - return size; - } - - int32_t write(bx::WriterI* _writer, const Dx9bcInstruction& _instruction, bx::Error* _err) - { - int32_t size = 0; - - uint32_t token = 0; - token |= _instruction.opcode & UINT32_C(0x0000ffff); - token |= (_instruction.specific << 16) & UINT32_C(0x00ff0000); - token |= ( (_instruction.length - 1) << 24) & UINT32_C(0x0f000000); - size += bx::write(_writer, token, _err); - - uint32_t currOp = 0; - switch (_instruction.numOperands) - { - case 6: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 5: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 4: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 3: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 2: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 1: size += write(_writer, _instruction.operand[currOp++], _err); BX_FALLTHROUGH; - case 0: - break; - } - - return size; - } - - int32_t toString(char* _out, int32_t _size, const Dx9bcInstruction& _instruction) - { - int32_t size = 0; - - if (Dx9bcOpcode::Comment == _instruction.opcode - || Dx9bcOpcode::Phase == _instruction.opcode) - { - size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) - , "// %x" - , _instruction.opcode - ); - return size; - } - - size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) - , "%2d %s" - , _instruction.opcode - , getName(_instruction.opcode) - ); - - switch (_instruction.opcode) - { - case Dx9bcOpcode::DCL: - size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) - , "_%s%d (%d, %d, %d, %d)" - , s_dx9bcDeclUsage[_instruction.value[0] & UINT32_C(0x0000000f)] - , (_instruction.value[0] & UINT32_C(0x000f0000) )>>16 - , (_instruction.value[0] & UINT32_C(0x08000000) )>>27 // ? - , (_instruction.value[0] & UINT32_C(0x10000000) )>>28 // texture2d - , (_instruction.value[0] & UINT32_C(0x20000000) )>>29 // textureCube - , (_instruction.value[0] & UINT32_C(0x40000000) )>>30 // texture3d - ); - break; - - default: - break; - } - - for (uint32_t ii = 0; ii < _instruction.numOperands; ++ii) - { - const Dx9bcOperand& operand = _instruction.operand[ii]; - size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) - , "%s%s%d" - , 0 == ii ? " " : ", " - , s_dx9bcOperandType[operand.type] - , operand.regIndex - ); - - if (operand.destination) - { - if (0xf > operand.writeMask - && 0 < operand.writeMask) - { - size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) - , ".%s%s%s%s" - , 0 == (operand.writeMask & 1) ? "" : "x" - , 0 == (operand.writeMask & 2) ? "" : "y" - , 0 == (operand.writeMask & 4) ? "" : "z" - , 0 == (operand.writeMask & 8) ? "" : "w" - ); - } - } - else - { - if (Dx9bcOperandAddrMode::Relative == operand.addrMode) - { - const bool array = true; - - size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) - , "[" - ); - - size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) - , "%s%d" - , s_dx9bcOperandType[operand.subOperand.type] - , operand.subOperand.regIndex - ); - - size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) - , "%s" - , array ? "]" : "" - ); - } - - if (0xe4 != operand.swizzleBits) - { - size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) - , ".%c%c%c%c" - , "xyzw"[(operand.swizzleBits )&0x3] - , "xyzw"[(operand.swizzleBits>>2)&0x3] - , "xyzw"[(operand.swizzleBits>>4)&0x3] - , "xyzw"[(operand.swizzleBits>>6)&0x3] - ); - } - } - } - - switch (_instruction.opcode) - { - case Dx9bcOpcode::DEF: - for (uint32_t jj = 0; jj < _instruction.numValues; ++jj) - { - union { int32_t i; float f; } cast = { _instruction.value[jj] }; - size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) - , "%s%f%s" - , 0 == jj ? " (" : ", " - , cast.f - , uint32_t(_instruction.numValues-1) == jj ? ")" : "" - ); - } - break; - - case Dx9bcOpcode::DEFI: - for (uint32_t jj = 0; jj < _instruction.numValues; ++jj) - { - size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size) - , "%s%d%s" - , 0 == jj ? " (" : ", " - , _instruction.value[jj] - , uint32_t(_instruction.numValues-1) == jj ? ")" : "" - ); - } - break; - - default: - break; - } - - return size; - } - - int32_t read(bx::ReaderSeekerI* _reader, Dx9bcShader& _shader, bx::Error* _err) - { - int32_t size = 0; - int64_t offset = bx::seek(_reader); - - for (;;) - { - Dx9bcInstruction instruction; - int32_t length = read(_reader, instruction, _err); - size += length; - - if (Dx9bcOpcode::Count > instruction.opcode) - { - char temp[512]; - toString(temp, 512, instruction); - - BX_ASSERT(length/4 == instruction.length - , "%s\nread %d, expected %d" - , temp - , length/4 - , instruction.length - ); - } - else - { - if (Dx9bcOpcode::End == instruction.opcode) - { - size -= length; - break; - } - } - } - - bx::seek(_reader, offset, bx::Whence::Begin); - - _shader.byteCode.resize(size); - bx::read(_reader, _shader.byteCode.data(), size, _err); - - return size; - } - - int32_t write(bx::WriterI* _writer, const Dx9bcShader& _shader, bx::Error* _err) - { - BX_UNUSED(_writer, _shader, _err); - return 0; - } - - int32_t read(bx::ReaderSeekerI* _reader, Dx9bc& _bc, bx::Error* _err) - { - int32_t size = 0; - - size += bx::read(_reader, _bc.version, _err); - - bool pixelShader = (0xffff0000 == (_bc.version & 0xffff0000) ); - uint32_t versionMajor = (_bc.version>>8)&0xff; - uint32_t versionMinor = _bc.version&0xff; - BX_UNUSED(pixelShader, versionMajor, versionMinor); - BX_TRACE("%s shader %d.%d" - , pixelShader ? "pixel" : "vertex" - , versionMajor - , versionMinor - ); - - size += read(_reader, _bc.shader, _err); - - return size; - } - - int32_t write(bx::WriterSeekerI* _writer, const Dx9bc& _dxbc, bx::Error* _err) - { - BX_UNUSED(_writer, _dxbc, _err); - return 0; - } - - void parse(const Dx9bcShader& _src, Dx9bcParseFn _fn, void* _userData, bx::Error* _err) - { - BX_ERROR_SCOPE(_err); - - bx::MemoryReader reader(_src.byteCode.data(), uint32_t(_src.byteCode.size() ) ); - - bx::Error err; - - for (uint32_t token = 0, numTokens = uint32_t(_src.byteCode.size() / sizeof(uint32_t) ); token < numTokens;) - { - Dx9bcInstruction instruction; - uint32_t size = read(&reader, instruction, _err); - BX_ASSERT(size/4 == instruction.length, "read %d, expected %d", size/4, instruction.length); BX_UNUSED(size); - - bool cont = _fn(token * sizeof(uint32_t), instruction, _userData); - if (!cont) - { - return; - } - - token += instruction.length; - } - } - - void filter(Dx9bcShader& _dst, const Dx9bcShader& _src, Dx9bcFilterFn _fn, void* _userData, bx::Error* _err) - { - BX_ERROR_SCOPE(_err); - - bx::MemoryReader reader(_src.byteCode.data(), uint32_t(_src.byteCode.size() ) ); - - bx::MemoryBlock mb(g_allocator); - bx::MemoryWriter writer(&mb); - - for (uint32_t token = 0, numTokens = uint32_t(_src.byteCode.size() / sizeof(uint32_t) ); token < numTokens;) - { - Dx9bcInstruction instruction; - uint32_t size = read(&reader, instruction, _err); - BX_ASSERT(size/4 == instruction.length, "read %d, expected %d", size/4, instruction.length); BX_UNUSED(size); - - _fn(instruction, _userData); - - write(&writer, instruction, _err); - - token += instruction.length; - } - - uint8_t* data = (uint8_t*)mb.more(); - uint32_t size = uint32_t(bx::getSize(&writer) ); - _dst.byteCode.reserve(size); - bx::memCopy(_dst.byteCode.data(), data, size); - } - -} // namespace bgfx diff --git a/src/shader_dx9bc.h b/src/shader_dx9bc.h deleted file mode 100644 index ca239a7c5cf..00000000000 --- a/src/shader_dx9bc.h +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright 2011-2023 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE - */ - -#ifndef BGFX_SHADER_DX9BC_H -#define BGFX_SHADER_DX9BC_H - -#include - -namespace bgfx -{ - struct Dx9bcOpcode - { - enum Enum - { - NOP, - MOV, - ADD, - SUB, - MAD, - MUL, - RCP, - RSQ, - DP3, - DP4, - MIN, - MAX, - SLT, - SGE, - EXP, - LOG, - LIT, - DST, - LRP, - FRC, - M4X4, - M4X3, - M3X4, - M3X3, - M3X2, - CALL, - CALLNZ, - LOOP, - RET, - ENDLOOP, - LABEL, - DCL, - POW, - CRS, - SGN, - ABS, - NRM, - SINCOS, - REP, - ENDREP, - IF, - IFC, - ELSE, - ENDIF, - BREAK, - BREAKC, - MOVA, - DEFB, - DEFI, - - Unknown = 63, - TEXCOORD, - TEXKILL, - TEX, - TEXBEM, - TEXBEM1, - TEXREG2AR, - TEXREG2GB, - TEXM3X2PAD, - TEXM3X2TEX, - TEXM3X3PAD, - TEXM3X3TEX, - TEXM3X3DIFF, - TEXM3X3SPEC, - TEXM3X3VSPEC, - EXPP, - LOGP, - CND, - DEF, - TEXREG2RGB, - TEXDP3TEX, - TEXM3X2DEPTH, - TEXDP3, - TEXM3X3, - TEXDEPTH, - CMP, - BEM, - DP2ADD, - DSX, - DSY, - TEXLDD, - SETP, - TEXLDL, - BREAKP, - - Count, - - Phase = 0xfffd, - Comment = 0xfffe, - End = 0xffff - }; - }; - - const char* getName(Dx9bcOpcode::Enum _opcode); - - struct Dx9bcResourceDim - { - enum Enum - { - Unknown, - Texture1D, - Texture2D, - TextureCube, - Texture3D, - }; - }; - - struct Dx9bcOperandType - { - enum Enum - { - Temp, - Input, - Const, - Texture, - RastOut, - AttrOut, - TexCrdOut, - Output, - ConstInt, - ColorOut, - DepthOut, - Sampler, - Const2, - Const3, - Const4, - ConstBool, - Loop, - TempFloat16, - MiscType, - Label, - Predicate, - - Count - }; - }; - - struct Dx9bcDeclUsage - { - enum Enum - { - Position, - BlendWeight, - BlendIndices, - Normal, - Psize, - Texcoord, - Tangent, - Binormal, - TessFactor, - PositionT, - Color, - Fog, - Depth, - Sample, - - Count - }; - }; - - struct Dx9bcOperandAddrMode - { - enum Enum - { - Absolute, - Relative, - - Count - }; - }; - - struct Dx9bcSubOperand - { - Dx9bcSubOperand() { /* not pod */ } - - Dx9bcOperandType::Enum type; - uint32_t regIndex; - uint8_t swizzleBits; - }; - - struct Dx9bcOperand - { - Dx9bcOperand() { /* not pod */ } - - Dx9bcOperandType::Enum type; - uint32_t regIndex; - - bool destination; - - // Destination - uint8_t writeMask; - bool saturate; - bool partialPrecision; - bool centroid; - - // Source - uint8_t swizzleBits; - - Dx9bcOperandAddrMode::Enum addrMode; - Dx9bcSubOperand subOperand; - }; - - struct Dx9bcInstruction - { - Dx9bcInstruction() { /* not pod */ } - - Dx9bcOpcode::Enum opcode; - uint16_t length; - uint8_t numOperands; - uint8_t numValues; - uint8_t specific; - bool predicated; - bool coissue; - - Dx9bcOperand operand[6]; - int32_t value[4]; - }; - - int32_t read(bx::ReaderI* _reader, Dx9bcInstruction& _instruction, bx::Error* _err); - int32_t write(bx::WriterI* _writer, const Dx9bcInstruction& _instruction, bx::Error* _err); - int32_t toString(char* _out, int32_t _size, const Dx9bcInstruction& _instruction); - - struct Dx9bcShader - { - Dx9bcShader() { /* not pod */ } - - stl::vector byteCode; - }; - - int32_t read(bx::ReaderSeekerI* _reader, Dx9bcShader& _shader, bx::Error* _err); - int32_t write(bx::WriterI* _writer, const Dx9bcShader& _shader, bx::Error* _err); - - struct Dx9bc - { - Dx9bc() { /* not pod */ } - - uint32_t version; - Dx9bcShader shader; - }; - - int32_t read(bx::ReaderSeekerI* _reader, Dx9bc& _dx9bc, bx::Error* _err); - int32_t write(bx::WriterSeekerI* _writer, const Dx9bc& _dx9bc, bx::Error* _err); - - typedef bool (*Dx9bcParseFn)(uint32_t _offset, const Dx9bcInstruction& _instruction, void* _userData); - void parse(const Dx9bcShader& _src, Dx9bcParseFn _fn, void* _userData, bx::Error* _err = NULL); - - typedef void (*Dx9bcFilterFn)(Dx9bcInstruction& _instruction, void* _userData); - void filter(Dx9bcShader& _dst, const Dx9bcShader& _src, Dx9bcFilterFn _fn, void* _userData, bx::Error* _err = NULL); - -} // namespace bgfx - -#endif // BGFX_SHADER_DX9BC_H diff --git a/src/shader_spirv.cpp b/src/shader_spirv.cpp index 87a22b2811d..e796ac0c3ac 100644 --- a/src/shader_spirv.cpp +++ b/src/shader_spirv.cpp @@ -940,7 +940,7 @@ namespace bgfx if (_instruction.opcode >= SpvOpcode::Count) { - BX_ERROR_SET(_err, BGFX_SHADER_SPIRV_INVALID_INSTRUCTION, "SPIR-V: Invalid instruction."); + BX_ERROR_SET(_err, kShaderInvalidInstruction, "SPIR-V: Invalid instruction."); return size; } @@ -1158,7 +1158,7 @@ namespace bgfx || _spirv.header.magic != SPIRV_MAGIC ) { - BX_ERROR_SET(_err, BGFX_SHADER_SPIRV_INVALID_HEADER, "SPIR-V: Invalid header."); + BX_ERROR_SET(_err, kShaderInvalidHeader, "SPIR-V: Invalid header."); return size; } @@ -1198,7 +1198,7 @@ namespace bgfx , instruction.length , getName(instruction.opcode) ); - BX_ERROR_SET(_err, BGFX_SHADER_SPIRV_INVALID_INSTRUCTION, "SPIR-V: Invalid instruction."); + BX_ERROR_SET(_err, kShaderInvalidInstruction, "SPIR-V: Invalid instruction."); return; } diff --git a/src/shader_spirv.h b/src/shader_spirv.h index f94422a7f9f..736fdc225ad 100644 --- a/src/shader_spirv.h +++ b/src/shader_spirv.h @@ -8,9 +8,6 @@ #include -BX_ERROR_RESULT(BGFX_SHADER_SPIRV_INVALID_HEADER, BX_MAKEFOURCC('S', 'H', 0, 1) ); -BX_ERROR_RESULT(BGFX_SHADER_SPIRV_INVALID_INSTRUCTION, BX_MAKEFOURCC('S', 'H', 0, 2) ); - #define SPV_CHUNK_HEADER BX_MAKEFOURCC(0x03, 0x02, 0x23, 0x07) namespace bgfx diff --git a/src/version.h b/src/version.h index c0d7b9746ba..ce413a03ef8 100644 --- a/src/version.h +++ b/src/version.h @@ -9,5 +9,5 @@ * */ -#define BGFX_REV_NUMBER 8546 -#define BGFX_REV_SHA1 "878767e751e332309369beecb83e86494f90f8fa" +#define BGFX_REV_NUMBER 8603 +#define BGFX_REV_SHA1 "6a914f5b13bb8b343a0a85b29e57613c2aac718d" diff --git a/src/vertexlayout.cpp b/src/vertexlayout.cpp index e43221fa8ca..85010d8ebc1 100644 --- a/src/vertexlayout.cpp +++ b/src/vertexlayout.cpp @@ -14,15 +14,6 @@ namespace bgfx { - static const uint8_t s_attribTypeSizeD3D9[AttribType::Count][4] = - { - { 4, 4, 4, 4 }, // Uint8 - { 4, 4, 4, 4 }, // Uint10 - { 4, 4, 8, 8 }, // Int16 - { 4, 4, 8, 8 }, // Half - { 4, 8, 12, 16 }, // Float - }; - static const uint8_t s_attribTypeSizeD3D1x[AttribType::Count][4] = { { 1, 2, 4, 4 }, // Uint8 @@ -43,9 +34,8 @@ namespace bgfx static const uint8_t (*s_attribTypeSize[])[AttribType::Count][4] = { - &s_attribTypeSizeD3D9, // Noop + &s_attribTypeSizeD3D1x, // Noop &s_attribTypeSizeD3D1x, // Agc - &s_attribTypeSizeD3D9, // Direct3D9 &s_attribTypeSizeD3D1x, // Direct3D11 &s_attribTypeSizeD3D1x, // Direct3D12 &s_attribTypeSizeD3D1x, // Gnm @@ -55,7 +45,7 @@ namespace bgfx &s_attribTypeSizeGl, // OpenGL &s_attribTypeSizeD3D1x, // Vulkan &s_attribTypeSizeD3D1x, // WebGPU - &s_attribTypeSizeD3D9, // Count + &s_attribTypeSizeD3D1x, // Count }; BX_STATIC_ASSERT(BX_COUNTOF(s_attribTypeSize) == RendererType::Count+1); diff --git a/tools/shaderc/shaderc.cpp b/tools/shaderc/shaderc.cpp index 1d05d968323..694d9d883f5 100644 --- a/tools/shaderc/shaderc.cpp +++ b/tools/shaderc/shaderc.cpp @@ -100,7 +100,6 @@ namespace bgfx { ShadingLang::ESSL, 300, "300_es" }, { ShadingLang::ESSL, 310, "310_es" }, { ShadingLang::ESSL, 320, "320_es" }, - { ShadingLang::HLSL, 300, "s_3_0" }, { ShadingLang::HLSL, 400, "s_4_0" }, { ShadingLang::HLSL, 500, "s_5_0" }, { ShadingLang::Metal, 1000, "metal" },