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
Unknown W. Brackets
d39b0bdca2
GPU: Split FramebufferCommon into two classes.
...
Only some things moved over so far.
FramebufferCommon does too much, we want to share it with softgpu without
all the buffer management stuff.
2020-05-13 18:07:22 -07:00
Henrik Rydgård
c1d32e8b3e
D3D11: Better set current texture to null first, otherwise we can run into another issue.
2020-05-10 23:42:52 +02:00
Henrik Rydgård
73c253e2ac
D3D11: Fix a bind ordering issue in depal (only a problem with debug layer enabled)
2020-05-10 23:10:57 +02:00
Unknown W. Brackets
ef43ec5f33
GPU: Split up software transform into phases.
2020-05-08 23:09:24 -07:00
Unknown W. Brackets
4ea5d165f5
D3D11: Always use accurate depth.
...
The Direct3D APIs use a "min" and "max" value, and it's required that min
must be less than or equal to max. If this requirement is not met, the
viewport parameters are not updated.
We forced accurate depth on for NVIDIA and AMD, but this just meant Intel
was still broken and less people were reporting bugs about it.
Although the PSP GE has depth viewport transform, this is not used for
clipping and is not actually the depth range. The minz and maxz GE
registers are the depth range, and minz must be less than or equal to maxz
for drawing to occur.
2020-04-18 22:34:33 -07: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
Unknown W. Brackets
ad98609819
GPU: Use consistent buffered rendering state.
...
The setting can be changed in Qt and Windows between frames, so let's
track the current setting in most places. This is everywhere fbman is
easily accessible.
2020-04-04 10:51:47 -07:00
Unknown W. Brackets
cebcfb1bbd
GPU: Use old frame when presenting a skip.
...
If we flip using a skipped frame, we may show an even older frame causing
weird flickering.
2020-03-01 13:55:28 -08:00
Unknown W. Brackets
3c1e8abcfe
GPU: Centralize vsync interval logic.
...
We already do unthrottle checking here.
2020-02-29 22:27:00 -08:00
Henrik Rydgård
767b1e45b2
Fix the build - there's a Vec3 name collision, fixed it using a namespace.
2019-10-22 22:58:10 +02:00
vnctdj
0ec0c6eb92
Remove the related #include
...
Following https://github.com/hrydgard/ppsspp/pull/12030
Oops, I forgot to check if it was still needed...
2019-05-12 16:38:37 +02:00
vnctdj
80807675f1
Delete 2 unused i18n category pointer declarations
2019-05-11 23:47:37 +02:00
driver1998
010b07b2df
Fix a crash on DirextX 11 with Feature Level <= 9_3 hardware
...
Mobile usually uses 9_3 or lower hardware.
The same issue happens on x64 as well, so it might be a universal one, not limited to ARM or UWP.
2019-05-04 22:45:16 +08:00
Unknown W. Brackets
c5b844cc98
GPU: Respect stencil write mask on clear.
...
Actually identified this for the softgpu in #11319 , but applying it for
RGBA is a problem in most renderers. Forgot to at least apply it to
stencil.
Fixes #11901 .
2019-03-16 19:42:18 -07:00
Henrik Rydgård
8e7da3fef4
Disable vertex range culling when the depthrange hack is enabled. Temporary workaround for #11576 .
2019-02-26 16:07:11 +01:00
Henrik Rydgard
5aed2a2cee
Gate fewer effects behind "Disable slow framebuffer effects".
2019-02-08 15:02:31 +01:00
Henrik Rydgard
9736bc431a
The block transfer setting should not affect clearing memory behind a render target, especially since that's already gated behind a compat flag.
2019-02-08 14:46:16 +01:00
Henrik Rydgard
fdd0d7acb4
More Vulkan validation fixes
...
NVIDIA no longer uses nVidia capitalization.
2019-02-05 18:07:11 +01:00
Henrik Rydgård
8e17caf351
Merge pull request #11694 from unknownbrackets/draw-bugs
...
Vulkan: Limit stencil workaround to Adreno 5xx
2018-12-26 20:46:09 +01:00
Unknown W. Brackets
7ad6270623
GLES: Remove spurious semicolons in shaders.
...
Were causing compile errors on some devices.
2018-12-23 20:21:17 -08: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
de4dec2a80
Use raw strings for more shaders
2018-12-18 10:37:45 +01:00
Unknown W. Brackets
5932cbabc3
GPU: Avoid stencil emulation if possible.
...
This reduces use of replaceAlpha, and reduces use of more complicated
blend states. This simplifies fragment shaders a little.
2018-12-01 14:05:29 -08:00
Unknown W. Brackets
b1e68c653c
GPU: Avoid a missing virtual destructor warning.
2018-12-01 13:59:47 -08:00
Unknown W. Brackets
c2e7263601
D3D11: Correct shader bounds apply.
2018-11-24 10:51:47 -08:00
Unknown W. Brackets
d9510f8824
D3D11: Allow shader blend to self.
...
It was forcing from black before. See #9616 .
2018-11-24 10:19:28 -08:00
Henrik Rydgård
b17fc67c45
Get rid of MaskedEqual
2018-11-12 08:19:19 +01:00
Henrik Rydgård
d8f4a70396
Remove constraint that virtual framebuffers have to represent VRAM.
...
Prerequisite for #11531 , virtual readbacks.
2018-11-12 08:19:14 +01:00
Henrik Rydgård
22c066515e
Merge pull request #11425 from xebra/refactor_spline_bezier
...
[Refactoring] Improve spline/bezier.
2018-11-04 17:04:29 +01:00
Henrik Rydgård
fa40bcff8d
Disable triangle range culling on D3D9 on Intel. Should fix #11477
2018-10-21 09:36:15 +02:00
xebra
eca9386c05
[spline/bezier]Reduce static buffers. Get rid of the spline buffer using half of the vertex buffer.
2018-10-07 23:54:31 +09:00
xebra
ef53195ae8
[spline/bezier]Surround with namespace Spline.
2018-10-07 23:54:28 +09:00
xebra
41823f8780
[spline/bezier]Fix GLES texture resolution of HW tess to real 2D to avoid huge width in FF4CC mist dragon morphing.
2018-10-07 23:54:23 +09:00
xebra
89786b943d
[spline/bezier]Instanced rendering for B-Spline is very slow when using weak GPU, so disabled it and simplify the shaders.
...
Add changing the quality of HW tessellation.
2018-10-07 23:54:22 +09:00
xebra
453e274fbe
[spline/bezier]Fix around vertex type flags.
2018-10-07 23:54:11 +09:00
xebra
a48a5b32f0
[spline/bezier]Unify hardware tessellation of bezier and spline.
2018-10-07 23:54:06 +09:00
xebra
3c0fb44f2e
[spline/bezier]Improve hwtess to use cached weights.
2018-10-07 23:54:05 +09:00
xebra
966ff32ee7
[spline/bezier]Improve the logic of copying control-points.
2018-10-07 23:53:36 +09:00
Unknown W. Brackets
cd0662c065
GPU: Cleanup outdated flushbefore code.
...
Backends didn't match.
2018-09-20 20:36:41 -07:00
Unknown W. Brackets
b7d84926fa
D3D11: Enable depth clamping.
...
Uses the same logic as Vulkan, improving #9545 on most D3D11 devices.
2018-09-18 21:49:17 -07:00
Unknown W. Brackets
97773d3dd5
TexCache: Fix texture alignment in GLES.
...
We must align to 4 bytes, and we aren't always aligned to 16 anymore, so
we must check when dealing with swizzle.
2018-09-08 19:00:30 -07:00
Unknown W. Brackets
a4c0640f01
GE Debugger: Factor out host calls some.
...
Moving more of this to cross platform for the web debugger.
2018-09-01 08:32:03 -07:00
Unknown W. Brackets
16d7a80980
GPU: Clear alpha more consistently from 565.
...
Before, the backends all did different things. Now they are more in sync,
but Vulkan still behaves slightly differently.
Fixes #11326 .
2018-08-30 21:00:21 -07:00
Unknown W. Brackets
9bac603976
GPU: Use HW transform for flat spline/bezier.
...
We can control the provoking vertex here, but it's less likely to matter.
2018-06-28 19:30:20 -07:00
xebra
4fab160e19
[spline/bezier]Modify D3D11 hwtess texture buffer to structured shader buffer.
2018-06-27 01:10:36 +09:00
Unknown W. Brackets
b4496f1975
Core: Move config enums to separate file.
...
These are a bit strewn about and there are constants that aren't
consistently used, which just adds confusion.
2018-06-23 10:59:18 -07:00
Unknown W. Brackets
d1fa9b97a3
GPU: Remove some unused fields.
2018-06-17 11:26:09 -07:00
Henrik Rydgård
6bf6490c2f
Merge pull request #11128 from unknownbrackets/gpu-minor
...
Minor framebuffer code cleanup
2018-06-06 22:28:35 +02:00
Henrik Rydgård
03175b74ef
Merge pull request #10957 from unknownbrackets/depal-bounds2
...
GPU: Dirty tex when clearing or rendering to self
2018-06-06 22:22:01 +02:00
Unknown W. Brackets
8f354e5312
GPU: Minor framebuffer code cleanup.
2018-06-06 05:56:30 -07:00
Unknown W. Brackets
2606365ba4
GPU: Use software transform for flat shading.
...
Except on GLES where it works fine with the default provoking index.
This fixes #10969 so that it works everywhere.
2018-06-06 05:53:50 -07:00
Unknown W. Brackets
dca159c47e
GPU: Correct sw flat shading color on Vulkan/D3D.
...
It was only correct on GLES before. This only fixes software transform.
2018-06-06 05:53:50 -07:00
Unknown W. Brackets
61fc1cdcfb
GPU: Dirty tex when clearing or rendering to self.
...
This way if we're blitting, we'll re-blit.
2018-06-06 05:52:49 -07:00
Henrik Rydgård
c1d113e0e9
When creating temp framebuffers for download, size them using bufferWidth/Height instead of width/height.
...
Or maybe we should make sure to only download within the width/height by
adding more clamps at the beginning of ReadFramebufferToMemory but seems
more dangerous.
Plus some minor things.
Should help #11113
2018-06-01 21:16:07 +02:00
Unknown W. Brackets
abbab23814
D3D11: Use a dedicated slot for the depal texture.
...
Otherwise it affects shader blending.
2018-05-06 08:58:54 -07:00
Unknown W. Brackets
8d07e6d985
GPU: Prevent temp FBOs from overwriting each other.
...
Sometimes we'd use two temp FBOs in the same draw (e.g. shader blending +
depal.) This could cause the same temp FBO to get used for two purposes,
causing weird behavior.
2018-05-06 08:57:44 -07:00
Unknown W. Brackets
3eb0450998
Depal: Reapply texture when bounds change.
...
Since we need each slice of the texture when we use bounds to reduce the
size. Fixes #10951 .
2018-04-22 10:43:46 -07: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
8953d7ff73
Revert "Comment fixes, reindentation."
...
This reverts commit 6fa9fcefb2
.
2018-04-10 12:14:23 +02:00
Henrik Rydgård
6a90b8fbb4
Revert "Further cleanup after the removal of hardware skinning."
...
This reverts commit f086a0915f
.
Increment the shader cache version. Restore some more.
2018-04-10 11:38:02 +02:00
Henrik Rydgård
69309aa400
Revert "Remove some remains of software skinning"
...
This reverts commit 2d33d526b8
.
2018-04-10 11:21:56 +02:00
Henrik Rydgård
f967e206b8
Remove the last remains of the idea that textures can be efficiently updated instead of recreated. Accidentally fixes #10697 somehow.
...
Also this is good for terminology, no more confusion with the texture
replacement facility :)
2018-03-25 10:50:37 +02:00
aliaspider
15c4406df7
add missing inclues.
2018-03-22 22:14:19 +01: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
2d33d526b8
Remove some remains of software skinning
2018-03-16 20:38:05 +01:00
Henrik Rydgård
7a8310ae5e
Tiny unification of code. Save the GL shader cache a bit less often.
2018-03-13 13:35:58 +01:00
Henrik Rydgård
f086a0915f
Further cleanup after the removal of hardware skinning.
2018-03-05 00:03:47 +01:00
Henrik Rydgård
6fa9fcefb2
Comment fixes, reindentation.
2018-03-05 00:03:47 +01:00
Henrik Rydgård
40db61a680
Remove further remains of hardware skinning. Fixes #10661
2018-03-05 00:03:47 +01:00
Henrik Rydgård
c7dcb7c365
D3D9/D3D11: Fix GPU feature detection. Enforce accurate depth on nVidia as well, they no longer seem to support reverse depth so it's needed as a workaround. Fixes #10655
2018-03-01 09:38:06 +01:00
Henrik Rydgård
64ec46e705
Unify FramebufferDirty()/FramebufferReallyDirty() for the hw backends
2018-02-26 11:58:17 +01:00
Henrik Rydgård
78467d6092
Unify FastRunLoop for the hardware backends.
2018-02-26 11:52:16 +01:00
Henrik Rydgård
6a2f45c2e1
Unify UpdateCmdInfo
2018-02-26 11:48:56 +01:00
Henrik Rydgård
8cef1f0f8d
GPU: Unify command table (cmdInfo_)
2018-02-26 11:44:02 +01:00
Henrik Rydgård
a8a34fef9c
Virtualize CheckGPUFeatures
2018-02-26 11:35:37 +01:00
Henrik Rydgård
feb4694acc
Unify DispatchSubmitPrim as much as possible
2018-02-26 11:33:17 +01:00
Henrik Rydgård
967018b7f8
Unify Execute_LoadClut
2018-02-26 11:32:02 +01:00
Henrik Rydgård
c7f8f4c5ca
Unify Execute_Prim
2018-02-26 11:22:27 +01:00
Henrik Rydgård
23980065ba
Unify all the DrawEngine::SubmitPrim
2018-02-26 11:07:30 +01:00
Unknown W. Brackets
4b8d8c875d
Qt: Remove old texture debug API.
...
No one's testing it and it's not the best way. We have a better
implemented API and should use it instead.
2018-02-19 09:09:35 -08:00
Henrik Rydgård
86cfc411a4
Remove the confusing "DisableState" across the codebase
2018-02-08 16:27:36 +01:00
Unknown W. Brackets
22f65500f1
GPU: Fix shader blending recopying.
...
This at least didn't look horrible like GLEs did, but still looked
odd in Lunar.
2018-01-27 15:10:17 +01:00
Unknown W. Brackets
b566b6cca2
D3D11: Remove potentially misleading rebind func.
...
This doesn't override the GPUCommon one, it just shares the same name,
which might lead to confusion later. Better not to use the parent.
2018-01-27 15:10:17 +01:00
Unknown W. Brackets
db0989a9d0
Debugger: Fix texture preview in GLES.
...
Also, fix issues with the first view of a texture in Vulkan / D3D11.
2018-01-27 15:10:17 +01:00
Henrik Rydgård
f3282dcfda
Delete the gl name cache (might resurrect it on the GLQueueRunner side if needed later). Other cleanup and fixes.
2018-01-27 15:10:17 +01:00
Henrik Rydgård
d565e23f4c
Stencil copy: Avoid clearing the depth buffer.
2017-12-31 01:06:31 +01:00
Henrik Rydgård
b5e5d72a0a
Complete the separation of depth and stencil renderpass flags
2017-12-30 22:52:22 +01:00
Unknown W. Brackets
0151c5e649
GPU: Track stats on uploads.
...
A lot can lead to slowdown, so it's useful when logging frame drops.
2017-12-28 19:27:45 -08:00
Henrik Rydgård
c1a23658d1
Merge pull request #10456 from unknownbrackets/gpu-flips
...
Display: Avoid limiting FPS without a clear
2017-12-27 10:14:12 +01:00
Unknown W. Brackets
f9750dd137
Display: Avoid limiting FPS without a clear.
...
A bit of a dirty heuristic to avoid the slowdown in #8538 .
2017-12-26 19:37:40 -08:00
Unknown W. Brackets
d6da758ed3
GPU: Remove duplicate BACKEND constants.
2017-12-26 15:55:24 -08:00
Unknown W. Brackets
0956fa3ff6
GPU: Reduce depth blits when not updated.
...
If the game initially clears the depth in a buffer, but then never uses
that depth again, don't keep blitting depth.
Improves #8538 , by preventing the depth blits in this case.
2017-12-24 11:52:15 -08:00
Henrik Rydgård
dc6a4ea753
Fix annoying name clashes (Status is in X11 headers..)
2017-12-15 16:34:29 +01:00
Unknown W. Brackets
cd2dfd5c9a
UI: Show a few more flags in build config.
2017-12-10 09:00:51 -08:00
Henrik Rydgård
b75c8b72c6
Fix another little inconsistency (two uniforms were merged for bad reasons)
2017-12-07 21:39:09 +01:00
Henrik Rydgård
fb74c9dfeb
Clean up a small inconsistency
2017-12-07 21:09:09 +01:00
Unknown W. Brackets
0dee041002
D3D11: Change state caches to DenseHashMaps.
2017-12-02 18:55:02 -08:00
Unknown W. Brackets
243304a5e8
Hashmaps: Fix missing maintain calls in non-GLES.
...
Should only matter if vertex cache is enabled.
2017-12-02 18:27:18 -08:00