Commit Graph

55 Commits

Author SHA1 Message Date
Henrik Rydgård 77e894c64d Fix more D3D11 lifecycle problems. Removed some ComPtr that got in the way 2025-08-01 18:20:44 +02:00
Henrik Rydgård 8ed898c5e6 GPU: Constify VertexDecoder pointers, remove in some cases 2025-05-14 15:13:59 +02:00
oltolm b09eb3dd23 use ComPtr for D3D11 2025-02-17 22:58:44 +01:00
Henrik Rydgård df6ed8cfc9 Do some cleanup of #includes in GPU 2024-12-18 13:57:26 +01:00
Herman Semenov 192650f551 [Core/HLE/GPU/D3D11/GLES] Using for based loop C++17 and replaced on structured binding map C++17 2024-09-18 11:10:10 +02:00
Henrik Rydgård 126d88ecfc Back out clearly inconsequential/useless .reserve() calls 2023-12-29 08:27:56 +01:00
Herman Semenov 0748ce610f [GPU/Common/D3D11/Directx9/GLES/Vulkan] Using reserve if possible 2023-12-15 14:08:22 +03:00
Henrik Rydgård f069de2dd2 Pass the vertex decoder into the vertex shader IDs generator
Instead of just the vertex type.

This will allow things like the vertex decoder supplying defaults, in
order to reduce the number of unique vertex shaders at the cost of
slightly larger vertex data.

This doesn't actually do that yet though, it's just a refactor that can
be done separately.

Part of #16567
2022-12-30 22:57:05 +01:00
Unknown W. Brackets 49f6c461ad Reporting: Fix some header includes.
Particularly in Common, avoid including Core/Reporting.h.
2022-12-27 14:58:20 -08:00
Henrik Rydgård cd0acec3f0 Crashfix the other backends 2022-12-02 13:49:28 +01:00
Unknown W. Brackets 6c36f03a0d GPU: Purify vertTypeIsSkinningEnabled(). 2022-11-06 08:40:54 -08:00
Henrik Rydgård d3804ec2e5 Misc multiview hackery 2022-10-27 11:05:58 +02:00
Unknown W. Brackets aee2ad46a2 GPU: Verify generated shader buffer length.
Hardware tessellation + uberlighting + clamp was exceeding the buffer,
causing memory corruption.  Let's try to catch it, but also increase
buffers to be safe.
2022-10-05 21:41:09 -07:00
Henrik Rydgård e828df9f25 Split each renderpass/framebuffer into multiple "compatibility classes" (RenderPassType). 2022-09-08 00:32:03 +02:00
Henrik Rydgård b84cda2876 Plumb the computed pipeline state into ComputeFragmentShaderID. 2022-09-02 22:16:57 +02:00
Unknown W. Brackets 2479d52202 Global: Reduce includes of common headers.
In many places, string, map, or Common.h were included but not needed.
2022-01-30 16:35:33 -08:00
Unknown W. Brackets e85a8b0f5b Global: Cleanup class init order warnings. 2021-02-15 11:59:45 -08:00
Unknown W. Brackets 2c165c9b6d Windows: Fix improper case or missing includes.
As per mingw errors/warnings.
2021-02-14 10:30:10 -08:00
Unknown W. Brackets a73c15babc GPU: Correct shader gen with weights as floats.
For now, this supports the option.  We should probably just move to
everything being floats, but we already prefer software skinning.

Fixes #13903.
2021-01-10 08:52:28 -08:00
Henrik Rydgård 7de7680416 Apple driver bug workaround. See issue #13451 2020-12-16 14:39:08 +01:00
Henrik Rydgård 7a690f177e Move shader language feature detection to the draw context. 2020-11-06 09:11:57 +01:00
Henrik Rydgård f4ea3ccf22 Move the generic vertex shader generator into GPU/Common and rename it. 2020-11-01 19:58:54 +01:00
Henrik Rydgård be837912e1 Delete the HLSL shader generator, switch to the newly generic one. 2020-11-01 19:58:54 +01:00
Henrik Rydgård 0b1b36921e Move the now-renamed fragment shader generator to GPU/Common. 2020-10-31 19:03:14 +01:00
Henrik Rydgård cf1a5e2c67 Switch D3D11 over to use the GLSL fragment shader generator 2020-10-31 18:32:43 +01:00
Henrik Rydgård 5ee9cfef0d Remove support for D3D11_level_9 (previously only really used for Windows Phone, probably).
Can always fall back to D3D9, which is not going away anytime soon and
still needs to be there. One less HLSL variant to care about.
2020-10-29 00:52:19 +01:00
Henrik Rydgård 3d36049b65 Rename shader generator functions, a bit of moving around and adding an errorString param. 2020-10-21 23:20:25 +02:00
Henrik Rydgård 0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00
Henrik Rydgård 9e41fafd0d Move math and some file and data conversion files out from native to Common.
Buildfixing

