Commit Graph

249 Commits

Author SHA1 Message Date
get
a5d06fde4b Embrace nullptr over NULL and 0 2023-04-15 16:07:05 -05:00
aac9647ba2 Divide by MSAA for PerfQuery in all backends. 2023-03-14 02:13:25 +01:00
af313f8419 VideoCommon: add constant value to set the allowed maximum number of pixel samplers 2023-02-10 00:46:11 -06:00
d0c6b6c9ed VideoCommon: store the configuration used to create the AbstractPipeline on the pipeline itself, so that it's easy to duplicate pipelines with slightly altered configuration 2023-02-09 02:13:53 -06:00
ccf92a3e56 Merge pull request #11522 from phire/KillRendererWithFire
Kill Renderer (with phire)
2023-02-09 19:59:16 +13:00
4422af1272 Cleanup headers 2023-02-09 18:36:20 +13:00
31cfe8250d Lint fixes 2023-02-09 18:36:20 +13:00
11de923dcb Move xfb tracking and IR scaling out of RenderBase 2023-02-09 18:36:20 +13:00
e009002411 Refactor ClearRegion
And fix bug where opengl was getting the wrong coordinates
2023-02-09 18:36:20 +13:00
3ae78b8e76 Also use events for config changed 2023-01-31 19:41:24 +13:00
8ad59f8ccf Add AbstractGfx for DX12 2023-01-31 19:41:24 +13:00
8bc8e43dd6 Add virtual Initialize() to PerfQueryBase
Both DX12 and Vulkan already had one.
2023-01-31 19:41:24 +13:00
0d4537d60f Move Presenting, Dumping and ImGui out of Renderer 2023-01-31 18:45:21 +13:00
606c18210d TextureCache: Refactor with smart pointers
The whole ownership model was getting a bit of a mess, with a some
of special cases to deal with. And I'm planning to make it even more
complex in the future.
So here is some upfront work to convert it over to reference counted
pointers.
2023-01-31 18:29:47 +13:00
7bea39b39e VideoBackends: add a way to load data into a specific level AND layer, default to layer 0 2023-01-27 18:46:53 -06:00
cb0a603c72 VideoCommon: De-globalize GeometryShaderManager class. 2022-12-29 15:33:19 +01:00
50625728e0 VideoCommon: De-globalize VertexShaderManager class. 2022-12-28 15:52:29 +01:00
725bd64ec2 VideoCommon: De-globalize PixelShaderManager class. 2022-12-27 20:13:24 +01:00
fb8aa9744e Merge pull request #11286 from K0bin/vk-query-fix
VideoBackends: Query fixes and cleanups
2022-12-19 03:15:48 -05:00
35a6d16d9e VideoBackends: Rename query_type to query_group 2022-11-29 23:14:23 +01:00
57b2ea663e VideoBackends:D3D12: Set query type 2022-11-29 23:14:23 +01:00
cc5640245c Fix build errors related to formatting non-scoped enums 2022-11-23 13:45:43 -08:00
a07ee729e5 VideoBackends:D3D12: Defer binding framebuffer in SetAndDiscardFramebuffer
BindFramebuffer depends on the pipeline which might not be set yet.
That's why the framebuffer dirty flag exists in the first place.
I assume BindFramebuffer was called directly here, in order to handle
the texture state transitions necessary for DiscardResource.
The state is tracked anyway, so we can just issue those transitions there
too and defer binding the actual framebuffer.

Fixes an issue in Zelda Twilight Princess with EFB depth peeks.
Dolphin would bind a frame buffer which doesn't have an integer format
descriptor for the color target before binding the new pipeline.
So it would accidentally use the 0 descriptor.

