Commit Graph
573 Commits
Author SHA1 Message Date
Branimir Karadžić 358f48879a Updated directx-headers. 2022-09-12 20:19:21 -07:00
Sandy 85910e9778 Add BGR versions of 16 bit formats (#2897)
* pixelformats: Add BGRA4

* pixelformats: Add BGR5A1

* pixelformats: Add B5G6R5

* make idl
2022-08-25 16:08:06 -07:00
Branimir Karadžić cea9c033fc D3D12: Fixed R5G6B5 format. 2022-08-22 20:14:34 -07:00
Branimir Karadžić 186c95fd29 D3D12: Added texture format component mapping from PR #2869. 2022-08-19 18:50:02 -07:00
Бранимир Караџић 2449610af7 Revert "Resolve texture format correctly on D3D11/D3D12 (#2859)" (#2865)
This reverts commit 8358bf6ecf.
2022-08-17 16:44:30 -07:00
Julian Xhokaxhiu 8358bf6ecf Resolve texture format correctly on D3D11/D3D12 (#2859)
* D3D12: Fix ResolveSubresource texture format parameter

For depth textures this always returned the TYPELESS one, but instead it should have passed the FLOAT.

* D3D11: Fix ResolveSubresource texture format parameter

For depth textures this always returned the TYPELESS one, but instead it should have passed the FLOAT.
2022-08-09 11:37:44 -07:00
Cedric Guillemet bedab93431 Fix D3D12 InputSlot when having streams w/ instances (#2853) 2022-08-03 08:02:03 -07:00
James Fulop d9cdc67993 add missing semicolon (#2751) 2022-03-30 07:26:40 -07:00
Branimir Karadžić da9e2f0400 D3D12: Fixed texture array update. 2022-03-05 16:44:56 -08:00
Бранимир Караџић 4581f14cd4 Happy New Year! 2022-01-15 11:59:06 -08:00
Cedric GuillemetandCedric Guillemet 64a28415a8 Disable Batch indirect mode for Microsoft WARP (#2672)
* Disable Batch indirect mode for Microsoft WARP

* idl

Co-authored-by: Cedric Guillemet <ceguille@microsoft.com>
2021-12-01 11:19:47 -08:00
Branimir Karadžić da8a5ff449 VK: Fixed update surface size when texture is transcoded. 2021-11-11 17:39:41 -08:00
Branimir Karadžić 67d1cce8f8 D3D1x: Fixed update surface size when texture is transcoded. 2021-11-11 15:46:29 -08:00
Бранимир Караџић 5bc3b18227 Cleanup. 2021-10-31 20:51:13 -07:00
Branimir Karadžić 2cfba5474d Fixed windows build. 2021-10-25 19:10:41 -07:00
Бранимир Караџић 9ecd462538 Cleanup. 2021-09-09 09:50:17 -07:00
James Fulop bbc2b76948 Dxgi tearing support (#2601)
* present tearing support

* use existing syncInterval variable
2021-09-09 07:20:01 -07:00
James Fulop 82ed74ddb6 cleanup (#2579)
* cleanup

remove unused macro parameters

* de-macro CASE_IMPLEMENT_UNIFORM in d3d11, d3d12, mtl, vk

* fix whitespace

* remove undef of macro that was deleted

* collapse switch statements
2021-08-14 06:57:30 -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
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
Christophe Dehais 2433b598e7 Fix BGFX_STATE_FRONT_CCW flag being ignored in DX12 and VK (#2438) 2021-04-01 08:47:45 -07: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
Бранимир Караџић af49c5d264 Happy New Year! 2021-01-14 15:53:49 -08:00
Branimir Karadžić 5c304dad3b Fixed issue #2330. Added support for 32-bit indices in transient index buffer. 2020-12-15 19:01:25 -08:00
Бранимир Караџић 796acfa98b Added Attachment.numLayers needed for viewport layer array support. 2020-12-12 10:04:14 -08:00
pezcode 09c11bca29 Mip + blit fixes (#2281)
* D3D12: Fix readback for non-zero mip

* Fix blit with non-zero mip

This required clamping the blit extents to the mip size, which is moved out of the renderers now

* Assert formatting
2020-10-09 15:32:50 -07:00
pezcode 3142be44a5 D3D12: Fix readback src pitch calculation (#2278) 2020-10-08 16:47:29 -07:00
Бранимир Караџић e878147cf9 Added version info to debug stats. 2020-10-05 19:45:22 -07:00
kingscallop 436b7fab9e Adds UAV support for D3D12, Vulkan and reworked for OpenGL, D3D11 (#2119)
* Adds UAV support for D3D12, Vulkan and reworked support for OpenGL, D3D11

UAV support is now uniform across compute and draw.
To set a UAV you just use bgfx::setImage() and IMAGE2D in the shader, just like in compute.
Due to these changes shaders will have to be recompiled.

The changes include:
	- D3D11 requires patching of the UAV slot number (which is now done by modifying the DXBC instead of using a macro)
	- If the DXBC binary includes a debug chunk, that is also patched to match the new slot number
	- All the other renderers don't need any kind of patching
	- There are some shader annotations to better convert the UAV format used in hlsl to spirv

Possibility of further enhancements:
	- bgfx::setViewFrameBuffer() only supports binding to a framebuffer or, using BGFX_INVALID_HANDLE, to bind the default backbuffer. This doesn't allow for the case where there is no need to bind to either one of them, for example when using a fragment shader only to read and write to an UAV.

* Bump shader version, because they need to be recompiled.
2020-10-04 21:51:41 -07:00
Julian Xhokaxhiu 2c38e090d2 Various Vulkan/Direct3D 12 enhancements (#2246)
* [VK] Add RT MSAA support

* [VK] Add GenerateMips support

* [VK] Add Screenshot feature

* [D3D12] Add MSAA RT support

* [VK] Fix blit operation on MSAA RT textures

* [D3D12] Fix blit operation on MSAA RT textures
2020-10-04 14:21:12 -07:00
Kitchen aa24588800 fix d3d12 error when create backbuffer with msaa and srgb format (#2261) 2020-09-09 19:29:00 -07:00
云风 95b4e6eaa5 Use getResourceDesc instead of GetDesc, See #1239 (#2260)
* Use getResourceDesc instead of GetDesc, See #1239

* Fix MSAA on d3d12
2020-09-09 05:52:13 -07:00
Бранимир Караџић f20fd61e4f Revert "[ VK/DX12] Bring setScissor on par with the other renderers (#2239)"
This reverts commit fbd7e9efd6.
2020-08-22 09:10:49 -07:00
Julian Xhokaxhiu fbd7e9efd6 [ VK/DX12] Bring setScissor on par with the other renderers (#2239) 2020-08-22 09:09:11 -07:00
James Fulop 276598ad50 fixes for d3d12 texture update (#2220)
---
* support for compressed textures
* support for emulated textures
* fix for incorrect copyable footprint dims
2020-07-28 07:49:22 -07:00
Бранимир Караџић 006548e00f Fixes for D3D12 on Linux. 2020-07-02 19:50:09 -07:00
Бранимир Караџић d86c16213e Cleanup. 2020-06-18 21:20:01 -07:00
Бранимир Караџић 2cbcb6ea90 RRenamed BX_CHECK to BX_ASSERT. 2020-06-16 10:06:18 -07:00
Hugo Amnov 49687638ef Remove some code duplication in D3D12 (#2144) 2020-05-31 13:22:21 -07:00
Бранимир Караџић 2928ba8c07 Fixed build. 2020-05-15 17:15:35 -07:00
Hugo Amnov 8ee6654695 Cleanup dead code (#2143) 2020-05-15 13:35:38 -07:00
Hugo Amnov b62302631e Add Webgpu backend (#2132)
* WebGPU first draft (shaderc bin version 8)

* WebGPU scripts
2020-05-08 08:53:53 -07:00
Бранимир Караџић 36ec2a462d Removed alignment macros, and added functions instead. 2020-04-19 18:23:04 -07:00
Бранимир Караџић aeec903fc3 Fixed #2102. 2020-04-07 15:58:25 -07:00
Pablo Escobar 1b85139371 Revert "Remove debug label quotes"
This reverts commit 08b3ec5814.
2020-04-03 21:56:54 +00:00
Pablo Escobar fdcdeae23a Remove debug label quotes 2020-04-03 21:56:54 +00:00
Бранимир Караџић 126a3fa6da Fixed issue #2072. 2020-03-21 20:42:10 -07:00
Minmin Gong 68e27b6655 Fix a couple framebuffer related bugs in D3D renderer
1. A crash in D3D11 renderer when create a texture with flag BGFX_TEXTURE_RT_WRITE_ONLY then override it, bcause m_srv is NULL.
2. In headless mode, RendererContextD3D12::m_swapChain is NULL, clear it resulting a D3D12 debug error
2020-02-27 04:59:35 +00:00
Minmin Gong ca509c136d Store the command queue into device in D3D12 renderer 2020-02-27 04:58:27 +00:00