Commit Graph

723 Commits

Author SHA1 Message Date
Unknown W. Brackets
86e754fb4a D3D11: Correct viewport offset sign handling. 2022-08-22 21:29:49 -07:00
Henrik Rydgård
b39b74e602 More renaming. Fix shader view for Vulkan 2022-08-22 12:30:51 +02:00
Henrik Rydgård
82a6c42e17 DepalettizeCommon -> TextureShaderCommon. Simplifications. 2022-08-22 12:21:20 +02:00
Unknown W. Brackets
89a499b4d2 GLES: Correct preview of mip levels > 0.
Don't need to force level 0 anymore.  Software can show levels hardware
refuses to load.  This is consistent with other backends.
2022-08-21 16:47:46 -07:00
Unknown W. Brackets
b5a4843c1f GPU: Purify ConvertViewportAndScissor().
This makes it harder to misuse.  See #15856.
2022-08-20 14:21:11 -07:00
Unknown W. Brackets
d61619db47 GPU: Dirty params when converting viewport state.
This flag will be false when we convert next time, so parameters won't get
updated as expected.
2022-08-20 14:03:24 -07:00
Henrik Rydgård
12db0e52d4 Fix deferred-depth for bezier/spline. Move updating of last_frame_depth_render to GPUCommon. 2022-08-20 08:29:33 +02:00
Henrik Rydgård
886679c7ec Remove the color-to-depth mode 2022-08-20 08:29:33 +02:00
Henrik Rydgård
295f5f391e More consistent handling of lack of depth texture support. Small log improvement. 2022-08-20 08:05:53 +02:00
Henrik Rydgård
cbe6a9161a Remove some unused code in FramebufferManagerD3D11.cpp/h 2022-08-16 12:15:40 +02:00
Henrik Rydgård
131098c4d4 Some enum renaming, move RasterChannel to GPU.h. 2022-08-09 19:58:48 +02:00
Henrik Rydgård
9a5893ce6e More cleanup 2022-08-06 18:27:04 +02:00
Henrik Rydgård
4e3c258140 Delete all the duplicate implementations of ApplyTextureFramebuffer 2022-08-06 18:27:03 +02:00
Henrik Rydgård
45def772ee Move the depal cache instance ownership to TextureCacheCommon 2022-08-06 18:27:03 +02:00
Henrik Rydgård
e345a6ba3c Works with D3D11, except the depth texturing case 2022-08-06 18:27:03 +02:00
Henrik Rydgård
2fa9b0d0c7 Simplify 2022-08-06 18:27:03 +02:00
Henrik Rydgård
8d23c5ecfb Fixy fix 2022-08-06 18:27:03 +02:00
Henrik Rydgård
da65af832a D3D11 prep 2022-08-06 18:27:03 +02:00
Henrik Rydgård
08e2d951b4 State handling reordering in D3D11 and D3D9 backends. 2022-08-05 23:07:01 +02:00
Henrik Rydgård
e28b45481b Delete more unused code 2022-08-03 22:47:31 +02:00
Henrik Rydgård
f8e0c09463 Delete unused stuff in all backends 2022-08-03 22:22:52 +02:00
Henrik Rydgård
9d23939e28 Replace D3D11's BlitFramebuffer with the common one 2022-08-03 22:22:51 +02:00
Henrik Rydgård
1ab9293cb3 Convert FramebufferBlit from the GL backend to use thin3d 2022-08-03 22:22:51 +02:00
Henrik Rydgård
64a8a3f7d3 D3D11: Remove more custom drawing 2022-08-03 22:22:51 +02:00
Henrik Rydgård
1d3075566f Move to common (todo: merge with above) 2022-08-03 14:12:55 +02:00
Henrik Rydgård
d55c4a3456 Convert the D3D11 DrawActiveTexture to thin3d 2022-08-03 14:12:55 +02:00
Henrik Rydgård
41e327a66b Cleanup and testfixes 2022-08-03 13:34:59 +02:00
Henrik Rydgård
9bead443c3 Unify stencil buffer upload using Draw. Only OpenGL tested yet (shaders need adaptation). 2022-08-03 13:31:13 +02:00
Henrik Rydgård
19931c003f Clean up blit/copy feature detection. Don't need fast GPU flags for these. 2022-08-02 09:53:46 +02:00
Henrik Rydgård
655cadc281 D3D11 fix 2022-08-01 11:54:42 +02:00
Henrik Rydgård
90a44579bf Implement color-to-depth for Vulkan, start implementing for D3D11 2022-08-01 11:30:36 +02:00
Henrik Rydgård
3331654396 Fix Macross glitches. 2022-08-01 00:19:47 +02:00
Henrik Rydgård
0262fbc70a Implement 3D textures for D3D11 2022-07-31 10:43:48 +02:00
Henrik Rydgård
6a5a232777 Unify the GLES LoadTextureLevel with the D3D ones. 2022-07-30 19:07:21 +02:00
Henrik Rydgård
c6d7423368 Prepare to convert the GLES functions too 2022-07-30 18:37:48 +02:00
Henrik Rydgård
dea979433c Share LoadTextureLevel between the two D3D backends. 2022-07-30 17:00:34 +02:00
Henrik Rydgård
9ed96921e1 Cleanup 2022-07-30 16:51:29 +02:00
Henrik Rydgård
b7940f9402 Part 2 of the above 2022-07-30 16:43:31 +02:00
Henrik Rydgård
61cf3e8ba0 D3D: Part 1 of breaking out the API stuff 2022-07-30 16:38:40 +02:00
Henrik Rydgård
063cd18254 Simplify CPU upscaling code
Use the existing expandTo32bit mode in the texture decoder instead of
the backend-specific switches and stuff.

