Commit Graph

5583 Commits

Author SHA1 Message Date
Unknown W. Brackets
6ee0612a10 Ge: Keep jump/call optim when fast memory on.
This gives a way to validate with fast memory off, and get less crashes.
2018-08-25 10:38:56 -07:00
Unknown W. Brackets
d13f76308d Ge: Avoid executing invalid pointers.
May help #3407 and related errors, as well as crashes and execution of
garbage.  This stops immediately on a bad pointer, rather than trying to
push through.
2018-08-25 10:32:32 -07:00
Unknown W. Brackets
7fa20d4734 GPU: Download safe size on next create, too.
In some cases, games will create a series of framebufs.  Before, we
weren't downloading them if they were only used once, as intended.
2018-08-25 10:01:43 -07:00
Unknown W. Brackets
3f48e446b6 GPU: Fix texture handling on framebuf detach.
We were never creating/recreating the texture, so we ended up with null.
Caused all sorts of problems.
2018-08-25 09:57:37 -07:00
Unknown W. Brackets
5c01bf61e6 GPU: Apply logic op in more cases.
It has well defined behavior with alpha blending, so let's apply it even
when we're blending.  Fixes #11316.
2018-08-24 21:19:54 -07:00
Unknown W. Brackets
734db3d050 GPU: Refactor logic op simulation for better reuse. 2018-08-24 21:05:27 -07:00
Unknown W. Brackets
44b90f638d SoftGPU: Apply pixel mask for clears.
Turns out it's respected even in clear mode.

Also, confirm logic op and blending interact.
2018-08-24 20:55:49 -07:00
weihuoya
7383e90c19 handle cullface, help to #10597 2018-08-23 12:46:09 +08:00
Unknown W. Brackets
cd98c4a266 GLES: Fix direct shader depal on GLES.
Was missing a cast and only worked on some desktop before.
2018-08-18 10:41:59 -07:00
Henrik Rydgård
e34378a1c1 Enable Discord integration for Mac and Linux. 2018-08-18 10:11:15 +02:00
Henrik Rydgård
6f173b9134 Harmonize some VS project settings. 2018-08-14 22:41:39 +02:00
Henrik Rydgård
39eb2b4153
Merge pull request #11298 from unknownbrackets/gles-depal
GLES: Enable shader depal with Vulkan fixes
2018-08-13 07:50:13 +02:00
Unknown W. Brackets
70318fda37 GLES: Enable shader depal with Vulkan fixes. 2018-08-12 19:49:08 -07:00
Unknown W. Brackets
c32ffa1db0 GE Debugger: Rename depth clamp more places.
Was still showing clip enable in disasm.
2018-08-11 16:33:39 -07:00
Unknown W. Brackets
06ad9b829f SoftGPU: Oops, correct rounding to make sense.
Was too hasty in that last commit.
2018-08-09 07:13:42 -07:00
Unknown W. Brackets
31d5c39858 SoftGPU: Fix some minor rounding on viewport cull.
Had some tests failing when on the edge due to this.
2018-08-05 20:07:45 -07:00
Unknown W. Brackets
e22cc7ef6d SoftGPU: Always clip, without special neg z case.
Depth clamping doesn't change whether it clips.  Also, avoid culling when
a vertex is behind the near plane.
2018-08-05 17:47:05 -07:00
Unknown W. Brackets
cd6b1f73c1 SoftGPU: Drop verts only when depth not clamped.
Depth clamping bypasses the 4096x4096 box check.
2018-08-05 17:17:55 -07:00
Unknown W. Brackets
77f0499f7f GPU: Rename clipping flag to depth clamp.
It seems to just to depth clamp.  When depth clamp happens, it affects
clipping a little, but only for vertices that needed clamping.
2018-08-05 17:11:51 -07:00
Unknown W. Brackets
7885a88c0c GPU: Optimize > 0 alpha test using discard rules.
It should be equally unsafe to use src color as dest blend factor, or
use blending with a subtract or min/max equation.
2018-07-29 11:39:06 -07:00
Unknown W. Brackets
78dc07e7a3 Headless: Fix graphics tests for Vulkan/Direct3D.
Otherwise we hang because there's no thread to ever end.
2018-07-29 11:26:04 -07:00
Unknown W. Brackets
fba0de59c1 GPU: Restrict alpha test to zero for dest blend.
We could end up with the wrong blending in other cases, because the
exiting color will get multiplied.

