Commit Graph
412 Commits
Author SHA1 Message Date
Branimir Karadžić 1fae5a8b06 D3D11/D3D12/VK/WebGPU: Fixed blend-state, and blend factor for MRT. (#3825) 2026-07-13 01:43:24 +00:00
Branimir Karadžić 2877442edc Fixed BC texture block-size rounding in readback/create/update. (#3822) 2026-07-12 00:07:51 -07:00
Branimir Karadžić 3920502547 VK: Mark BGRA8/RGBA8 as valid backbuffer texture formats when in headless mode. (#3824) 2026-07-12 00:00:47 -07:00
Branimir Karadžić 7b38346442 Added stencil write mask. (#3821) 2026-07-11 23:46:38 -07:00
Branimir Karadžić f30da05ce3 Metal: Cache last pipeline. Dedup pipeline binds. (#3799) 2026-06-28 22:47:43 +00:00
Branimir Karadžić fd1a8b48fc VK: Cache last pipeline. (#3798) 2026-06-28 11:23:54 -07:00
Branimir Karadžić 40aa1c2220 VK: Grow descriptor pools on demand. (#3793) 2026-06-28 06:14:30 +00:00
Kyle Emmerich c9bb37b668 Vulkan: Fixed capture buffer size. (#3783)
captureSize used m_width for the row count, but the swap-chain readback
copies m_height rows (capture() reports _size = height * pitch, and
ReadbackVK::pitch() is width * bpp/8). A backbuffer taller than wide
under-allocates the readback buffer and overruns it. Use m_height, which
matches the GL backend's width*height*4.
2026-06-25 15:43:37 +00:00
Branimir Karadžić fd5fa66370 VK: Fixed present crash on resize. (#3773) 2026-06-20 06:44:18 -07:00
Branimir Karadžić 73629ada72 Dedup bindings per encoder. (#3772) 2026-06-20 05:22:12 +00:00
Branimir Karadžić 4f101d98be Don't present BGFX_FRAME_FLUSH frames. Fixed D3D12/VK flush sync. (#3771) 2026-06-19 19:39:42 +00:00
Branimir Karadžić 09eaac37ae VK: Added descriptor set cache. (#3770) 2026-06-19 18:21:52 +00:00
Francis De Brabandere 1d8f6d8ee9 Vulkan: do not block acquiring window swap chain images (#3752)
Acquiring waited forever for an image on every swap chain from the one
submit thread, so a single swap chain that is no longer served (e.g. a
fully occluded window on a Wayland compositor without fifo-v1, which
stops releasing buffers) stalled rendering of all windows. Window swap
chains now acquire without blocking and are skipped for the frame when
no image is available; only the main back buffer may block, as that is
the frame pacing. Image availability acts as natural back pressure, no
compositor specific behavior is needed.
2026-06-17 14:05:02 +00:00
Francis De Brabandere edbec2f2cc Vulkan: recreate window swap chains flagged for recreation (#3751)
When acquiring a window frame buffer swap chain returns
VK_SUBOPTIMAL_KHR or VK_ERROR_OUT_OF_DATE_KHR it is flagged with
m_needToRecreateSwapchain and acquire then refuses forever: only the
main back buffer is recreated (by updateResolution), so the window
permanently stops updating (easily triggered by moving the window to a
display with a different scale). Recreate flagged window swap chains
when acquiring them.
2026-06-17 03:56:24 +00:00
Branimir Karadžić d5ea625272 Added video decoder support. (#3756) 2026-06-14 06:49:15 +00:00
Branimir Karadžić 1dac10c2ad Fixed transcoded texture update using wrong decode/copy pitch with explicit source pitch. (#3747) 2026-06-08 23:02:33 -07:00
Branimir Karadžić f19f599cde D3D11/D3D12/VK: Fixed partial update of transcoded texture overrunning buffer. Closes #2713. (#3744) 2026-06-08 21:52:24 -07:00
Branimir Karadžić e92490c3f7 Added _layer parameter to bgfx::readTexture for texture array/cubemap readback. Closes #3235. (#3737) 2026-06-07 09:22:37 -07:00
Branimir Karadžić 944ccff1e4 D3D11/D3D12/VK/WebGPU: Fixed independent blend _rgba. (#3736) 2026-06-07 08:37:37 -07:00
Branimir Karadžić 81b63b81c9 Unified ChunkedScratchBuffer implementation. (#3730) 2026-06-07 03:29:09 +00:00
Branimir Karadžić 11151de78d Added setTexture view API. (#3728) 2026-06-06 17:34:02 +00:00
Branimir Karadžić 7b8927049a Fix updateTexture2D pitch handling for compressed textures. Fixed #3705. (#3722) 2026-06-02 04:22:46 +00:00
Branimir Karadžić 7d03e160fa Fix MSAA + mipmaps combination on D3D11/D3D12/Vulkan/Metal. (#3717) 2026-05-21 22:53:17 +00:00
Branimir Karadžić de332e5937 VK: Fixed VK_EXT_swapchain_maintenance1 missing instance exp deps, and timer query inside render pass. (#3711)
* Fixed dynamic frame vsync on RADV.

* Fix timer query inside render pass.
2026-05-17 23:51:31 +00:00
Branimir Karadžić d4c91be81d Cleanup. (#3710) 2026-05-17 16:43:20 +00:00
Vincent Bousquet a8250ceaf9 Lighter per frame VSync on/off for D3D11, D3D12 & Vulkan (#3706) 2026-05-17 15:44:33 +00:00
Branimir Karadžić 65f9425d8c Updated to new SIMD. (#3699) 2026-05-03 18:51:10 +00:00
Branimir Karadžić 58faaadf1c VK: Split FrameBufferVK::acquire into swap-chain acquire + markDirty(). (#3694) 2026-04-27 18:32:53 +00:00
attilaz b2a7d94d57 Update renderer_vk.cpp (#3693)
Fix PROFILE_SCOPE typo
2026-04-27 14:22:28 +00:00
Branimir Karadžić 331783cf9a Renamed bx::uint32_min/max/clamp/cntlz/cnttz/mod to typed equivalents. (#3692) 2026-04-27 04:19:08 +00:00
Branimir Karadžić 50bf41b224 Fixed stremMask check. (#3682) 2026-04-21 11:21:40 -07:00
unravel-dev 4212c8ed27 Fix BGFX_RESET_VSYNC not affecting secondary swap chains on D3D11, Vulkan, OpenGL (#3675)
Toggling BGFX_RESET_VSYNC via bgfx::reset() only updated the main/init swap
chain. Secondary swap chains created through createFrameBuffer(nwh, ...) kept
their initial vsync state, leaving framerate capped at refresh rate. D3D12
already handled this correctly.

D3D11: forward present flags to FrameBufferD3D11::present so it can pass
DXGI_PRESENT_ALLOW_TEARING alongside syncInterval=0. Compute presentFlags once
in flip() and reuse for both secondary framebuffers and the main swap chain.

Vulkan: in updateResolution, iterate m_windows and call FrameBufferVK::update
on each valid secondary framebuffer so SwapChainVK::update sees the new
BGFX_RESET_VSYNC and recreates the swapchain with the correct present mode.

OpenGL (WGL/EGL): wglSwapIntervalEXT is per-context, eglSwapInterval is
per-surface. Cache the desired interval in GlContext::m_swapInterval and
re-apply it in makeCurrent() whenever a different context/surface becomes
current, so secondary SwapChainGL instances pick up the current value. Also
honor the initial BGFX_RESET_VSYNC flag in create() instead of hard-coding 0.
2026-04-19 22:35:57 +00:00
Branimir Karadžić 0b0ddb7f6b Added generate mips on frame buffer resolve. (#3664) 2026-04-17 05:04:57 +00:00
Vincent Bousquet 8a070c8e27 Vulkan: fix missing swapchain image acquire semaphore (#3655) 2026-04-09 21:20:28 +00:00
Branimir Karadžić 48a1f88bcc VK: Lazy transition texture state, instead of bitching about it. (#3653) 2026-04-07 21:03:08 +00:00
Branimir Karadžić 7c0d813b83 Remove unused shader parsers. (#3651)
* Removed shader parsers.

* Removed shader parsers.
2026-04-05 02:54:27 +00:00
Branimir Karadžić 9a1ce9c60b Fixed #3647. (#3648) 2026-03-31 16:34:09 -07:00
Branimir Karadžić 3118337be2 VK: Fixed crash when using BGFX_FRAME_FLUSH. (#3640) 2026-03-22 07:09:15 +00:00
Branimir Karadžić 42b52a7a51 VK: Fix default non-external texture state. (#3635) 2026-03-21 08:56:41 -07:00
Branimir Karadžić f26d3b1342 Use render pass creation data for render pass hash. (#3636) 2026-03-21 07:14:13 +00:00
Daniele Bartolini 20a637e3e6 VK: only enable non-opaque compositing if requested (#3630) 2026-03-13 02:47:58 +00:00
Branimir Karadžić a73c12db8f Added bgfx::AttribType::Int8/Uint16. (#3626) 2026-03-09 06:13:51 +00:00
Бранимир Караџић b121263362 VK: Fix default texture state. 2026-02-24 07:32:35 -08:00
Бранимир Караџић 33930ac14a VK: Add external texture. 2026-02-23 22:28:11 -08:00
Branimir Karadžić 91814c9729 Added flag for texture formats that can be used as back-buffer format. (#3605) 2026-02-22 02:44:26 +00:00
Branimir Karadžić 651c203116 Undo default back buffer format. Fix VK. (#3604) 2026-02-20 03:14:27 +00:00
Branimir Karadžić 856208328c Use back buffer format when capturing screen shot. (#3603) 2026-02-20 00:46:41 +00:00
Branimir Karadžić 2800f17970 Cleanup. (#3598) 2026-02-18 21:01:18 +00:00
Martijn Courteaux f3bc108efe Restore Vulkan 1.0 compatibility. (#3597)
* vulkan: Do not hard-depend on Vulkan 1.2 and Vulkan 1.1.

* fix(ub): vector iterators are not the same as taking address of position.

* fix(ub): Mask bit iterator had implicit promotion bug.

* fix(ub): Vulkan backend shouldn't copy fragment shader source if there is none.
2026-02-18 20:12:49 +00:00
Branimir Karadžić 40e614c45d Added external texture parameter. (#3596)
* Added external texture parameter.

* Use uint64_t instead of uintptr_t for external texture because VkImage is always 64-bit.
2026-02-18 20:12:37 +00:00