Commit Graph

7811 Commits

Author SHA1 Message Date
Бранимир Караџић
3214539bad Fixing WebGL + Android instancing. 2021-05-18 20:22:46 -07:00
Бранимир Караџић
6ca5060ce8 Updated spirv-cross. 2021-05-14 19:37:10 -07:00
Бранимир Караџић
22bb919338 Updated spirv-tools. 2021-05-14 19:37:02 -07:00
Бранимир Караџић
1a551d8b9f Updated spirv-headers. 2021-05-14 19:36:46 -07:00
Бранимир Караџић
5d7814c334 Updated glslang. 2021-05-14 19:35:38 -07:00
Бранимир Караџић
e532aba391 Updated vulkan headers. 2021-05-14 19:31:53 -07:00
Бранимир Караџић
3b87b65d18 Updated cgltf. 2021-05-14 19:29:23 -07:00
Бранимир Караџић
5c1d99cb8c Fixed build. 2021-05-13 20:31:20 -07:00
Бранимир Караџић
9d8e73f1c1 Fixed warnings. 2021-05-13 12:48:27 -07:00
Бранимир Караџић
9cd7cbb877 Updated ImGui. 2021-05-08 08:02:39 -07:00
Бранимир Караџић
c42a3a5d4d Cleanup. 2021-05-08 07:29:50 -07:00
Daniel Collin
c9bf791eaa
Fixed multiview issues with dear imgui (#2511)
When using the multview / docking feature of dear imgui (availible on the main repo in the docking branch) dear imgui will use desktop relative coordinates instead of window relative. This causing the rendering to get "offseted" if not handled correctly.
Before this change the rendering matrix wasn't used at all and this has now been changed in the vertex shader.

Notice this change is fully backwards compatible with the relative windows as well as the upper left corner will always be set to 0,0 in that case thus this change will work with both versions.

I also added some changes to skip rendering if not needed (based on the the other backend implementations for dear imgui such as the OpenGL one)
2021-05-08 07:26:06 -07:00
Бранимир Караџић
41ab81fd51 Cleanup. 2021-05-06 10:59:28 -07:00
Sebastian Marketsmueller
582dfc1e4c
Fix texture validation logic (#2509)
* fix mip level computation for asmjs and add support for srgb textures in es2/webgl

* fix BX_TRACE in glcontext_html5.cpp

* fix wrong logic in texture validation

Co-authored-by: Sebastian Marketsmueller <sebastianm@hq.unity3d.com>
Co-authored-by: Vladimir Vukicevic <vladimir@pobox.com>
2021-05-06 10:58:37 -07:00
pezcode
97c4abef01
GLES: fix compilation (#2508) 2021-05-05 14:24:35 -07:00
pezcode
2c21f68998
VPRT support for D3D11, D3D12, GL (#2507)
* glsl-optimizer: whitelist ARB_shader_viewport_layer_array_enable

* D3D11: remove duplicate structs and enums

* D3D11: report BGFX_CAPS_VIEWPORT_LAYER_ARRAY

* D3D12: report BGFX_CAPS_VIEWPORT_LAYER_ARRAY

* GL: support for BGFX_CAPS_VIEWPORT_LAYER_ARRAY

* D3D11: multi-layer MSAA resolve

* D3D12: multi-layer MSAA resolve

* D3D12: fix binding multi-layer resolved textures

* GL: fix multi-layer rendertarget creation
2021-05-05 11:58:21 -07:00
pezcode
56fbe55b3d
Vulkan: occlusion queries, housekeeping - attempt 2 (#2506)
* Cleanup

* Request host-cached memory for readback

* Request device-visible memory for the uniform buffer

* Use more fine-grained image memory barrier stages

* Don't rebind vertex and index buffers if not necessary

* Timer queries

* Don't transition images during a renderpass

* Cache descriptor sets

* Trigger RenderDoc capture if requested

* Fix invalid command buffer after surface recreation

* Perform clear and blit before compute

* Use init.debug to enable validation layers

...instead of always enabling them in debug config

* Only resolve framebuffer once

* Report number of primitives without index buffer

* Minimize state changes

* Occlusion queries

* Transition swapchain image from undefined layout

* Make sure we have a combined graphics and compute queue family

Existing code already makes that assumption, otherwise we'd need different command queues and explicit resource queue transitions. The spec also guarantees that a device with such a queue family should exist.

* Release cached image views on texture destruction

* Fix stencil-only clear

* Fix non-zero integer format clear

* Annotate all optional functions with their extensions

* Support for BGFX_SAMPLER_SAMPLE_STENCIL

* Remove unused extension functions

* Support for BGFX_SAMPLER_BORDER_COLOR

* Undo descriptor set cache

Try this again in another PR... the hashing doesn't quite work with some bind combinations, and the cache needs a better eviction strategy

* Don't start renderpass for empty draw calls

* Advertize graphics debugger, if present

ie. RenderDoc

* Cleanup

* Only enable required features and extensions

* Don't spam warning about swapchain format fallback

* Cleanup
2021-05-03 10:17:43 -07:00
Бранимир Караџић
9528c5d68a Revert "Vulkan: occlusion queries, housekeeping (#2505)"
This reverts commit 2fb67a707b.
2021-05-02 20:15:16 -07:00
pezcode
2fb67a707b
Vulkan: occlusion queries, housekeeping (#2505)
* Cleanup

* Request host-cached memory for readback

* Request device-visible memory for the uniform buffer

* Use more fine-grained image memory barrier stages

* Don't rebind vertex and index buffers if not necessary

* Timer queries

* Don't transition images during a renderpass

* Cache descriptor sets

* Trigger RenderDoc capture if requested

* Fix invalid command buffer after surface recreation

* Perform clear and blit before compute

* Use init.debug to enable validation layers

...instead of always enabling them in debug config

* Only resolve framebuffer once

* Report number of primitives without index buffer

* Minimize state changes

* Occlusion queries

* Transition swapchain image from undefined layout

* Make sure we have a combined graphics and compute queue family

Existing code already makes that assumption, otherwise we'd need different command queues and explicit resource queue transitions. The spec also guarantees that a device with such a queue family should exist.

* Release cached image views on texture destruction

* Fix stencil-only clear

* Fix non-zero integer format clear

* Annotate all optional functions with their extensions

* Support for BGFX_SAMPLER_SAMPLE_STENCIL

* Remove unused extension functions

* Support for BGFX_SAMPLER_BORDER_COLOR

* Undo descriptor set cache

Try this again in another PR... the hashing doesn't quite work with some bind combinations, and the cache needs a better eviction strategy

* Don't start renderpass for empty draw calls

* Advertize graphics debugger, if present

ie. RenderDoc

* Cleanup

* Only enable required features and extensions

* Don't spam warning about swapchain format fallback

* Cleanup
2021-05-02 20:09:33 -07:00
Бранимир Караџић
84fcbcd240 Fixed makefile. 2021-04-30 17:46:34 -07:00
James Fulop
43db77159d
fix unintialized memory (#2499)
this then caused `DX_RELEASE(m_msaaRt, 0);` in `error:` to fire an assert since it tries to deref the garbage ptr
2021-04-29 17:46:24 -07:00
Бранимир Караџић
9310d19141 Cleanup. 2021-04-27 09:18:22 -07:00
Бранимир Караџић
d01f86a6a9 Cleanup. 2021-04-26 19:54:58 -07:00
Бранимир Караџић
67e628d8e3 Cleanup. 2021-04-25 20:23:36 -07:00
Бранимир Караџић
7ae40fb95d texturev: Added renderer .ini setting. 2021-04-25 19:09:26 -07:00
Branimir Karadžić
f27f44f974 texturev: Updated shaders. 2021-04-25 18:07:57 -07:00
Branimir Karadžić
29aa15725d glsl-optimizer: Fixed output of texture sampling with texture array lod. 2021-04-25 18:07:13 -07:00
Бранимир Караџић
4a53a3172d Updated ImGui. 2021-04-23 22:32:54 -07:00
Бранимир Караџић
c319aa909e Fixed build. 2021-04-23 22:30:21 -07:00
SnapperTT
ffde01f8c9
Fix change in blend rgba not being detected as a state change (#2494) 2021-04-23 20:15:01 -07:00
Бранимир Караџић
117c999d6e Added bgfx::Init capabilities mask. 2021-04-22 20:18:48 -07:00
pezcode
87855128bb
Vulkan: merge shared shader bindings (#2492) 2021-04-22 12:09:54 -07:00
Бранимир Караџић
74b146eb83 Fixed build. 2021-04-21 22:11:36 -07:00
pezcode
8e76e5e85c
Vulkan: multiple windows, capture support (#2491)
* Use correct aspect masks for stencil-only textures

* Make vkEnumerateInstanceVersion optional

This makes init not abort on Vulkan 1.0

* Move swapchain into FrameBufferVK

* Remove duplicate render pass creation code

* Manually resolve MSAA backbuffer

not guaranteed to be supported, but reduces resolve operations from 2 * (num views using backbuffer) to 1

* Support for multiple windows (BGFX_CAPS_SWAP_CHAIN)

* Capture support (BGFX_RESET_CAPTURE)

* Display present timings

* Recreate surface if native window handle changed

* Delayed swapchain deletion on resize

no more vkDeviceWaitIdle

* Recreate surface if BGFX_RESET_HIDPI is toggled

* Don't recreate swapchain if only the MSAA sample count changed

* Some extra caps checks

* Configurable backbuffer depth format

* Configurable backbuffer color format
2021-04-21 18:41:49 -07:00
Hugo Amnov
9320a20e72
WebGPU: Don't need bindings backward compatibility (#2488) 2021-04-21 12:17:55 -07:00
Hugo Amnov
ec36cf9872
Simplify SPIRV bindings shifts (shaderc bin version 11) (#2487) 2021-04-21 09:33:12 -07:00
Hugo Amnov
07e9af249c
Cleanup old debug and Metal code in SPIRV shaderc paths (#2484)
* Shaderc: Remove unused MTL path in SPIRV compiler

* Shaderc: Remove unused SPIRV reflection code
2021-04-21 07:45:03 -07:00
Hugo Amnov
9695c0b155
WebGPU: Update to Attachments changes (#2485) 2021-04-21 07:39:38 -07:00
Hugo Amnov
24be4a38d0
WebGPU: Add texture format to shaderc (bin version 10) + streamline storage Images in shaders (#2482)
* WebGPU: Add texture format (shaderc bin version 10)

* WebGPU: Simplify storage images + Fix format decorations

* Shaderc: Cleanup Texture name assumption in textures
2021-04-20 20:18:49 -07:00
pezcode
e8d4b3dcce
Fixes for multiple windows and example 22 (#2483) 2021-04-19 15:30:03 -07:00
Бранимир Караџић
19fe73d00d Cleanup. 2021-04-18 21:16:56 -07:00
Hugo Amnov
daad11fa0c
Fix 43-denoise when FB format invalid (#2480) 2021-04-18 21:14:57 -07:00
Бранимир Караџић
e626440d86 Revert "Updated vulkan headers."
This reverts commit 5299561836.
2021-04-18 17:01:17 -07:00
Бранимир Караџић
5299561836 Updated vulkan headers. 2021-04-18 13:36:51 -07:00
Бранимир Караџић
85a6fb9762 Updated spirv-cross. 2021-04-18 13:28:14 -07:00
Бранимир Караџић
e685d5fe63 Updated spirv-tools. 2021-04-18 13:27:56 -07:00
Бранимир Караџић
5ff88cb761 Updated spirv-headers. 2021-04-18 13:27:36 -07:00
Бранимир Караџић
f323398895 Updated glslang. 2021-04-18 13:27:15 -07:00
Hugo Amnov
a176685a2c
Cleanup imgui shaders (#2479)
* Remove unused Imgui shaders

* Cleanup Imgui shaders position attribute
2021-04-18 12:58:00 -07:00
Hugo Amnov
b2d72b1495
Shaderc: Add missing raw compilation targets (#2478) 2021-04-18 11:45:33 -07:00