Commit Graph

5671 Commits

Author SHA1 Message Date
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
9c6f7000b7 New spline stuff seems to need bigger storage buffer pools 2018-11-11 22:52:37 +01:00
Unknown W. Brackets
4996084665 GPU: Dirty frag shader on depth write.
We use this flag to determine whether we use discard, so it changes shader
ids.  Fixes the layering part of #11535.
2018-11-06 21:16:51 -08:00
Henrik Rydgård
67d6e3d384 Framebuffer blit: Clip src rectangle as well 2018-11-05 00:34:04 +01:00
Henrik Rydgård
2c5922b0ad
Merge pull request #11530 from unknownbrackets/dxt
Make DXT alpha and color calculation more accurate
2018-11-04 18:51:54 +01:00
Unknown W. Brackets
bd294f658f TexCache: Round DXT5 alpha up.
This isn't quite right, but it seems better than rounding down.
Experimented with a lower round up value, but none were right - the
weighting must be more complex.
2018-11-04 09:36:39 -08:00
Unknown W. Brackets
df200fc3d2 TexCache: In DXT3, don't swizzle alpha.
Hardware doesn't seem to.
2018-11-04 09:36:39 -08:00
Unknown W. Brackets
c31e01771e TexCache: Respect color order in DXT3/5.
Hardware is still doing DXT1 style colors in this scenario.
2018-11-04 09:36:39 -08:00
Unknown W. Brackets
11ab4e8634 TexCache: Mix DXT colors using 2/3 not 3/8.
Hardware draws using 2/3.  Adding this way matches rounding, too.
2018-11-04 09:36:39 -08:00
Unknown W. Brackets
35a1d8a1ef TexCache: Decode DXT1 zero alpha as black.
Hardware tests show this is how it decodes, which is more like standard
DXT1 decoding.
2018-11-04 08:09:56 -08:00
Unknown W. Brackets
38eb9d12d0 TexCache: Don't swizzle DXT1 colors.
Hardware tests show that this shouldn't happen.  May be important for
color tests, etc.
2018-11-04 08:09:13 -08: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
6eb4c141a6
Merge pull request #11510 from unknownbrackets/scissor
GLES: Correct invalid scissor handling
2018-11-02 11:09:05 +01:00
Henrik Rydgård
0134fc8739
Merge pull request #11513 from unknownbrackets/gpu-shutdown
Wait for orderly finish of cache before shutdown
2018-10-31 15:55:36 +01:00
Unknown W. Brackets
40ca49d0e3 GPU: Cancel shader preload on shutdown/lost.
Otherwise, we could've ended up with shaders loading after or during the
lost event, and dense hash map corruption.
2018-10-30 20:32:12 -07:00
Unknown W. Brackets
6130eb34be Vulkan: Wait for GPU ready on shutdown.
In case it's still busy preloading shaders.
2018-10-30 19:13:22 -07:00
Unknown W. Brackets
29b5581416 GLES: Correct invalid scissor handling.
Also improves Direct3D 9.  See #11444.

Per hardware tests, we should correctly not draw in this case.
2018-10-28 15:56:02 -07:00
Henrik Rydgård
c6c22a03fd Address feedback, thanks! 2018-10-28 16:48:46 +01:00
Henrik Rydgård
c074d3c61f Improve sanity checks for framebuffer readbacks 2018-10-28 14:30:39 +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
Henrik Rydgård
842290b6dd Workaround for bad int behaviour on Adreno / GLES. (no problems in
Vulkan).