Just gets rid of a bunch of redundant code and makes further changes
easier.
2022-07-30 15:06:25 +02:00
Henrik Rydgård
d0d53091a8 Change from maxLevel to levelsToLoad, for better readability. Cleanup. 2022-07-30 10:45:02 +02:00
Henrik Rydgård
1e9d85cda1 Define texture loading plan semantics better, pre-port some from Vulkan 2022-07-30 10:44:28 +02:00
Henrik Rydgård
1513978019 Use PrepareBuildTexture from DX9 backend 2022-07-30 10:44:28 +02:00
Henrik Rydgård
043989ca8a Use PrepareBuildTexture from D3D11 backend 2022-07-30 10:44:27 +02:00
Henrik Rydgård
c031f3085b Additional cleanup 2022-07-30 10:44:26 +02:00
Henrik Rydgård
679a861204 Make the BuildTexture of DX9 and D3D11 backends more similar 2022-07-30 10:44:01 +02:00
Henrik Rydgård
da9f03e356 Remove indentation, useless code 2022-07-30 10:42:16 +02:00
Henrik Rydgård
f728faffdc Remove fake-mipmap logic from LoadTextureLevel 2022-07-30 10:38:17 +02:00
Henrik Rydgård
8b398bbbb7 Minor code simplification 2022-07-30 10:32:50 +02:00
Henrik Rydgård
4165e146e6 Remove unused parameters to some conversion functions 2022-07-30 08:52:24 +02:00
Henrik Rydgård
6f484d0aee Remove unused useBGRA parameter 2022-07-30 08:52:24 +02:00
Henrik Rydgård
c41b780c8c Remove the ReplacedTextureFormat enum 2022-07-30 08:52:24 +02:00
Henrik Rydgård
ef4a6cf873 Remove support for 16-bit replacement texture formats 2022-07-30 08:52:24 +02:00
Henrik Rydgård
c9a37ec6b9 Remove bool that was always true in state mapping. 2022-07-24 21:04:54 +02:00
Henrik Rydgård
f523341351 Remove unnecessary parameters from MakePixelsTexture 2022-07-24 13:54:09 +02:00
Henrik Rydgård
66ddbe9513 Remove the rather problematic limit on framebuffer copies 2022-05-01 12:49:19 +02:00
Henrik Rydgård
7be86264d0 Move framebufFormat to gstate_c, so we can override it 2022-04-30 18:16:09 +02:00
Henrik Rydgård
32df78a2cc Make the existing ReinterpretFramebuffers/ShaderColorBitmask path work for Split/Second
It took writing and debugging #15500 for me to understand what the issue with the old path was..