Move some file util files

Buildfix

Move KeyMap.cpp/h to Core where they belong better.

libretro buildfix attempt

Move ini_file

More buildfixes
2020-10-04 09:12:46 +02:00
Henrik Rydgård ff8148dd92 Move native/util, native/data and native/i18 to Common/Data.
Also move colorutil.cpp/h

linking build fix experiment

Delete a bunch of unused CMakeLists.txt files

CMakeLists.txt linking fix

Don't include NativeApp.h from any headers.

Android.mk buildfix

Half of the UWP fix

Buildfix

Minor project file cleanup

Buildfixes

Guess what? More buildfixes!
2020-10-04 07:28:29 +02:00
Henrik Rydgård b43698a13d Remove most instances of base/logging.h from Common, Core, GPU, more 2020-08-15 19:08:44 +02:00
Unknown W. Brackets ac60e2ecd4 GPU: Track HW tess at start of frame too.
This also makes it so we don't force the setting off when you change
backends, and just ignore it if unsupported.
2020-04-04 11:52:32 -07:00
Unknown W. Brackets c42fb72419 GPU: Update uniforms w/ consistent render mode too. 2020-04-04 11:03:07 -07:00
Henrik Rydgard fdd0d7acb4 More Vulkan validation fixes
NVIDIA no longer uses nVidia capitalization.
2019-02-05 18:07:11 +01:00
Unknown W. Brackets f8ce9b08ba Vulkan: Limit stencil workaround to Adreno 5xx. 2018-12-23 14:11:57 -08:00
Unknown W. Brackets 1f594f3fb5 GPU: Track draw in shader manager.
With device restore etc. everywhere.
2018-12-23 12:55:37 -08:00
Henrik Rydgård 36fd2711d6 Revert "Remove further remains of hardware skinning."
This reverts commit 40db61a680.
2018-04-10 12:22:41 +02:00
Henrik Rydgård 1bb7be489f Remove some unused tracking of whether lighting is used by a shader 2018-03-17 10:33:50 +01:00
Henrik Rydgård 40db61a680 Remove further remains of hardware skinning. Fixes #10661 2018-03-05 00:03:47 +01:00
Unknown W. Brackets 4731a2918c GPU: Use more typesafe shader IDs.
Since they really are fairly distinct, let's make sure we can't mix them
accidentally.
2017-12-02 09:07:27 -08:00
Unknown W. Brackets 72e0a24724 GPU: Reset shader state on shader reset.
Was ending up with lastFSID being -1, but being used.

Seen in gpu/commands/blend test.
2017-09-20 08:37:54 -07:00
Henrik Rydgard 078e1151f9 Dirty-flag the fragment shader ID. 2017-08-14 11:36:07 +02:00
Henrik Rydgard 56cd991833 All: Only recompute the vertex shader ID when dirty 2017-08-14 11:36:06 +02:00
Henrik Rydgard c502692490 Minor cleanup 2017-03-19 18:00:57 +01:00
Henrik Rydgård ed16096365 Don't crash if not enough memory to save a state. Very annoying.
Minor tweaks.
2017-03-07 15:32:34 +01:00
Henrik Rydgard 5d5844632a Fix shader issues with D3D11 feature level 9 2017-03-05 22:56:33 +01:00
Henrik Rydgard bb3e211088 Fix bad initialization of featureLevels, breaking things in #9361 2017-03-05 22:33:18 +01:00
Henrik Rydgard 116edcb77a Take the D3D11 feature level into account when creating shaders. May help #9369 2017-03-05 12:31:33 +01:00
Henrik Rydgard 7b3f84aae8 More buildfixes for Windows on ARM 2017-03-05 10:52:08 +01:00
Henrik Rydgard 9d116505cf D3D11: Add a large amounts of asserts 2017-03-05 10:34:44 +01:00