See #11480, should help #11479.
2018-10-20 13:22:14 +02:00
Unknown W. Brackets
ca5adcda71 GPU: Reduce log noise while stepping.
We redisplay the framebuf over and over, which is annoying when you have
debug logging on and are trying to read the log.
2018-10-07 14:40:10 -07:00
xebra
46d30d02cf [spline/bezier]minor fix 2018-10-07 23:54:32 +09: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
5f07213c25 [spline/bezier]minor fix 2018-10-07 23:54:30 +09:00
xebra
5f9022ae14 [spline/bezier]minor fix 2018-10-07 23:54:29 +09:00
xebra
405ead8d41 [spline/bezier]Get rid of duplication call of Flush(). 2018-10-07 23:54:28 +09:00
xebra
ef53195ae8 [spline/bezier]Surround with namespace Spline. 2018-10-07 23:54:28 +09:00
xebra
1dfb402871 [spline/bezier]Remove comment. 2018-10-07 23:54:27 +09:00
xebra
10afcf2dbb [spline/bezier]Improve basic spline/bezier structures. 2018-10-07 23:54:26 +09:00
xebra
8ad38dfaae [spline/bezier]oops 2018-10-07 23:54:25 +09:00
xebra
c49d9e2f72 [spline/bezier]minor fix(referenced to c1f0e981). 2018-10-07 23:54:24 +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
d98fa06b5f [spline/bezier]Fix to build for Android(clang). 2018-10-07 23:54:21 +09:00
xebra
019e276798 [spline/bezier]Modify ControlPoints and fix VertexPreview. 2018-10-07 23:54:20 +09:00
xebra
1c604d5b60 [spline/bezier]Put the control points stuffs all in one structure. 2018-10-07 23:54:19 +09:00
xebra
66833513c0 [spline/bezier]Modify the weights cache variables to a template variable. 2018-10-07 23:54:18 +09:00
xebra
62aaf6336a Math3D: Something wrong with hand simd optimization in vec2<float>, so it causes very slow down.
However, compiler optimization is faster enough, so removed it.
2018-10-07 23:54:17 +09:00
xebra
c4a8d80b61 [spline/bezier]Put the output buffers all in one structure. 2018-10-07 23:54:17 +09:00
xebra
a241058d7b [spline/bezier]Improve TemplateParameterDispatcher class macro to a real class. 2018-10-07 23:54:16 +09:00
xebra
98ddefbd5a [spline/bezier]Extract an if-check in the hot loops to the template parameter. 2018-10-07 23:54:15 +09:00
xebra
3216a83a92 [spline/bezier]Expand loops in the shaders. 2018-10-07 23:54:14 +09:00
xebra
8c279c0e25 [spline/bezier]Precalculate weights in the shaders using the outer product. 2018-10-07 23:54:13 +09:00
xebra
03b9492f08 [spline/bezier]Sharing textures to avoid heavily textures creation/deletion in one frame. At least, it occurs about 1000 and very slow down in Pursuit Force. 2018-10-07 23:54:12 +09:00
xebra
453e274fbe [spline/bezier]Fix around vertex type flags. 2018-10-07 23:54:11 +09:00
xebra
d4a667397c [spline/bezier]Improve shader uniforms a bit. 2018-10-07 23:54:10 +09:00
xebra
de5975f13e [spline/bezier]Reduce multiplications in the shaders from 16 to 4. 2018-10-07 23:54:09 +09:00
xebra
103d180ae7 [spline/bezier]Get rid of wasted if-checks at Graphics Processors. 2018-10-07 23:54:08 +09:00
xebra
41d6c3cf3a [spline/bezier]Move whole tessellation logic in the shaders into a subroutine. 2018-10-07 23:54:08 +09:00
xebra
3d07bca010 [spline/bezier]Fix spline weights calculation and get rid of using next patch position in hwtess.
# Conflicts:
#	GPU/Directx9/VertexShaderGeneratorDX9.cpp
#	GPU/GLES/VertexShaderGeneratorGLES.cpp
#	GPU/Vulkan/VertexShaderGeneratorVulkan.cpp
2018-10-07 23:54:07 +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
e5976f588b [spline/bezier]Unify software tessellation of bezier and spline.
# Conflicts:
#	GPU/Common/SplineCommon.cpp
2018-10-07 23:54:03 +09:00
xebra
1b076f8324 [spline/bezier]Improve HW tess on Opengl to combine 3 textures into a single texture and use it. 2018-10-07 23:54:03 +09:00
xebra
0cb63318bc [spline/bezier]Fix to build for GE debugger. 2018-10-07 23:54:00 +09:00
xebra
7d45078202 [spline/bezier]minor cleanup 2018-10-07 23:54:00 +09:00
xebra
24123e6268 [spline/bezier]Fix about quality. 2018-10-07 23:53:59 +09:00
xebra
da1176f2b3 [spline/bezier]Improve template parameter dispatch method.
# Conflicts:
#	GPU/Common/SplineCommon.h
2018-10-07 23:53:58 +09:00
xebra
f7ac70858d [spline/bezier]Improve spline tessellation using same as bezier tessellation method.(performance improvements, at least 10 FPS or more) 2018-10-07 23:53:57 +09:00
xebra
b11f9e6acf [spline/bezier]Fix normal generation flag and some minor stuffs. 2018-10-07 23:53:56 +09:00
xebra
ca4e246680 [spline/bezier]Improve tessellator more generic. 2018-10-07 23:53:55 +09:00
xebra
07888d7027 [spline/bezier]Improve bezier tesselator more. 2018-10-07 23:53:54 +09:00
xebra
f12d796665 [spline/bezier]minor cleanup 2018-10-07 23:53:53 +09:00
xebra
30691535dc [spline/bezier]Fix bezier texcoord generation. 2018-10-07 23:53:52 +09:00
xebra
4c6098d801 [spline/bezier]Improve bezier tessellator more. 2018-10-07 23:53:51 +09:00
xebra
068cc37b2f [spline/bezier]Improve bezier tessellator. 2018-10-07 23:53:51 +09:00
xebra
1e84a62e96 [spline/bezier]Implement weights cache system. 2018-10-07 23:53:50 +09:00
xebra
15b409a698 [spline/bezier]Make a spline weights calculation class and precalculate all spline weights at the beginning. 2018-10-07 23:53:49 +09:00
xebra
0c9680446e [spline/bezier]minor fix 2018-10-07 23:53:48 +09:00
xebra
1b9af84270 [spline/bezier]minor fix 2018-10-07 23:53:47 +09:00
xebra
2a3210ac05 [spline/bezier]Make a bezier weights calculation class and precalculate all bezier weights at the beginning. 2018-10-07 23:53:46 +09:00
xebra
3aeb3201b9 [spline/bezier]Improve bezier weights calculation. 2018-10-07 23:53:45 +09:00
xebra
a340390996 [spline/bezier]Move bezier patch loops into the function and pre-convert control-points. 2018-10-07 23:53:44 +09:00
xebra
d0682d7829 [spline/bezier]Move SIMD optimization of vector operations to Math3D.h.
Needs rebuild to avoid a dialog confirmation on Visual Studio.
2018-10-07 23:53:43 +09:00
xebra
c8e45ae4bf [spline/bezier]Use real tessellation in low-quality with "fixed to 2" tessellation factor.
# Conflicts:
#	GPU/Common/SplineCommon.cpp
2018-10-07 23:53:42 +09:00
xebra
36ed61d08d [spline/bezier]Pre-convert control-points for the accumulation of SIMD optimization, and avoid conversion in hot loops.
# Conflicts:
#	GPU/Common/SplineCommon.cpp
#	GPU/Common/SplineCommon.h
2018-10-07 23:53:42 +09:00
xebra
62ad5fe546 Fix namespace Vec2f. 2018-10-07 23:53:41 +09:00
xebra
15a11d58c9 Modify IndexConverter class to functor. 2018-10-07 23:53:40 +09:00
xebra
d8ccc1c2b5 [spline/bezier]minor fix 2018-10-07 23:53:39 +09:00
xebra
30c3c87da8 [spline/bezier]Make a function to build indices. 2018-10-07 23:53:38 +09:00
xebra
7cbc97f19e [spline/bezier]minor cleanup 2018-10-07 23:53:37 +09:00
xebra
966ff32ee7 [spline/bezier]Improve the logic of copying control-points. 2018-10-07 23:53:36 +09:00
xebra
485260c937 [spline/bezier]Make a function to copy control points. 2018-10-07 23:53:35 +09:00
xebra
b1289cddce [spline/bezier]minor fix 2018-10-07 23:53:34 +09:00
xebra
3c2837bee7 [spline/bezier]minor fix 2018-10-07 23:53:33 +09:00
xebra
a7754c4b9c [spline/bezier]minor fix
# Conflicts:
#	GPU/Common/SplineCommon.cpp
2018-10-07 23:53:32 +09:00
xebra
1d4e8ccd25 [spline/bezier]minor fix 2018-10-07 23:53:32 +09:00
xebra
28a50053bd [spline/bezier]minor fix 2018-10-07 23:53:31 +09:00
xebra
a4860b6c80 [spline/bezier]Managing buffer allocation.
# Conflicts:
#	GPU/Common/SplineCommon.cpp
2018-10-07 23:53:30 +09:00
xebra
a9ac860da2 [spline/bezier]Add spline derivative calculation for normal generation. 2018-10-07 23:53:29 +09:00
xebra
5c7284f8f2 [spline/bezier]Get rid of divisions in spline weights calculation. 2018-10-07 23:53:28 +09:00
Henrik Rydgård
6fd1c0e3d9 Instead of the last commit, don't enable the dual src extension at all on Adreno.
This reverts commit eba6c00a8a.
2018-10-07 12:19:11 +02:00
Henrik Rydgård
eba6c00a8a Experimental commit trying to solve #10421: Blacklist dual src blending on Adreno/Vulkan 2018-10-06 22:57:23 +02:00
xebra
64cf6f2755 GE Debugger:Step to curved surface. 2018-10-01 11:41:19 +09:00
Unknown W. Brackets
26cd98cd7e GPU: Fix a shader unit typo. 2018-09-24 23:05:32 -07:00
Unknown W. Brackets
67058495f5 GPU: Dirty more correctly for cullrange params.
Was previously missing some settings which might convince us to use large
viewports, and more importantly some that would impact the depth settings
under certain settings.
2018-09-21 21:55:11 -07:00
Unknown W. Brackets
4a5320ed7d GLES: Refactor out duplicate code. 2018-09-20 20:40:32 -07: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
a8588b0c5c GPU: Correct handling of large viewport scaling.
Need to multiply not divide, duh.  Also lost the offset during refactor,
and didn't test it well.
2018-09-20 20:29:46 -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
Henrik Rydgård
c1f0e981a3 Throw in very minor fix (apply readonly to buffer used in tesselation).
Validation layer seems buggy though as it still complains that we haven't
enabled the feature vertexPipelineStoresAndAtomics
2018-09-18 23:53:16 +02:00
Henrik Rydgård
5975f471e2 Vulkan: Only apply the depth workaround on Qualcomm devices (adreno)
We've seen issues, and the validation layer still doesn't like them very much...
2018-09-18 23:46:45 +02:00
Henrik Rydgård
acfd688647
Merge pull request #11393 from unknownbrackets/cullrange
Implement vertex range culling
2018-09-18 23:21:42 +02:00
Unknown W. Brackets
52baec21a8 GPU: Refactor cull range calculation together. 2018-09-17 22:27:25 -07:00
Unknown W. Brackets
9859827645 Vulkan: Avoid depth clamp with clip range.
Vulkan clamps to the clip range, not the full range.  So when clipping, we
don't really want to clamp at all.  Unfortunately, when one side is
clipping, we can't do it exactly right.