Much simpler alternative to #15500, or we could merge both but disable Split/Second
for this one. Needs some benchmarks I guess...
2022-04-25 00:11:09 +02:00
Henrik Rydgård
b1af940d8e Save textures on background tasks when texture dumping is enabled.
Should help #15478, at least a bit.
2022-04-18 00:26:35 +02:00
Henrik Rydgård
c4dfbf4f1a Delete a lot of specialized alpha checking code.
This was now only used to check alpha in CLUTs, and the generic functions will not actually be any slower.
2022-04-15 12:34:50 +02:00
Henrik Rydgård
42cd937de2 Simplification and some cleanup 2022-04-15 00:56:25 +02:00
Henrik Rydgård
9f7e0978a9 AND together colors while decoding, and then check against fullAlphaMask. 2022-04-15 00:56:25 +02:00
Henrik Rydgård
a68ddd0a8d Merge separate NEON functions into the normal functions.
We no longer support non-NEON ARM.

It's nice also to have the NEON and SSE implementations "close" to each
other, easier to port optimizations back and forth etc.
2022-04-12 23:43:21 +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
0dc7688838 GPU: Cleanup some extra pointers in fb managers.
These weren't being used / weren't final anyway.
2021-11-14 14:13:48 -08:00
Unknown W. Brackets
2718e81c0e GPU: Expand lines to triangles. 2021-10-31 14:46:46 -07:00
Unknown W. Brackets
b3a8e013f6 GPU: Expand points into triangles for higher res. 2021-10-31 13:06:06 -07:00
Unknown W. Brackets
9fc94a3494 GPU: Skip cull for lines and points.
These already always go through software transform, so make sure we handle
them consistently.  We'll eventually convert to triangles.
2021-10-31 10:54:50 -07:00
Unknown W. Brackets
5128480d74 GPU: Implement cull behavior in sw transform. 2021-10-30 21:04:16 -07:00
Unknown W. Brackets
4ec75de0e7 GPU: Add fog separately for swtransform verts.
At this point, still being processed wrong, this just changes the
attribute structure.
2021-10-30 18:22:54 -07:00
Unknown W. Brackets
159eab5141 GPU: Set projection matrix per backend.
There's a bit of variance, so this keeps the central code clean.
2021-10-30 18:20:36 -07:00
Unknown W. Brackets
f35c7d04bd GPU: Update viewport params before sw transform. 2021-10-30 18:19:16 -07:00
Unknown W. Brackets
3730460bc5 GPU: Move swtransform flippedY to params. 2021-10-30 18:17:22 -07:00
Henrik Rydgård
edc4e69c3d
Merge pull request #15025 from unknownbrackets/texreplace-pop
Allow delayed loading of texture replacements
2021-10-25 23:31:30 +02:00
Unknown W. Brackets
5557950a4b GPU: Allow range cull on Mali/etc.
Previously had been disabled when cullDistance/clipDistance were
unsupported, but it's still helpful without those.  See #15049.
2021-10-23 08:43:14 -07:00
Unknown W. Brackets
83b7b33cfd Replacement: Centralize lookup logic.
And make sure we don't change our minds about using a replacement during a
draw.
2021-10-21 17:05:38 -07:00
Unknown W. Brackets
2356280a9c Replacement: Add structure for delayed loading. 2021-10-21 17:05:38 -07:00
Unknown W. Brackets
d804d35dcb GPU: Enable new guardband culling again. 2021-10-21 15:29:51 -07:00
Unknown W. Brackets
c72d045170 Compat: Ignore DisableRangeCulling with clip/cull.
As long as we support these things and the NAN issue isn't there, we
should be able to safely enable regardless.
2021-10-21 13:23:13 -07:00
Unknown W. Brackets
33598f2e75 GPU: Support clip and cull distances separately.
Older GL devices, and it seems Apple devices, may not support cull.
2021-10-12 20:34:44 -07:00
Unknown W. Brackets
5e6f54033e GPU: Split clip and cull caps.
GL_ARB_cull_distance is needed, sometimes available on older GL.
2021-10-12 20:34:43 -07:00
Unknown W. Brackets
046a5c548b GLES: Check clip/cull distance support.
Pretty limited on GLES3+.  Also D3D11.
Seems like doing it on D3D9 might be a bit tricky.
2021-10-12 20:34:42 -07:00
Henrik Rydgård
1df31e9304 Fix windows menus for the new tex filtering options. 2021-09-05 23:54:41 +02:00
Unknown W. Brackets
9a841664a6 D3D11: Use right state in flush before output.
We were accidentally changing the blend state for the final draw in a
frame.  This could cause apparently random issues if a game didn't align
drawing with vblanks.

