Commit Graph

7801 Commits

Author SHA1 Message Date
Бранимир Караџић
fcbc500cec Updated vulkan headers. 2021-03-10 21:32:36 -08:00
Бранимир Караџић
57472fd18a Updated ImGui. 2021-03-10 21:23:12 -08:00
C. M. Barth
f218d7ed13
Support dynamic SwapChainPanel changes for DirectX11 UWP scenarios (#2422)
* remove swap chain from consumer

* fix swap chain cleanup

* renderer workaround

* cleanup changes around platform data

* only update swapchainpanels

* revert spacing

* favor NULL over nullptr
2021-03-08 15:13:04 -08:00
Aleš Mlakar
dc3a92ef99
Vulkan shader compiler uniform size fix (>255). (#2421)
Co-authored-by: Aleš Mlakar <ales.ambits@gmail.com>
2021-03-08 07:48:17 -08:00
pezcode
02e4786e04
Vulkan: fix sync hazards (#2419)
- write-after-write when blitting to the same image
- missing barrier between compute dispatches if a view has no draws
2021-03-06 18:56:55 -08:00
Бранимир Караџић
a735fccd15 Cleanup. 2021-03-05 18:07:45 -08:00
Бранимир Караџић
b3dcc83d66 Fixed warning. 2021-03-04 19:09:10 -08:00
Бранимир Караџић
38a559ea89 Fixed build. 2021-03-04 10:01:42 -08:00
Бранимир Караџић
cf1d24cb38 Fixed OSX build. 2021-03-04 09:57:28 -08:00
Бранимир Караџић
104a20754c VK: Enabled VK_EXT_line_rasterization. 2021-03-03 16:56:19 -08:00
pezcode
28be8bba61
Vulkan extension detection fix (#2418)
* Fix variable naming

* Check if VK_KHR_get_physical_device_properties2 is actually supported

* Fix extension detection logic

Device extension data wasn't cleared after enumerating each physical device, essentially checking if ANY device supports that extensions, not just the selected device
2021-03-03 16:55:01 -08:00
Бранимир Караџић
998947d58c VK: Disabled VK_EXT_line_rasterization. 2021-03-03 12:10:50 -08:00
Бранимир Караџић
696ab702fe Merge branch 'master' of github.com:bkaradzic/bgfx 2021-03-03 08:28:11 -08:00
Бранимир Караџић
3dd78ef893 Cleanup. 2021-03-03 08:27:57 -08:00
Бранимир Караџић
e30c32ed86 Fixed GCC errors & warnings. 2021-03-02 18:26:44 -08:00
pezcode
f9679fde50
Misc. Vulkan features and fixes (#2417)
* Vulkan: add conservative rasterization

* Vulkan: check device features for caps and state

* Vulkan: add line AA

* Don't assert in init()

* Vulkan: fix swapchain reset logic and handle lost surface

* Vulkan: report dedicated memory info in Stats

* Vulkan: fix sRGB backbuffer pipeline hash

* Vulkan: check BGFX_RESET_SUSPEND
2021-03-02 18:23:55 -08:00
Бранимир Караџић
58f0d55612 Cleanup. 2021-02-28 18:59:05 -08:00
pezcode
ece0c4e1a1
Vulkan: ignore BGFX_CLEAR_STENCIL if depth attachment has no stencil (#2413) 2021-02-28 15:16:19 -08:00
Branimir Karadžić
8e75b38207 Don't include compute on HLSL 3 and below. 2021-02-28 13:41:16 -08:00
pezcode
302c978b1d
Make shaderc output independent of backend enums (#2411)
* Fix typo in SPIR-V id

* Use backend-agnostic shaderc output

...as opposed to directly storing and comparing against Vulkan and WebGPU enums. This is backwards-compatible with existing code and shaders.

* Remove comments and Undefined value
2021-02-28 12:38:12 -08:00
Julian Sikorski
39cdaace39
Fix building with wayland (#2412) 2021-02-28 10:15:09 -08:00
Branimir Karadžić
da555b0721 Rebuild tools embedded shaders. 2021-02-26 18:49:02 -08:00
Branimir Karadžić
005d119cae Fixed MinGW warning. 2021-02-26 18:48:43 -08:00
pezcode
9999d43374
Vulkan: fix scratch buffer size calculation (#2409) 2021-02-26 11:40:38 -08:00
Бранимир Караџић
e4d2451993 Made Vulkan default renderer backend on Linux. 2021-02-25 19:44:37 -08:00
Бранимир Караџић
453adcf661 Replaced D24* with D32F depth format. 2021-02-25 19:44:13 -08:00
Branimir Karadžić
35b7bacfb9 Rebuilt embedded shaders. 2021-02-25 19:33:34 -08:00
Branimir Karadžić
befe56f947 Fixed crash when program doesn't have fragment shader. 2021-02-25 19:00:54 -08:00
Branimir Karadžić
d25c14e52f Removed stupid todo assert. 2021-02-25 18:52:00 -08:00
Бранимир Караџић
f5cdf6e4bf Cleanup. 2021-02-25 18:40:30 -08:00
pezcode
8d51de5c5d
Various Vulkan fixes (#2408)
* Vulkan: query max anisotropy

...instead of hardcoding it to 4

* Vulkan: use BGFX_CONFIG_MIP_LOD_BIAS

* Vulkan: consider BGFX_CONFIG_PREFER_DISCRETE_GPU at device selection

* Vulkan: implement resizing for textures with backbuffer ratio size

* Vulkan: use correct framebuffer attachment layer and mip

* Vulkan: bind correct image mip

* Cleanup

* Vulkan: add indirect draw support

* Vulkan: add support for BGFX_DEBUG_WIREFRAME

* Vulkan: check all extensions and layers

... not just the first 64

* Vulkan: add support for VPRT

https://github.com/bkaradzic/bgfx/issues/2320
2021-02-25 14:31:18 -08:00
Бранимир Караџић
0afe0d2330 Cleanup. 2021-02-24 00:09:34 -08:00
Бранимир Караџић
8d622e4cfa Cleanup. 2021-02-23 21:16:07 -08:00
Бранимир Караџић
b157d15e43 Cleanup. 2021-02-23 12:54:14 -08:00
pezcode
fcc44dc107
Vulkan sync rewrite (#2402)
* Vulkan: allow setting image debug name

* Vulkan: record multiple frames ahead of the GPU

...instead of stalling on the CPU after each submit. Controllable with init.resolution.maxFrameLatency, same as the D3D11/12 backends.

* Vulkan: some additional checks at swapchain creation

* Vulkan: stall for screenshot

* Vulkan: move blit out of render pass

* Vulkan: deferred framebuffer deletion

* Vulkan: fix cubemap blit

* Cleanup

* Vulkan: storage image must have GENERAL layout and has no sampler

* Vulkan: use slightly more fine-grained barriers

* Vulkan: readTexture should stall, too

* Cleanup

* Vulkan: selective acquire

Don't acquire a swapchain image if no view renders to the backbuffer, avoiding stalls due to vsync or reaching the backbuffer limit

* Vulkan: deferred program and state cache deletion

* Vulkan: fix debug blit
2021-02-23 12:53:12 -08:00
Juan Carlos González Amestoy
8b209012b1
- Implemented BGFX_CAPS_SWAP_CHAIN in OpenGl on Macos (#2400) 2021-02-22 08:45:25 -08:00
Бранимир Караџић
efaa20b4a3 Cleanup. 2021-02-16 09:12:04 -08:00
Kitchen
966b4b8df2
fix update dynamic buffer with compute read flag only (#2394)
* fix resize buffer with compute read/write flag error

* only update dynamic buffer with compute read flag

Co-authored-by: chenjunjie <junjie020@163.com>
2021-02-16 09:06:46 -08:00
Бранимир Караџић
fb01f5a448 Updated spirv-cross. 2021-02-15 19:26:35 -08:00
Бранимир Караџић
9d44d85459 Updated spirv-tools. 2021-02-15 19:26:23 -08:00
Бранимир Караџић
c255c72ef5 Updated spirv-headers. 2021-02-15 19:26:10 -08:00
Бранимир Караџић
2f9efc1edc Updated glslang. 2021-02-15 19:25:55 -08:00
Бранимир Караџић
e2ac2e462d Updated vulkan headers. 2021-02-15 19:25:39 -08:00
Бранимир Караџић
fdd2eff360 Updated ImGui. 2021-02-15 19:17:21 -08:00
pheonix
d89ff312a7
Fix leak - using no fancy smanshy new age voodoo (#2390) 2021-02-11 21:43:22 -08:00
Бранимир Караџић
0cbc215c02 Cleanup. 2021-02-11 20:32:52 -08:00
pezcode
f983367d75
Vulkan synchronization fixes (#2386)
* Fix out of bounds index for unknown device types

* Vulkan: Insert barrier before image host reads

* Vulkan: Make commands wait for the wait semaphore

Making commands wait at BOTTOM_OF_PIPE is a no-op, resulting in instant execution

* Vulkan: Insert barrier between views/dispatches instead of waiting on the host

* Vulkan: Fix determination of access flag from image layout

This fixes two write-after-write races with copy commands after a layout transition to VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL

* Add BGFX_MAX_FRAME_LATENCY define

Affected backends either used a magic value of 3 or defined their own XX_MAX_FRAMES_IN_FLIGHT to be 3

* Vulkan: Include indirect draw in pipeline barrier

* Vulkan: honor init.resolution.numBackBuffers for swapchain size

* Make max frame latency configurable at compile time
2021-02-11 20:29:52 -08:00
Бранимир Караџић
0123d43c96 Fixed build. 2021-02-11 08:35:16 -08:00
Бранимир Караџић
b5afc2c81c Updated ImGui. 2021-02-10 22:28:11 -08:00
Бранимир Караџић
7daf5e0ba7 Cleanup. 2021-02-07 15:01:02 -08:00