Debug layer error:
D3D12 ERROR: ID3D12CommandList::OMSetRenderTargets:
Specified CPU descriptor handle ptr=0x0000000000000000 does not refer to
a location in a descriptor heap. pRenderTargetDescriptors[0] is the issue.
[ EXECUTION ERROR #646: INVALID_DESCRIPTOR_HANDLE]
2022-10-29 23:41:32 +02:00
a6aa651291 VideoBackends:D3D12: Use COMMON as initial state for default heap buffer
Fixes the following error in the D3D12 debug layer:

D3D12 WARNING: ID3D12Device::CreateCommittedResource:
Ignoring InitialState D3D12_RESOURCE_STATE_UNORDERED_ACCESS.
Buffers are effectively created in state D3D12_RESOURCE_STATE_COMMON.
[ STATE_CREATION WARNING #1328: CREATERESOURCE_STATE_IGNORED]
2022-10-29 23:39:32 +02:00
22fecb41fc VideoBackends:D3D12: Don't query GPU descriptor handle for non-shader visible heap
Fixes the following error in the D3D12 debug layer:

D3D12 ERROR: ID3D12DescriptorHeap::GetGPUDescriptorHandleForHeapStart:
GetGPUDescriptorHandleForHeapStart is invalid to call on a descriptor
heap that does not have DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE set.
If the heap is not supposed to be shader visible, then
GetCPUDescriptorHandleForHeapStart would be the appropriate method
to call. That call is valid both for shader visible and non shader
visible descriptor heaps.
[ STATE_GETTING ERROR #1315: DESCRIPTOR_HEAP_NOT_SHADER_VISIBLE]
2022-10-29 23:39:27 +02:00
0e1ffe009a VideoBackends: fix d3d12 subresource calculation 2022-10-28 19:07:08 -05:00
1eeba6dcca VideoBackends:D3D12: Add support for vertex shader point and line expansion 2022-10-22 20:13:24 -05:00
68f49df0f8 VideoCommon: Add vertex shader point and line expansion 2022-10-22 20:13:24 -05:00
a6c00c7633 D3D12: Fix backend multithreading incorrectly being marked as supported 2022-09-26 19:24:52 -07:00
dae56a24b8 VideoBackends:D3D12: Dynamic vertex loader support 2022-09-19 16:28:24 -05:00
99533d2840 VideoCommon: Add separate pipeline usage for UberShaders 2022-09-19 16:28:24 -05:00
4c629c2bee VideoCommon: Add dynamic vertex loader to ubershaders 2022-09-19 16:28:23 -05:00
6ee0248eab VideoBackends:Metal: MSAA support 2022-07-21 20:44:19 -05:00
716c0980d7 VideoBackends: Add Metal renderer 2022-07-21 20:44:19 -05:00
5dd2704416 D3D / VideoCommon: generate HLSL from SPIRV 2022-06-24 18:09:53 -05:00
580c721c82 cmake: Don't use PCH with Qt6. 2022-05-22 01:19:44 +02:00
c0488de482 Merge pull request #10251 from Pokechu22/negative-scissor
Rework scissor handling
2022-04-24 15:00:42 -04:00
04fdadd9d5 VideoCommon: Rename norm0/norm1/norm2 to normal/tangent/binormal 2022-04-22 16:54:36 -07:00
4595b89ad8 VideoCommon: Remove bSupportsOversizedViewports
I think this is a relic of D3D9.  D3D11 and D3D12 seem to work fine without it.  Plus, ViewportCorrectionMatrix just didn't work correctly (at least with the viewports being generated by the new scissor code).
2022-04-16 10:26:11 -07:00
4d1e6ff76a Merge pull request #10422 from OatmealDome/opengl-shader-crash
VideoConfig: Add flag for whether the system supports setting object names
2022-01-31 01:25:46 -05:00
8be3572c83 D3D12: Assume support for setting object names 2022-01-31 01:17:40 -05:00
78e43a4404 Make all custom fmt::formatter's format functions const
fmt 8.0.0 requires this.
2022-01-13 11:11:08 -08:00
1b32e6dae2 VideoBackends/D3D12: Include HRESULT in error messages 2022-01-09 12:44:53 -08:00
82acfa6a46 VideoBackends/D3D: Eliminate CHECK in favor of ASSERT_MSG 2022-01-09 12:44:13 -08:00
8af737d3bd D3D12: Fix nullptr dereference when creating a shader with a name. 2022-01-03 17:14:09 +01:00
08396c56e5 VideoConfig: Add bool for sampler LOD bias support 2021-12-25 15:16:27 -05:00
27cb704466 Eliminate VarType for ComponentFormat 2021-12-18 15:21:48 -08:00
2025763420 Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
1adff1c467 VideoCommon: Skip textureQueryLevels if it doesn't exist 2021-11-17 21:28:39 -08:00
51e3334526 VideoCommon: Use coarse derivatives for Manual Texture Sampling if possible 2021-11-17 20:04:34 -08:00