Fixes #13152.
2021-08-02 23:45:49 -07:00
Henrik Rydgård
3be5c7bd9a Make the minimum items per thread explicit. Found some bugs, optional arguments are evil. 2021-06-12 21:21:28 +02:00
Henrik Rydgård
73871b9b7e Implement new thread manager, port stuff to it. 2021-06-12 13:03:53 +02:00
Unknown W. Brackets
3304814fd6 GPU: Minor cleanup duplicate header/conditions. 2021-05-08 09:12:22 -07:00
Unknown W. Brackets
de46b0998a GPU: Correctly initialize HW tessellation support.
Oops, shouldn't call a virtual in a constructor.
2021-05-08 09:10:23 -07:00
Unknown W. Brackets
8a8328c431 Common: Move ColorConv to a more appropriate place. 2021-05-01 11:20:05 -07:00
Unknown W. Brackets
82a7a26409 GPU: Look up replaced filtering options. 2021-02-27 17:17:21 -08:00
Unknown W. Brackets
557bf0d963 TexCache: Check for videos rendered as slices.
In a few places, we were checking only the start address of the video.
2021-02-20 20:59:04 -08:00
Unknown W. Brackets
ae474f5f18 GPU: Correct some field shadowing. 2021-02-15 12:00:29 -08:00
Unknown W. Brackets
e85a8b0f5b Global: Cleanup class init order warnings. 2021-02-15 11:59:45 -08:00
Unknown W. Brackets
f32f89dd90 Global: Remove some unused variables. 2021-02-15 11:59:45 -08:00
Unknown W. Brackets
da2e722794 Windows: Fix some format warnings. 2021-02-14 10:30:10 -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
9857e8d1b1 GPU: Respect stencil write mask for 5551 buffers.
If the mask is 0x7F on 5551, that's equivalent to allowing the clear
entirely.  See #13391.
2021-01-24 15:54:13 -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
3f01cbb98c Initialize/Deinitialize the shader translation system once globally.
Fixes #13839.
2021-01-04 23:51:34 +01:00
Henrik Rydgård
16f629df3e Split the DepthRangeHack compat setting into itself and DisableRangeCulling
Most of our uses of DepthRangeHack was just to get DisableRangeCulling anyway -
and we don't want that on when not needed.