Luckily, this is still the common case.
2018-07-29 11:26:04 -07:00
Henrik Rydgård
a776dce593
Merge pull request #11269 from unknownbrackets/fragtest
Avoid discard when we can blend
2018-07-29 09:49:16 +02:00
Henrik Rydgård
42f4d7b40f OpenGL: Fix bug where we could end up calling glUniformMatrix without a bound program. Found by GL debug callback on NV.
This adds a bit of extra checking that's only enabled in _DEBUG builds.
2018-07-28 11:09:01 +02:00
Unknown W. Brackets
5ccd3ee4dc GPU: Allow skipping discard when write disabled.
Even if we depth test, if we don't write, we can still force alpha to
zero.
2018-07-27 20:16:51 -07:00
Unknown W. Brackets
8e49fa988c GLES: Avoid discard when we can blend.
May improve performance on PowerVR.
2018-07-27 20:06:41 -07:00
Unknown W. Brackets
5ad948df73 Vulkan: Avoid discard when we can blend.
Where possible, replace alpha and color testing with a zero alpha value.

This allows early fragment tests more often, which may help #11227.  It
may also generally help performance on PowerVR devices.
2018-07-27 20:04:36 -07:00
Henrik Rydgård
a589a371e6 Update SPIRV-Cross to a fresher version. 2018-07-16 20:00:45 +02:00
Unknown W. Brackets
82f1b72c4a
Merge pull request #11254 from hrydgard/light-chan-cost
Reduce the estimated transform cost of an additional light from 10 to 7 cycles
2018-07-15 07:42:34 -07:00
Henrik Rydgård
c404214042 Update glslang to latest as of 2016-06-26 2018-07-15 12:30:40 +02:00
Henrik Rydgård
ea1ef9277c Reduce the estimated transform cost of an additional light from 10 to 7 cycles, see #5530. 2018-07-15 12:13:25 +02:00
weihuoya
d9d9b14e53 Don't cut below 2 2018-07-05 15:29:40 +08:00
Unknown W. Brackets
0b245699bb GLES: Specify unsigned shift for Adreno bug.
Adreno 320 devices, and at least 1 Intel device, are complaining that
right shift can't be used within uint/int.