But many games clip depth, like Dissidia.  Fixes #11260.
2018-09-17 21:43:29 -07:00
AreaScout
95556e8d03 Add: some helpers to compile on ODROID-XU4/XU3 2018-09-17 20:01:12 +00:00
Unknown W. Brackets
44ba31fbc6 Vulkan: Implement verex range culling.
Also D3D11, since they are very similar.
2018-09-17 07:27:26 -07:00
Unknown W. Brackets
639a3f406d D3D9: Implement vertex range culling. 2018-09-17 07:27:26 -07:00
Unknown W. Brackets
ab3a466621 GLES: Implement vertex range culling.
Based on tests, skips triangles with any point outside the 4096x4096 box,
except when depth clamping would engage.
2018-09-17 07:27:26 -07:00
Unknown W. Brackets
797327eecd GPU: Handle bad fog params as large signed vals.
From tests, it seems they're just treated as valid exponents.

Using 65535 since that's the range of depth, can't think of a game using a
larger value for a fog parameter, probably never even this large.
2018-09-10 00:28:02 -07:00
Unknown W. Brackets
817b5d7c1c SoftGPU: Support fog on 3D rectangles. 2018-09-09 23:59:48 -07:00
Unknown W. Brackets
022670d882 GPU: Apply fog before color test.
Hardware tests confirm the fog result is what's color tested.
2018-09-09 23:59:48 -07:00
Unknown W. Brackets
8eb011c22d GPU: Clamp after color doubling.
This is needed for blending to be correct - it blends a clamped value.
2018-09-09 20:27:39 -07:00
Unknown W. Brackets
703181607e GPU: Apply color test after doubling. 2018-09-09 20:09:48 -07:00
Unknown W. Brackets
8cdead90f9 SoftGPU: Preserve stencil inside logic op func.
Cleaning things up to make it easier to translate.
2018-09-09 18:11:37 -07:00
Unknown W. Brackets
772ed30288 SoftGPU: Avoid extra lookup of old stencil. 2018-09-09 17:00:12 -07:00
Unknown W. Brackets
016d6ba764 D3D11: Fix pow(0, 0) lighting handling.
This was previously fixed in GLES.
2018-09-09 10:25:58 -07:00
Unknown W. Brackets
332788d0b5 GPU: Clean up some shader id flag usage. 2018-09-09 09:59:42 -07:00
Unknown W. Brackets
b05f75f667 D3D9: Set alpha mask reference in uniforms.
Just so we don't have surprises later if we implement masking.
2018-09-08 20:05:19 -07:00
Unknown W. Brackets
4dafb163a3 D3D11: Split color test out by component.
Not working correctly together.  See #10629.
2018-09-08 20:03:26 -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
2388be544f Debugger: Fix crash in softgpu with no texaddr yet. 2018-09-04 21:54:25 -07:00
Unknown W. Brackets
f65edc20a3 TexCache: Optimize DXT5 alpha lerp.
This makes the overall DXT5 decode about 8% faster.
2018-09-02 11:41:27 -07:00
Unknown W. Brackets
3f35221f3b TexCache: Avoid masking out alpha for DXT3/DXT5.
A little faster.  Also refactor colors a bit to be more readable.
2018-09-02 09:53:31 -07:00
Unknown W. Brackets
8ae2b1e6fb TexCache: Optimize DXT3/DXT5 decode to single pass.
This is significantly faster on Vulkan, and in other situations where
we're decoding directly to uncached memory.
2018-09-02 09:30:46 -07:00
Unknown W. Brackets
653129c528 Debugger: Add an event for GE dump recording. 2018-09-01 10:59:37 -07:00
Unknown W. Brackets
c10b2035b5 Debugger: Prevent record with no commands.
Should cut down on empty dumps, at least.
2018-09-01 09:51:04 -07:00
Unknown W. Brackets
f1afc51994 GE Debugger: Refactor out stepping callback.
In case we have multiple connected debuggers, we don't want just a
callback.  A counter works fine.
2018-09-01 09:41:20 -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
Henrik Rydgård
2f060a4c74
Merge pull request #11337 from unknownbrackets/kh-shadow
GPU: Clear alpha more consistently from 565
2018-09-01 09:48:29 +02: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
00daa00ae5 TexCache: Keep maxSeenV on clut variants in sync.
This ensures that we detect changes properly even when they are outside
the max V used with one CLUT.

Fixes #9355, enemy fade out in FF2.
2018-08-29 22:07:27 -07:00
Unknown W. Brackets
22a536fb0c
Merge pull request #11307 from hrydgard/discord-mac-linux
Enable Discord integration for Mac and Linux.
2018-08-26 23:04:49 -04:00
Unknown W. Brackets
274b1eaa0e GPU: Fix typo with wrong type.
No behavior change, just fixes a warning.
2018-08-26 11:51:06 -07:00
Henrik Rydgård
3c99d16da7
Merge pull request #11322 from unknownbrackets/texcache
GPU: Fix texture handling on framebuf detach
2018-08-25 21:12:45 +02:00
Henrik Rydgård
569c073497
Merge pull request #11319 from unknownbrackets/logicop
GPU: Apply logic op in more cases
2018-08-25 21:11:48 +02:00
Henrik Rydgård
2aaa013296
Merge pull request #11323 from unknownbrackets/fb-safesize
GPU: Download safe size on next create, too
2018-08-25 21:09:56 +02:00
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