Also disables range culling for Splinter Cell Essentials (see #13035)

We really need to understand range culling better. This is a "ship hack" for 1.11.
2020-12-26 19:56:49 +01:00
Henrik Rydgård
7ca0f6a1c0 D3D11: Avoid the debug layer hazard tracker after blits. 2020-12-19 20:31:58 +01:00
Henrik Rydgård
7de7680416 Apple driver bug workaround. See issue #13451 2020-12-16 14:39:08 +01:00
Henrik Rydgård
559ccd9f33 Minor cleanups 2020-12-14 20:06:06 +01:00
Henrik Rydgård
f3ebd6553d Turn off vertex range culling in bezier/spline calls.
When we do lower res tess than the real PSP, we cant trust the game to not cause range culling to kick in.

Fixes #11692
2020-12-13 16:04:16 +01:00
Henrik Rydgård
0c66f6c6d0 Assorted drive-by code cleanup 2020-12-13 00:20:47 +01:00
Henrik Rydgård
9818c8aabd Better debug names for BlitFramebuffer operations. 2020-11-28 13:45:26 +01:00
Henrik Rydgård
3c2733d8eb Adreno/OpenGL: Limit shader depal to 6xx series GPUs. Should help #13668.
Also make a function static.
2020-11-22 18:00:07 +01:00
Henrik Rydgård
575ae376a9 Don't try to texture from depth if not supported by backend. Works around #13621 2020-11-10 23:36:33 +01:00
Henrik Rydgård
c61f9bfd09 Fix bug in the new color writemask code, failing to limit it to Outrun properly. Fixes #13650. 2020-11-10 22:07:20 +01:00
Henrik Rydgård
766dbc5a9f Move ShaderTranslation.cpp/h to Common/GPU. 2020-11-09 11:18:43 +01:00
Henrik Rydgård
6310af25fa Get shader color write masking going on all backends. 2020-11-08 23:45:47 +01:00
Henrik Rydgård
3e06eaccfb Fix some comments 2020-11-08 14:57:35 +01:00
Henrik Rydgård
793e89d2e3 Fix some comments, rename a function. 2020-11-08 14:34:04 +01:00
Henrik Rydgård
391b8155c5 More work on detangling the concepts and making things make more sense. 2020-11-08 13:14:23 +01:00
Henrik Rydgård
3d289594f9 ShaderBlend and FramebufferRead are separate concepts. Reflect that in naming.
The former has forms that don't need to read the framebuffer.

This exposes that some logic is wrong...
2020-11-08 12:54:05 +01:00
Henrik Rydgård
9105249901 Add compat flag for reinterpret shader, also disable on platforms that can't support it yet 2020-11-08 11:32:55 +01:00
Henrik Rydgård
f2e315b9a6 More shadergen work
Buildfix
2020-11-08 11:32:53 +01:00
Henrik Rydgård
c23ed09a32 Unify FramebufferManager::BindFramebufferAsColorTexture 2020-11-07 11:10:54 +01:00
Henrik Rydgård
a24f4e3e70 Start unifying BindFramebufferAsColorTexture 2020-11-07 11:03:53 +01:00
Henrik Rydgård
d9ee06a60d Reorganize the DeviceLost code a little. FramebufferManagerCommon now sees it. 2020-11-07 10:51:54 +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
44ec286ba4 Framebuffer: Keep the render scale factor around, no need to recompute it. 2020-11-06 09:11:57 +01:00
Henrik Rydgård
225734c0b3 Partially revert "Remove remnants of an old, no longer applicable readback optimization"
This reverts commit 7b2236778b.

Fixes #13628
2020-11-06 09:09:18 +01:00
Henrik Rydgård
84037f448e Remove colorDepth property of framebuffers. They're all 8888. 2020-11-05 14:51:46 +01:00
Henrik Rydgård
7b2236778b Remove remnants of an old, no longer applicable readback optimization 2020-11-05 14:38:20 +01:00
Henrik Rydgård
3e6d121016 Partially revert "Clarify some logic, improve framebuffer names"
I screwed up a couple things.

Fixes #13619

This reverts commit 32eb882bc6.
2020-11-03 11:39:12 +01:00
Henrik Rydgård
32eb882bc6 Clarify some logic, improve framebuffer names 2020-11-02 10:02:49 +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
8efb40180e Make the hardware skinning code match 2020-11-01 19:58:50 +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
3d0630c04a Remove the HLSL fragment shader generator. The GLSL one can now do its job. 2020-10-31 18:32:43 +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
8d70fd269e Minor D3D9 fixes 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
c6f51bbc1e Add brute force shader generator tester. Tests D3D11 and Vulkan shaders.
Found a potential error with tesselation without normals already.
2020-10-21 23:20:15 +02:00
Henrik Rydgård
92e1dce2db Error handling fixes 2020-10-18 20:26:19 +02:00
Henrik Rydgård
e80a526015 D3D11: Implement depth texturing. Fixes, for D3D11, #6411. 2020-10-18 20:14:25 +02:00
Henrik Rydgård
ced83b4785 Libretro/VK: Add a README for debugging, so I don't forget. Minor cleanups. 2020-10-11 19:06:09 +02:00
Henrik Rydgård
886a8b1ac6 Remove Timer.cpp/h. Move various collections into Common/Data/Collections. 2020-10-05 21:05:23 +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
f01ba6dc84 Move NativeApp.h to Common/System, split into NativeApp.h and System.h
Buildfix
2020-10-04 11:42:16 +02:00
Henrik Rydgård
b7edf75437 Move Display.cpp/h to Common. 2020-10-04 11:42:16 +02:00
Henrik Rydgård
821817e6d4 Move the profiler to Common 2020-10-04 11:42:16 +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
3162f30158 Merge base/basictypes.h into Common/Common.h (mostly). 2020-09-29 15:51:51 +02:00
Henrik Rydgård
ed88761ecc Merge ext/native/stringutil.cpp/h into Common/StringUtils.cpp/h. 2020-09-29 15:51:51 +02:00
Henrik Rydgård
a9fef066b5 Reduce string allocations in Vulkan memory allocator 2020-09-24 00:32:52 +02:00
Henrik Rydgård
dcd33a4692 Remove redundant bind on GL texture build. Improve dirtying of texture state. 2020-09-21 08:56:58 +02:00
Henrik Rydgård
eaca9d1b59 Remove dirtying of TEXTURE_PARAMS from ForgetLastTexture, not its responsibility. 2020-09-21 08:56:58 +02:00
Henrik Rydgård
b6efc65c94 Set the texture dirty flags when binding a new framebuffer. 2020-09-21 08:56:58 +02:00
Henrik Rydgård
3093b9c7bf Share GPUS stats formatting code between the backends (easier to add new stats) 2020-09-20 22:09:25 +02:00
Henrik Rydgård
bdcf2c5cff Have to invalidate "lastBoundTexture" when binding framebuffers as texture.
Fixes parts of #13431 for D3D11 at least.

Will probably soon get rid of this concept, it's only useful in D3D9/11 and
those are probably not gonna lose much perf if we remove this minor
state caching.
2020-09-20 20:44:18 +02:00
Henrik Rydgård
707e9cf7ac Remove some unnecessary function parameters, improve some comments. 2020-09-20 20:44:18 +02:00
Henrik Rydgård
7ed1ade56b A couple of D3D11 fixes. 2020-09-19 14:14:06 +02:00
Henrik Rydgård
d6d72db0a9 Unify BlitFramebufferDepth. 2020-09-17 20:53:02 +02:00
Henrik Rydgård
d0f7b1e30f Make the implementations of CopyFramebufferDepth more similar.
Also avoid matching framebuffers with bad z for copies.
2020-09-17 20:52:45 +02:00
Henrik Rydgård
181ddd842a Unify some GPU_SUPPORT* bits 2020-09-17 20:52:32 +02:00
Henrik Rydgård
1b3413945b Some header include cleanup 2020-09-16 09:20:41 +02:00
Henrik Rydgård
a222b2017e Switch to a returned value and rename these functions. 2020-09-14 00:04:39 +02:00
Henrik Rydgård
5190f85c8e Unify/centralize SetFramebufferSamplingParams. Some include cleanup. 2020-09-14 00:04:39 +02:00
Henrik Rydgård
d8263d50f4 Make the signature of all the SetFramebufferSamplingParams the same 2020-09-14 00:04:39 +02:00
Henrik Rydgård
46b3fb0821 Workarounds for D3D9's very limited mip level control. 2020-09-14 00:04:39 +02:00
Henrik Rydgård
b81e0669e6 TextureCacheDX9: Use the already centralized sampler setup code from D3D11/Vulkan. 2020-09-14 00:04:39 +02:00
Henrik Rydgård
a4c071261b TextureCacheCommon::UpdateSamplingParams no longer takes a TexCacheEntry 2020-09-13 16:40:37 +02:00
Henrik Rydgård
3dff9781fc Fix GetCurrentTextureDebug 2020-09-13 09:33:06 +02:00
Henrik Rydgård
f6db1c2b01 Show how many times we evaluate framebuffers per frame in debug statistics. 2020-09-12 15:37:03 +02:00
Henrik Rydgård
41eee6a1a4 Decouple framebuffers from texcache entries entirely. 2020-09-12 14:25:50 +02:00
Unknown W. Brackets
cbeeb8fdf1 GPU: Allow culling in through mode.
It works per tests and is used in Soul Caliber.  Fixes #13400.
2020-09-08 15:52:01 -07:00
Unknown W. Brackets
e32524c544 GPU: Remove ReliableHash aliases.
Let's just use XXH32/XXH64 directly in texture replacements, clearer
anyway.
2020-08-28 01:15:22 -07:00
Unknown W. Brackets
7f812a5d9a GPU: Hash CLUT using XXH3 with replacements off.
It's faster, but if texture replacements are enabled, we want the hash to
stay the same.
2020-08-27 20:46:39 -07:00
Unknown W. Brackets
15c25be42b GPU: Switch vertex/lookup hashes to XXH3.
This is faster pretty much everywhere.
2020-08-27 20:37:49 -07:00
Henrik Rydgård
506a86300d More explicit invalidation of any cached state in Thin3D. Fixes #13307 2020-08-22 00:30:29 +02:00
Henrik Rydgård
0bf6bd9175 More Log.h cleanup. 2020-08-16 14:48:54 +02:00
Henrik Rydgård
8db6599e77 Buildfixes 2020-08-16 12:48:09 +02:00
Henrik Rydgård
5d64fc5ff1 Switch to PPSSPP's assert functions (don't use the system's) 2020-08-16 10:01:10 +02:00
Henrik Rydgård
ccc0331279 Move timeutil to Common. (Experiment to see how much work it is to move these). 2020-08-15 20:53:08 +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
b8342fb8ec SaveState: Rename ChunkFile files to Serialize.
Makes more sense and less weird than ChunkFileDoMap, etc.
2020-08-10 08:04:05 +00:00
Henrik Rydgård
eadd3c5785 Remove the LARGE_VIEWPORTS separate path. The fewer paths the better, all need to work anyway.
Required fixing a bug in ShaderUniforms.cpp (used by D3D11 and Vulkan,
the two backends that previously exposed LARGE_VIEWPORTS).
2020-08-05 19:03:08 +02:00
Henrik Rydgård
d57edfbdac Rename FramebufferCommon.cpp/h to FramebufferManagerCommon.cpp/h for consistency 2020-08-03 23:17:22 +02:00
Henrik Rydgård
e9d0b5b90f D3D11 - don't forget to unbind secondary texture when we need to unbind.
Fixes Patapon 3 error reported in #13132.
2020-07-23 22:23:55 +02:00
Henrik Rydgård
c5e0b799d9 Remove category from _assert_msg_ functions. We don't filter these by category anyway.
Fixes the inconsistency where we _assert_ didn't take a category but
_assert_msg_ did.
2020-07-19 20:33:25 +02:00
Henrik Rydgård
bb6219e402
Merge pull request #12921 from unknownbrackets/postshader
Use less FBOs for chained post-processing shaders
2020-07-13 18:52:53 +02:00
Henrik Rydgård
6009bf7b74
Merge pull request #12952 from unknownbrackets/vulkan-safesize
Vulkan: Match safe size behavior on all backends
2020-07-13 15:59:09 +02:00
Unknown W. Brackets
9ef521d945 GPU: Avoid immediate postshader FBO recreate.
Before, we created things at the wrong size, then recreated at the right.
Now we just start at the correct size once.
2020-06-12 12:35:35 -07:00
Henrik Rydgård
737688a22a Annotate calls to RebindFramebuffer with their cause. 2020-06-02 09:51:38 +02:00
Henrik Rydgård
370678c498 Do a similar thing for D3D (let the backend handle the dirtying). 2020-05-24 20:57:59 +02:00
Unknown W. Brackets
ea1f0a1195 Vulkan: Match safe size behavior on all backends.
Before, we would not mark a safe size for some Vulkan clears where depth
was not cleared, deviating from other backends.  We also never detected
that on PowerVR.  This makes things more consistent.
2020-05-23 00:25:39 -07:00
Henrik Rydgård
fabe987c8f Add a name tag for all render steps (GL/Vulkan). Helps with debugging and should be cheap enough (a single pointer per "step"). 2020-05-21 11:24:05 +02:00
Unknown W. Brackets
4ef4325fdb GPU: Avoid unnecessary clear on stencil upload.
In this common case, we've typically just bound the buffer to upload a
texture to it.  No need to start a new render pass.

This dodges #12927 but doesn't really fix the underlying issue.
2020-05-18 21:36:06 -07:00
Unknown W. Brackets
32a7e7345e GPU: Centralize framebuffer download.
And try not to use a potentially-null nvfb.  Primarily this can happen on
Direct3D backends.
2020-05-17 10:59:33 -07:00
Unknown W. Brackets
7024a2877d GPU: Take A off RGB565 conversion funcs. 2020-05-13 18:17:58 -07:00
Unknown W. Brackets
22e46b51c2 GPU: Centralize DestroyAllFBOs().
This cleans up the postshader update code.
2020-05-13 18:15:04 -07:00
Unknown W. Brackets
2faab0e082 GPU: Use postshader for direct VRAM draws again.
Also centralize the pixel texture code while at it.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets
762b656ea2 GPU: Use a texture directly for MakePixelTexture.
This makes it easier to do things with it.
2020-05-13 18:10:09 -07:00
Unknown W. Brackets
fa6544b737 GPU: Cleanup leftover postshader stuff. 2020-05-13 18:10:09 -07:00
Unknown W. Brackets
cb94487a16 GPU: Move post shader handling to new class.
Currently, Vulkan is not working properly and direct (RAM -> output) is
not hooked up.  But in general, it works.
2020-05-13 18:10:06 -07:00