Possibly related to:
https://github.com/KhronosGroup/glslang/issues/1296
2018-06-30 09:50:02 -07:00
Unknown W. Brackets
2a13a66e18 GPU: Use hw tess only for hw transform.
This may be needed if we start using software for points/lines.
2018-06-28 19:47:33 -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
Henrik Rydgård
1517a93d08 Restore the vertexCount to 32-bit, needed in some tesselation situations 2018-06-26 19:49:49 +02:00
xebra
4fab160e19 [spline/bezier]Modify D3D11 hwtess texture buffer to structured shader buffer. 2018-06-27 01:10:36 +09:00
xebra
5536cdd827 [spline/bezier]Fix tex coords. 2018-06-26 01:47:13 +09:00
Unknown W. Brackets
95f270778e Core: Allow toggle between 2 custom speeds.
In addition to virtual keys for each speed separately.
2018-06-23 10:59:18 -07:00
Unknown W. Brackets
e2c217ab29 Core: More consistently use config enums. 2018-06-23 10:59:18 -07: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
Henrik Rydgård
a9da0028bb
Merge pull request #11203 from unknownbrackets/savestate
Reset CPU mhz on PPSSPP reset
2018-06-23 08:59:57 +02:00
Unknown W. Brackets
fd8a0612fa SaveState: Initialize some memory that is saved.
At the very least, will help them compress better.  Also good not to leak
random memory.
2018-06-22 21:29:18 -07:00
Unknown W. Brackets
06340bfa9c Vulkan: Workaround Adreno discard bug. (#11197)
This also explicitly enables early fragment tests when possible.  Using
conversative depth still works on Adreno and should allow some depth
optimizations.
2018-06-20 09:05:27 +02:00
Henrik Rydgård
f3ab56e15d
Merge pull request #11193 from unknownbrackets/gles
Android: Allow using OpenGL 4.x with javaGL disabled
2018-06-18 10:58:39 +02:00
Unknown W. Brackets
03edd6129a GLES: Cut down on use of USING_GLES2. 2018-06-17 20:51:34 -07:00
Unknown W. Brackets
bd13f6b906 Vulkan: Workaround stencil upload bug on Adreno.
We write a static depth value, which will be ignored, to force the driver
to support discard.
2018-06-17 17:50:38 -07:00
Unknown W. Brackets
9f4cd3fcdb GLES: Add missing semantics for stencil upload.
Makes #10634 work for GLES properly.
2018-06-17 17:50:38 -07:00
Unknown W. Brackets
f6036195d8 GLES: Cleanup stencil upload w/h handling.
In case a buffer has been resized recently, we want to upload just the
detected drawable area, probably.  Before this was inconsistent depending
on the render resolution.
2018-06-17 17:50:38 -07:00
Henrik Rydgård
da5f0f7f2b
Merge pull request #11186 from unknownbrackets/debugger
Debugger: Add APIs to retrieve render image
2018-06-17 21:53:38 +02:00
Unknown W. Brackets
80312582d1 GPU: Avoid a switch case warning. 2018-06-17 11:32:17 -07:00
Unknown W. Brackets
d1fa9b97a3 GPU: Remove some unused fields. 2018-06-17 11:26:09 -07:00
Unknown W. Brackets
e6917cccf6 Debugger: Add APIs to retrieve render image. 2018-06-16 15:33:02 -07:00
Unknown W. Brackets
a0608d7fc5 Debugger: Allow GPU actions while stepping.
This allows pulling the display/target while paused.  It may also allow
other actions that work outside a display list.
2018-06-16 13:57:45 -07:00
Unknown W. Brackets
469d8a6a41 GPU: Screenshot output in BGRA if that's native.
This is a decent chunk faster.
2018-06-16 13:48:50 -07:00
Unknown W. Brackets
c97023568c thin3d: Fix requesting BGRA buffers.
Should be fine to request BGRA->BGRA.

Also, the reverse flags were wrong/ignored on the format.
2018-06-16 13:31:08 -07:00
Henrik Rydgård
53f0f136ac
Merge pull request #11182 from unknownbrackets/postshader
GLES: Use accurate GLSL ver in postshader convert
2018-06-15 07:22:55 +02:00
Unknown W. Brackets
0d2de36258 GLES: Use accurate GLSL ver in postshader convert. 2018-06-14 20:31:58 -07:00
Henrik Rydgård
e03aeba75e
Merge pull request #11171 from unknownbrackets/debugger
Fix some issues with GE dumps
2018-06-14 10:07:21 +02:00
Unknown W. Brackets
582bc2d60a GE Debugger: Stall less liberally on GE dump exec.
This makes it easier to compare performance and flushing bugs.
2018-06-11 15:14:18 -07:00
Unknown W. Brackets
f7443aaa15 GE Debugger: Use a class for dump execution. 2018-06-11 15:06:40 -07:00
Unknown W. Brackets
ccef997a7a GE Debugger: Fix asserts when reading debug tex.
This is unfortunate, but right now BuildTexture() applies the sampling
settings which happen within a render pass.  So we must have a render
pass.
2018-06-11 14:56:25 -07:00
Unknown W. Brackets
0ed2c03350 GE Debugger: Prevent hang on shutdown.
Since we're blocking the Emu thread, we can't use a hook from the Emu
thread to wake up.

The change to lifecycle callbacks caused this.
2018-06-11 14:54:42 -07:00
Henrik Rydgård
e98ea812f6
Merge pull request #10973 from weihuoya/cullmode
handle cull mode by indices, refer to issue #10172
2018-06-10 20:53:18 +02:00
Unknown W. Brackets
395ac32d63 Debugger: Run memory breakpoints on mobile. 2018-06-06 17:31:56 -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
Henrik Rydgård
f9cfb05895
Merge pull request #10987 from unknownbrackets/debugger-core
Improve debugger threadsafety and consistency
2018-06-06 21:10:14 +02:00
Henrik Rydgård
9f1125ae33
Merge pull request #11078 from unknownbrackets/debugger-spline
GE Debugger: Show bezier/spline in preview
2018-06-06 20:40:10 +02:00
Henrik Rydgård
347721f200
Merge pull request #10981 from unknownbrackets/flat-shade
Use software transform for flat shading and fix colors
2018-06-06 19:05:54 +02:00
Unknown W. Brackets
9aad4dc848 GE Debugger: Cleaned repetition in spline preview. 2018-06-06 05:59:14 -07:00
Unknown W. Brackets
1829902171 GE Debugger: Show bezier/spline in preview.
Ignoring some things about normals and colors since they don't matter.
2018-06-06 05:59:14 -07:00
Unknown W. Brackets
e313a9bf6c Debugger: Lock startup/shutdown for threadsafety.
Otherwise things can get freed while we're trying to inspect them.
2018-06-06 05:58:49 -07:00
Unknown W. Brackets
e9cc1ee463 Debugger: Allow multiple clients more properly.
Otherwise we lose wakeups and hang.
2018-06-06 05:58:49 -07:00
Unknown W. Brackets
28cabd578a Qt Debugger: Remove display list debugger.
Being replaced with WebSocket based debugger.  Was disabled and not
working anyway, and hardcoded some GL so a barrier to Vulkan.
2018-06-06 05:58:10 -07:00
Unknown W. Brackets
4f93b1d136 GLES: Removed unused skip copy code.
Now it was just making the buffer larger for no reason.  Before, it
allowed us to skip the convBuf copy.
2018-06-06 05:56:30 -07:00
Unknown W. Brackets
2f859425a8 GPU: Use unordered_map for tempFBOs. 2018-06-06 05:56:30 -07:00
Unknown W. Brackets
8f354e5312 GPU: Minor framebuffer code cleanup. 2018-06-06 05:56:30 -07:00
Unknown W. Brackets
ad0b8435ca D3D9: Reuse BGRA conversion code.
Also, couldn't have been right to skip it when the pointers equal, not
sure if that case was ever being hit.
2018-06-06 05:56:30 -07:00
Unknown W. Brackets
2ab1552f2d D3D9: Use an unordered_map for offscreen.
Also cleanup.  Mostly just for consistent usage.
2018-06-06 05:56:30 -07:00
Unknown W. Brackets
7c8780bfb6 GPU: Remove some unused code. 2018-06-06 05:56:29 -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
5b62c8afb8 D3D9: Implement flat shading via state. 2018-06-06 05:53:50 -07:00
Unknown W. Brackets
b845278d7d D3D11: Implement flat shading in shader. 2018-06-06 05:53:49 -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
b037efdb55 If there are multiple Vulkan devices, show a setting to allow the user to choose. 2018-06-06 10:20:12 +02:00
zhang wei
f2e3476741 triangles 2018-06-05 10:39:40 +08:00
zhang wei
3380bbb0c6 save cache before clear 2018-06-04 22:00:29 +08:00
weihuoya
9f6922221d fx 2018-06-03 22:50:35 +08:00
weihuoya
d029bbacc7 triangle fan 2018-06-03 22:29:50 +08:00
Unknown W. Brackets
e6af167cd9
Merge pull request #11119 from hrydgard/vk-nulltexture
Never bind a NULL image view in Vulkan, not even through thin3d
2018-06-01 23:53:18 -04: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
Henrik Rydgård
9485b04914 Never bind a NULL image view in Vulkan no matter what. 2018-06-01 18:51:37 +02:00
Henrik Rydgård
30de8194a5
Merge pull request #11111 from weihuoya/gles-int-highp
depal shader use high int precision for opengl es
2018-06-01 08:41:25 +02:00
weihuoya
e01e77e025 fx depal int precision for opengl es 2018-06-01 00:58:44 +08:00
Henrik Rydgård
c964bc4ba2 Fix another of these pesky GL task switching bugs. 2018-05-30 19:29:26 +02:00
Henrik Rydgård
1c17373039 GLES: Properly restore the pointer to the render manager in more places 2018-05-29 23:07:22 +02:00
Henrik Rydgård
79f8388e65
Merge pull request #11088 from unknownbrackets/vulkan-state
Vulkan: Update shaders/state when dirty properly
2018-05-28 08:34:11 +02:00
Unknown W. Brackets
e7d07aff71 Vulkan: Update shaders/state when dirty properly.
Can't have been right before.
2018-05-27 22:28:09 -07:00
Henrik Rydgård
0d6be3a476 GLES: Refresh the draw context in DrawEngineGLES on DeviceRestore. How did we miss this? 2018-05-27 22:25:15 +02:00
Henrik Rydgård
b730d187e8 Add some paranoid checks guided by stack traces from Google Play 2018-05-27 22:12:59 +02:00
Henrik Rydgård
ab65c5210c GLES shader depal fix. Again, this is disabled by default so should not affect anything. 2018-05-14 21:20:51 +02:00
Henrik Rydgård
061f92c177 Minor code simplification 2018-05-14 21:19:48 +02:00
Henrik Rydgård
4ba9fe3e0e GLES depal (currently disabled): Use high int precision.
Should fix issue mentioned in fb7a63bd11
2018-05-13 20:51:20 +02:00
Henrik Rydgård
011e57c0e7 Always specify GLSL version 450 when compiling Vulkan shaders.
Bit of a risky change so late in the game but it's wrong, it needs fixing.
See for example the comments to fb7a63bd11
2018-05-13 20:42:17 +02:00
Henrik Rydgård
b64841e8cc Minor optimization 2018-05-07 00:05:35 +02:00
Henrik Rydgård
ed52d9f9fb Shader depal (VUlkan): Apply a half-texel offset when bilinear filtering, fixing #11008
Also skip three texture samples if all indices are equal.
2018-05-06 22:30:20 +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
Henrik Rydgård
77e574ccc6 Buildfix. 2018-05-04 22:57:13 +02:00
Henrik Rydgård
698bd75209 Fix regression caused by the new depal code for Vulkan. Fixes #10993 2018-05-04 22:24:11 +02:00
aliaspider
17259b87ea softgpu: remove RIP addressing from SamplerX86 2018-05-04 17:37:46 +01:00
zhang wei
51388ded22 cullmode fallback 2018-04-28 14:59:12 +08:00
zhang wei
3419197ee9 flush back cull mode 2018-04-27 21:49:43 +08:00
zhang wei
cfc353ee81 handle cull mode by indices, improve performance for GVGNP, refer to #10172 2018-04-27 16:33:35 +08: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
Unknown W. Brackets
3f3dd6b3bb Vulkan: Fix shutdown crash when device lost called.
Fixes #10917.
2018-04-14 13:14:20 -07:00
Henrik Rydgård
03c2292ae9
Merge pull request #10915 from unknownbrackets/warnings
Warning fixes
2018-04-14 20:30:26 +02:00
Unknown W. Brackets
cddc7b5dc5 Vulkan: Fix cache file error handling warnings. 2018-04-14 10:59:41 -07:00
Henrik Rydgård
f17890623c Shader depal: fix bilinear filter coord 2018-04-13 20:57:36 +02:00
Henrik Rydgård
fb7a63bd11 Implement shader depal for GL as well, but disabled by default. 2018-04-13 20:00:14 +02:00
Henrik Rydgård
0ac6cea34d Add a queue processing hack for Sonic Rivals too. Now it's fast. 2018-04-13 18:05:04 +02:00
Henrik Rydgård
413a204138 Vulkan: Semi-gross hack that massively improves the perf of MGS2:Acid. 2018-04-13 17:32:56 +02:00
Henrik Rydgård
81276c8862 Fix various bugs. 2018-04-13 14:19:05 +02:00
Henrik Rydgård
69bd427ca2 Shader depal: Implement bilinear filtering. 2018-04-13 14:19:05 +02:00
Henrik Rydgård
29c41c6a35 Implement shader depal for Vulkan. See #10908. Bilinear filter not yet implemented. 2018-04-13 14:19:01 +02:00
Henrik Rydgård
117dad8a48 Just add some constants for the GL texture slots. 2018-04-13 09:11:08 +02:00
Henrik Rydgård
163350bbcd Vulkan/D3D11: Make some space in the base uniform buffer by consolidating the spline parameters into one variable. 2018-04-13 08:58:05 +02:00
Henrik Rydgård
a3ed87bca5 Some comment fixes and cleanup.
Not much point warning for those MIPS instructions - if games use them,
they use them carefully because games can't catch that exception anyway.
2018-04-12 12:00:19 +02:00
Henrik Rydgård
31ae11ecc8 Don't forget to dirty some state after depal. May help #10906 ? 2018-04-12 11:59:18 +02:00
Henrik Rydgård
23052b5a6b Buildfix. 2018-04-10 16:28:06 +02:00
Henrik Rydgård
02ea4b5efa Inner interpreter safety check - in hw skinning mode, we need to flush if any part of the vertex format changes. 2018-04-10 14:37:32 +02:00
Henrik Rydgård
dbe52c8135 Remove some obsolete checks - software skinning is now supported even if morphcount isn't 1. 2018-04-10 13:09:01 +02:00
Henrik Rydgård
00f3bf6102 Revert "Start removing support for hardware skinning."
This reverts commit dcb773d624.
2018-04-10 12:31:21 +02:00
Henrik Rydgård
ccd594dae7 Revert "VertexLoader: Remove now-unused weights translation code"
This reverts commit 44100c6c1d.
2018-04-10 12:30:49 +02:00
Henrik Rydgård
0345e1a7d4 Revert "Oops, fix hardware tess in Vulkan (after removing hw skinning, we need to adjust the binding number)"
This reverts commit 87575910df.
2018-04-10 12:28:30 +02: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
7de3edb46c Revert "Remove gstate_c.deferredVertTypeDirty"
This reverts commit fcdb816235.
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
1c99ebcbcc Fix DecFmt bug 2018-04-10 12:12:47 +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
e784d1a29c Vulkan: Ease off on the allocator "slab pressure" if texture scaling is enabled.` 2018-04-07 10:40:49 +02:00
Unknown W. Brackets
d07a124a90 Vulkan: Increase base slab allocation size. 2018-04-06 21:43:18 -07:00
Unknown W. Brackets
99d16b2202 Vulkan: Add tags to UI textures too. 2018-04-06 21:43:18 -07:00
Unknown W. Brackets
5f27a2e60a Vulkan: Track tags on emu textures. 2018-04-06 21:43:18 -07:00
Unknown W. Brackets
fd183715ec Vulkan: Decimate when there are many slabs.
This helps avoid one little texture holding onto a whole slab.

Won't change behavior when they are full, since then the cacheSizeEstimate
should be fairly high.
2018-04-06 21:42:32 -07:00
Henrik Rydgård
ca0fb77080 Assorted cleanups. Don't assert on no clear mask. 2018-04-06 23:29:44 +02:00
Henrik Rydgård
86966684d4 Vulkan: Remove the wrapper struct around VulkanTexture 2018-04-05 23:23:14 +02:00
Henrik Rydgård
2cd8bd9bc3 Fixes to in-game GPU shutdown/switching. Fixes #10860 2018-04-05 20:26:29 +02:00
Henrik Rydgård
398d375568 Fix issue in TextureCacheGLES::DeviceRestore 2018-04-05 20:17:30 +02:00
Henrik Rydgård
b06df3536e Auto unregister push buffer on deletion. 2018-04-05 17:53:03 +02:00
Henrik Rydgård
feb3870f7d Also take control over Begin/End 2018-04-05 17:34:32 +02:00
Henrik Rydgård
8d6bbc54a9 Minor refactoring moving creation/deletion of GLPushBuffer to GLRenderManager 2018-04-05 17:31:12 +02:00
Henrik Rydgård
1d6263d5eb More GL shutdown fixes. Partially fixes #10868 2018-04-05 12:28:59 +02:00
Henrik Rydgård
d3164d77d4
Merge pull request #10845 from LunaMoo/SSAAflag
Add SSAA flag for post process shaders
2018-04-04 15:40:26 +02:00
Unknown W. Brackets
d70568abd2 GPU: Fix s8 norm with skin and morph.
Fixes #10851.
2018-04-02 19:18:16 -07:00
LunaMoo
ffac542f95 Change to int to allow higher supersampling scale. 2018-04-02 13:44:28 +02:00
Unknown W. Brackets
c6ef547176 GLES: Show post-shader compile errors to user. 2018-04-01 19:47:19 -07:00
Unknown W. Brackets
98d4131003 Vulkan: Show post-shader compile errors to user. 2018-04-01 19:47:19 -07:00
Unknown W. Brackets
db756b6aeb GLES: Show post-shader translate errors to user.
Usually these should be syntax errors, so better to let them know it
happened.
2018-04-01 19:47:02 -07:00
LunaMoo
199106cad6 Add SSAA flag for post process shaders,
enforces 2x auto resolution, to be used with blurry effects
Also includes a perf. friendly example using simplified gauss filter
2018-04-01 17:00:10 +02:00
Henrik Rydgård
170b600835 Oops, fix mistake in #10834 2018-03-29 16:21:58 +02:00
Henrik Rydgård
1b39b4b16c
Merge pull request #10833 from hrydgard/texcache-fb-fix
When binding a framebuffer to a texcache entry, delete its texture. Should help #10823
2018-03-29 16:01:22 +02:00
Henrik Rydgård
d160292f54 Include renderpass definition in Vulkan shader cache entries, should make it more effective again. 2018-03-29 14:36:04 +02:00
Henrik Rydgård
c41273d333 When binding a framebuffer to a texcache entry, delete its texture. Should help #10823 2018-03-29 13:29:09 +02:00
Henrik Rydgård
01d81ffa72 OpenGL: Fix texture wrapping of render targets. 2018-03-28 11:23:41 +02:00
Unknown W. Brackets
68930a4291
Merge pull request #10788 from hrydgard/remove-texture-update
Remove the remains of updating texture contents instead of recreating.
2018-03-25 12:07:08 -04:00
Henrik Rydgård
f9555da05b When listing post-shaders, use the "name" specified in the ini as default, when looking up translations. 2018-03-25 11:53:11 +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
Henrik Rydgård
0843e2cb98 Fix updating light constants when light type changes (we handle dir/pos lights differently). Fixes #10132 2018-03-25 00:21:03 +01:00
Unknown W. Brackets
1b8297de31 GPU: Count clears during frameskip.
This allows the GoW hack to still work during frameskip.
Fixes #10668.
2018-03-24 10:58:24 -07:00
aliaspider
0af6d573bb remove all usage of __LIBRETRO__ 2018-03-24 12:45:20 +01:00
aliaspider
198c946218 remove unnecessary NULL assignment. 2018-03-23 04:14:10 +01:00
aliaspider
23dae72bce prevent reads of uninitialized memory. 2018-03-22 22:25:04 +01:00
aliaspider
15c4406df7 add missing inclues. 2018-03-22 22:14:19 +01:00
aliaspider
fc9a5ff65c prevent use-after-free. 2018-03-22 22:10:05 +01:00
Henrik Rydgård
24b9fb6ea9 Buildfix 2018-03-19 18:14:57 +01:00
Henrik Rydgård
f1359af0b0 Vulkan: Improve handling of shader compile failures (don't crash) 2018-03-19 17:46:58 +01:00
Henrik Rydgård
1888d828ec Vulkan: Workaround for bug in Adreno shader compiler affecting color tests.
This comparison should pretty much work as well as the old one, I
believe, if not faster.

Should help #10695
2018-03-19 17:33:08 +01:00
Henrik Rydgård
7ce5f8d29c Delete some mistaken logging code 2018-03-19 14:44:20 +01:00
Henrik Rydgård
3e5757d7d7 Minor improvement in pipeline-to-string (debug) 2018-03-19 11:19:10 +01:00
Henrik Rydgård
8f87a9f5c5 Vulkan: De-duplicate pipelines when storing cache
The new variety of renderpasses with different transitions causes
duplication. Hopefully drivers are smart enough to re-use work
between similar pipelines as much as possible...
2018-03-19 11:18:37 +01:00
Henrik Rydgård
648b4eac51 Shrink the vertexCount field in DeferredDrawCall to the 16 bits required. 2018-03-18 09:42:05 +01:00
Henrik Rydgård
ad42ec5473 Inner interpreter: Add support for the Gran Turismo hack. 2018-03-17 23:57:50 +01:00
Henrik Rydgård
0ee058320a Pass new vulkan validation layers. Fix math in FindTransferFramebuffers. 2018-03-17 23:39:02 +01:00
Unknown W. Brackets
7ae4a9e977 Vulkan: Load shaders/pipelines on thread.
In case it's slow when not reading raw cache data.
2018-03-17 07:42:07 -07:00
Henrik Rydgård
99af1d58ad OpenGL task switching fix 2018-03-17 13:45:12 +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
9761d8930d Bump GL shader cache version 2018-03-17 02:01:11 +01:00
Henrik Rydgård
6858c77612 Don't allow wrapping on framebuffer textures. Fixes GTA on old NV Shield 2018-03-17 01:54:11 +01:00
Henrik Rydgård
614cabb115 Implement pipeline/shader cache for Vulkan, to avoid shader compile stutters on second and subsequent runs.
The raw pipeline cache got pretty large. Instead, store IDs like GL.

There's still a disabled option to store the pipeline cache objects.
2018-03-16 21:03:03 +01:00
Henrik Rydgård
2d33d526b8 Remove some remains of software skinning 2018-03-16 20:38:05 +01:00
Henrik Rydgård
8dc85c1a60 Vulkan pipeline: Merge a few property fields to a flags field.
To make saving/loading them easier.
2018-03-16 17:38:02 +01:00
Henrik Rydgård
4ee941dab1 Vulkan: Fix bug where we didn't always reset dynamic state after readbacks. 2018-03-16 15:52:43 +01:00
Henrik Rydgård
3cd92b4d90 Vulkan: Add a (disabled) facility to force image layouts to GENERAL, for debugging barrier issues 2018-03-15 16:23:23 +01:00
Carlos Estrague / Mrc_munir
f3040949a3
Fix a typo extra " in some header
Fix a typo introduced in https://github.com/hrydgard/ppsspp/pull/10715
2018-03-13 20:16:41 +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
a0fa199ce3
Merge pull request #10715 from unknownbrackets/loading
UI: Show more detailed loading status
2018-03-13 10:44:07 +01:00
Unknown W. Brackets
88e01c7944 UI: Show more detailed loading status.
It's sometimes taking longer, so this may make it easier to identify.

See #10673.
2018-03-12 18:06:46 -07:00
Henrik Rydgård
d8651fd85b Combine the lightAngle and spotCoef float uniforms into one float2. Saves 64 bytes from the light uniform buffer, making it an even 512.
Probably a very small perf optimization.
2018-03-12 11:17:45 +01:00
Henrik Rydgård
0ed3deabe6 Fix #10692 (crash when starting games from command line). Throw in some minor Vulkan fixes as well. 2018-03-08 16:35:13 +01:00
Henrik Rydgård
b6cbbceac9 MOVUPS to be safe. 2018-03-05 16:23:07 +01:00
Henrik Rydgård
91b565ae20 Minor simplification in X86/X64 vertex decoder jit 2018-03-05 13:19:36 +01:00
Henrik Rydgård
50de13d3d7 Optimize the "inner interpreter" for God of War character drawing. Speeds the games up by 4% or so.
(measured on the title screen though..)
2018-03-05 12:50:51 +01:00
Henrik Rydgård
4cf5999bc8 Move the vertTypeID calculation out of DrawEngine. Need to shorten SubmitPrim as much as possible. 2018-03-05 12:28:10 +01:00
Henrik Rydgård
87575910df Oops, fix hardware tess in Vulkan (after removing hw skinning, we need to adjust the binding number) 2018-03-05 00:43:54 +01:00
Henrik Rydgård
8ff5704fbf Fix indentation mistake, minor cleanup. 2018-03-05 00:03:47 +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
fcdb816235 Remove gstate_c.deferredVertTypeDirty 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
44100c6c1d VertexLoader: Remove now-unused weights translation code 2018-03-05 00:03:47 +01:00
Henrik Rydgård
dcb773d624 Start removing support for hardware skinning. 2018-03-05 00:03:47 +01:00
Henrik Rydgård
978f8e73e5 Remove checks that disabled software skinning if there was morph. 2018-03-05 00:03:47 +01:00
Henrik Rydgård
66cbad443a Add necessary decode functions to support morph+skin 2018-03-05 00:03:47 +01:00
Henrik Rydgård
45cfda4aa0 Small refactoring in VertexDecoderCommon 2018-03-05 00:03:47 +01:00
Henrik Rydgård
d3665a8482 Minor cleanup 2018-03-05 00:03:47 +01:00
Henrik Rydgård
b74634aa3b Turn off the inner interpreter when stepping in the GE debugger. Fix comment. 2018-03-02 07:06:58 +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
4130bcd416 inner interpreter: support skipping regular nops 2018-03-01 09:38:06 +01:00
Henrik Rydgård
995a1cfc61
Merge pull request #10658 from hrydgard/inner-prim-interpreter
Execute_Prim: Add a smaller "inner interpreter" to speed long up sequences of PRIM commands
2018-02-28 21:50:05 +01:00
Henrik Rydgård
28e202a089 Buildfix, oops 2018-02-28 19:15:29 +01:00
Henrik Rydgård
83c82a5ebd GL: Fix depal issue where we forgot to set vp/scissor properly. Update some asserts. 2018-02-28 18:45:14 +01:00
Henrik Rydgård
ef3341e34f Don't use the inner interpreter when debug recording 2018-02-28 09:18:53 +01:00
Henrik Rydgård
292f116821 Execute_Prim: Add a smaller "inner interpreter" to avoid going back to the runloop during long sequences of PRIM commands.
Helps performance by a quite measurable 1-4% in several PRIM-heavy games.
2018-02-28 09:18:41 +01:00
Henrik Rydgård
07afda1db0 Add an extra check to FindTransferFramebuffers to avoid misdetecting fb blits that end up out of bounds when we perform them.
Affected Burnout Legends (which would crash the Vulkan device)
2018-02-28 01:01:45 +01:00
Henrik Rydgård
f5dd9c17cd Add comment trying to clarify shutdown of GPU_GLES, restore the wipe, minor tweaks. Should help #10652
This reverts commit 10be0cad96.
2018-02-27 22:04:24 +01:00
Henrik Rydgård
14c93bdc2b Minor code/logging cleanups. 2018-02-27 19:44:11 +01:00
Henrik Rydgård
4b784e6035
Merge pull request #10653 from hrydgard/submitprim-unify
Unify the SubmitPrim function, and some others, between the HW backends
2018-02-26 16:17:16 +01:00
Henrik Rydgård
10be0cad96 GL: Don't wait-for-idle when shutting down the PSP GPU, it's the wrong place. Should fix #10652 2018-02-26 15:48:45 +01:00
Henrik Rydgård
a78365e73d Remove duplicate declaration of GPUCommon::CmdFunc 2018-02-26 15:19:11 +01:00
Henrik Rydgård
0b4b2bfe9c Avoid the most common virtual call when possible. 2018-02-26 13:51:14 +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
Henrik Rydgård
eb014e8c6b Try to be more consistent when initializing vulkan structs. 2018-02-25 12:15:29 +01:00
Henrik Rydgård
b7b5c5e211 Follow the spec rules about errors when allocating from descriptor pools
See https://www.khronos.org/registry/vulkan/specs/1.0/man/html/vkAllocateDescriptorSets.html
2018-02-25 12:15:29 +01:00
Henrik Rydgård
8e0e5f9aa6 Extract RecreateDescriptorPool() 2018-02-25 12:15:29 +01:00
Henrik Rydgård
5d77c63216 Vulkan: Need to count allocated descsets per frame separately from the map, since tess isn't even in-frame cached. 2018-02-24 12:15:22 +01:00
Henrik Rydgård
d1a8514e72 Vulkan: Dynamically grow descriptor pools as needed. Should help #10641 and similar issues. 2018-02-24 10:24:11 +01:00
Unknown W. Brackets
506dfcb916 GLES: Fix texture scaling.
Oops, and I had broken it again.
2018-02-22 19:58:52 -08: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