Henrik Rydgård
4c9b5ada0f
Address feedback
2021-07-09 21:09:44 +02:00
Henrik Rydgård
4e8ffae024
Implement basic depth texturing for OpenGL, requires depth clamp for now.
...
Need to figure out what to do about other Z mappings.
Helps #6411 for OpenGL on desktop primarily, and certain other games affected by #13256
are likely working too like the fog in Harry Potter.
2021-07-09 21:09:44 +02:00
Henrik Rydgård
df6abe83a3
Support depth clamping in OpenGL where available.
...
Should make support for depth texturing quite easy.
Unfortunately, this extension does not exist on OpenGL ES. There we'll
have to use ugly tricks with gl_FragDepth if we want this.
2021-07-09 21:09:44 +02:00
Henrik Rydgård
9a2e220e0d
Vulkan: Use the mandatory-support RGB565 format and not the opposite one.
...
Had apparently misread the spec.
Fixes validation (and probably rendering) errors on Linux/Intel.
https://www.khronos.org/registry/vulkan/specs/1.2/html/chap33.html#features-required-format-support
2021-07-07 19:07:29 +02:00
Unknown W. Brackets
87716a158f
Merge pull request #14391 from hrydgard/new-threadpool
...
New ThreadManager, replacing threadpools and "PrioritizedWorkQueue"
2021-06-13 07:08:32 -07:00
Henrik Rydgård
81f0c3a8e4
Address feedback (except the mailbox refcount)
2021-06-13 10:16:53 +02: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
Unknown W. Brackets
17071e7fec
Postshader: Add uniform for delta since last frame.
...
Useful mainly when using previous frame output.
2021-06-12 11:27:26 -07:00
Unknown W. Brackets
7bbaae492b
Postshader: Let shaders use the previous frame.
...
This is useful for i.e. simulating the slow update speed of the PSP's LCD
screen, but could in theory be used for other effects.
2021-06-12 10:54:36 -07:00
Henrik Rydgård
73871b9b7e
Implement new thread manager, port stuff to it.
2021-06-12 13:03:53 +02:00
Unknown W. Brackets
1f6860d6c1
GPU: Clamp DXT texture memory bound.
...
See #13109 . This should handle any texture read that starts near a VRAM
or RAM boundary without crashing.
2021-06-06 11:52:26 -07:00
Henrik Rydgård
0cd7af44f1
Fix ZipAssetReader file listing. Fixes post shaders on Android
2021-05-13 11:49:33 +02:00
Henrik Rydgård
a40b1dec5f
Use Path for fullName in dirlisting. Bugfixes.
...
Buildfixes
UWP: Buildfix.
headless: Buildfix.
Common: Buildfix.
iOS: Buildfixes.
libretro: Buildfix.
Qt: Buildfix.
2021-05-13 10:39:16 +02:00
Henrik Rydgård
025bcb1673
Introduce Path, start using it all over the place.
...
Still lots left to convert!
Convert GetSysDirectory to return Path.
More buildfixing
Remove unnecessary Path( constructors
2021-05-13 10:39:16 +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
Henrik Rydgård
08843673d9
Rename a couple of functions.
2021-04-25 20:39:32 +02:00
Henrik Rydgård
1b13badeb4
Move remaining FileUtil functions into the File namespace.
2021-04-25 20:38:22 +02:00
Unknown W. Brackets
086b8229f5
GE Debugger: Keep dump generation deterministic.
2021-04-17 16:25:36 -07:00
Unknown W. Brackets
abb7b83fee
GE Debugger: Thread dedupe pushbuf lookups.
...
This improves time especially for larger dumps.
2021-04-16 00:00:56 -07:00
Henrik Rydgård
a7d7631feb
Merge pull request #14369 from unknownbrackets/zstd
...
Use zstd for save states, GE frame dumps, and ZIMs
2021-04-12 08:35:58 +02:00
Unknown W. Brackets
a97030068c
GE Debugger: Use zstd for save states.
2021-04-11 09:13:10 -07:00
Unknown W. Brackets
d3e2aa6d28
Build: Add libzstd to build.
2021-04-11 09:13:10 -07:00
Henrik Rydgård
7e8a94e7de
Merge pull request #14366 from unknownbrackets/shader-errors
...
Fix some shader errors from reporting
2021-04-11 08:09:09 +02:00
Unknown W. Brackets
ca1a936d56
GPU: Stop using Off as terminator for postshaders.
...
There's really no need to have a dummy entry at the end of the array.
2021-04-10 18:35:23 -07:00
Unknown W. Brackets
3c09b5c010
GLES: Always use fragColor0 on GL 3.0+.
2021-04-10 16:26:39 -07:00
Unknown W. Brackets
c18236b5fa
GPU: Avoid switch on uint.
...
Vivante seems to get confused.
2021-04-10 14:01:33 -07:00
Unknown W. Brackets
a23c9e6a41
GPU: Preconvert light vecs to Vec3f.
...
This might align better for simd anyway, but should also prevent any
memory over-reads. See #14353 .
2021-04-05 20:55:52 -07:00
Unknown W. Brackets
e1e830c3b0
Debugger: Include src tag in Memory::Memcpy.
2021-04-03 18:14:59 -07:00
Unknown W. Brackets
8a9979b50e
Debugger: Include framebuffer in framebuf pack tag.
2021-04-03 18:11:44 -07:00
Unknown W. Brackets
ee749804fc
Debugger: Note GPU block transfer src as well.
2021-04-03 18:11:44 -07:00
Unknown W. Brackets
aa89ed5111
Debugger: Include source tag in memcpys.
2021-04-03 18:11:44 -07:00
Unknown W. Brackets
a42d3834f2
Build: Remove "fake" vertex decoder jit.
...
We don't really need this. Just replace it with a stub that always fails
to generate a vertex decoder.
2021-03-20 17:06:21 -07:00
Paul Cercueil
ce0af0743c
VertexDecoderFake: Fix build
...
Fix build of VertexDecoderFake.
Tested on MIPS.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
2021-03-17 21:48:12 +00:00
Henrik Rydgård
4e1bc2b3e0
Further std::string removal
2021-03-13 17:55:07 +01:00
Henrik Rydgård
42186e8e9e
Warning fix, memleak fix
2021-03-11 23:28:02 +01:00
Henrik Rydgård
98f593fd5d
Only do the workaround in #14273 in Vulkan. May help #14280
2021-03-11 09:14:36 +01:00
Henrik Rydgård
3ac405ab5d
GLSL vulkan: Specify the precision of function arguments. Works around #14269
2021-03-09 00:09:00 +01:00
Henrik Rydgård
409a2b5e28
Work around crash in texture replacement. See #14252
2021-03-08 00:55:17 +01:00
Henrik Rydgård
f8ad621df5
PipelineManagerVulkan: Log shader source when pipeline creation fails.
2021-03-08 00:12:38 +01:00
Henrik Rydgård
71707b5102
Fix bug in vertex shader generator. See #14260 .
2021-03-05 12:32:06 +01:00
Henrik Rydgård
57d4c4f406
Merge pull request #14250 from unknownbrackets/config-defines
...
Cleanup ppsspp_config.h usage
2021-03-03 08:58:00 +01:00
Unknown W. Brackets
d010f07529
GPU: Ignore replacements for framebufs.
...
Since these don't specify the texture hash/etc. info.
More importantly, prevents a crash.
2021-03-02 23:54:35 -08:00
Unknown W. Brackets
4178f09e57
Build: More consistently avoid _M_ defines.
...
We use PPSSPP_ARCH in several places already, this makes it more complete.
2021-03-02 21:49:21 -08:00
Unknown W. Brackets
d9aecffd72
Build: Remove old ARM define.
2021-03-02 21:26:03 -08:00
Unknown W. Brackets
e621aca9ba
Build: Remove MIPS define.
...
We shouldn't want to use that anyway, for conflicts...
2021-03-02 21:14:09 -08:00
Unknown W. Brackets
5119d79082
Build: Remove IOS define.
2021-03-02 21:04:03 -08:00
Unknown W. Brackets
13ec384dbe
Build: Explicitly include ppsspp_config.h.
...
This adds it to all files that use it. Not all our builds include the
file.
2021-03-02 21:04:03 -08:00
Henrik Rydgård
0facd4d4a6
Merge pull request #14230 from unknownbrackets/texreplace
...
Support texture replacement filtering overrides
2021-02-28 18:09:38 +01:00
Henrik Rydgård
08c917fe7b
Merge pull request #14233 from unknownbrackets/texoffset
...
GPU: Dirty texparams when cropping a self-copy
2021-02-28 18:09:02 +01:00
Unknown W. Brackets
7c7b1dafa0
GPU: Dirty texparams when cropping a self-copy.
...
If we used UV to limit the blit, we may need to do the blit again next
time, so re-examine texture params.
2021-02-28 08:20:46 -08:00
Unknown W. Brackets
64484a59e6
GPU: Normalize zero consistently in hw transform.
2021-02-28 00:05:10 -08:00
Unknown W. Brackets
2f63f9999d
GPU: Normalize 0 to 1 always in software lighting.
...
See #14167 . This seems to be consistent.
2021-02-27 23:51:45 -08:00
Unknown W. Brackets
82a7a26409
GPU: Look up replaced filtering options.
2021-02-27 17:17:21 -08:00
Unknown W. Brackets
fb3ad1df4b
Replacement: Read in texture filtering overrides.
...
If you're replacing, you can know more information about linear safety for
tests.
2021-02-27 17:16:16 -08:00
Unknown W. Brackets
579482320d
GPU: Revert stencil discard workaround change.
...
This reverts commit 0640ebb22d
.
Apparently caused more problems than it solved.
2021-02-23 19:39:01 -08:00
Unknown W. Brackets
0640ebb22d
GPU: Use stencil discard workaround w/o depth test.
2021-02-22 21:40:01 -08:00
Henrik Rydgård
2f3bc2d373
Merge pull request #14056 from unknownbrackets/debugger-mem
...
Track memory allocations and writes for debug info
2021-02-21 10:18:11 +01: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
Henrik Rydgård
bcbfee6403
Merge pull request #14185 from unknownbrackets/screenshot
...
GPU: Rotate screenshot framebuffer per display
2021-02-20 10:23:47 +01:00
Unknown W. Brackets
28a4057115
GPU: Rotate screenshot framebuffer per display.
2021-02-19 22:57:34 -08:00
Henrik Rydgård
aec37e8bb4
Only consider the actual PPGe texture in kernel ram reliable.
...
It seems some Chinese patches like to allocate kernel space for
textures.
(On that note, we should probably allocate our texture elsewhere... in
case it takes up too much space).
2021-02-19 09:53:55 +01:00
Unknown W. Brackets
277691746d
GPU: Correct more vertex/index endian swaps.
2021-02-18 22:28:41 -08:00
aliaspider
9a3e5879bb
Global: Correct many endian types and casts.
2021-02-18 22:25:24 -08:00
Unknown W. Brackets
229d684214
GPU: Prevent memory fault when no framebuf yet.
2021-02-16 19:29:37 -08:00
Unknown W. Brackets
e08e0cba33
GPU: Remove clear framebuf on first use speedhack.
...
Wasn't helping much.
2021-02-15 23:12:24 -08:00
Unknown W. Brackets
cc1b4e695d
Debugger: Correct crash with no alloc tag.
2021-02-15 15:01:23 -08:00
Unknown W. Brackets
a590671e8c
GPU: Cleanup comment.
2021-02-15 15:01:23 -08:00
Unknown W. Brackets
10a77d29ab
Debugger: Track texture usage too.
2021-02-15 15:01:23 -08:00
Unknown W. Brackets
76ae1b4d28
Debugger: Mark framebuffers as VRAM allocations.
2021-02-15 15:01:23 -08:00
Unknown W. Brackets
88e2b9b740
Debugger: Notate memset tags directly.
2021-02-15 15:01:23 -08:00
Unknown W. Brackets
f7740edc6d
Debugger: Add more metadata for memory usage.
2021-02-15 15:01:21 -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
Henrik Rydgård
e8ab06e66d
Merge pull request #14026 from hrydgard/vertex-minihash-align
...
Vertex cache minihash: Round up the starting address to a multiple of 4.
2021-02-15 15:26:47 +01:00
Kingcom
5109fd7cdc
CMake: Correct build on Windows.
2021-02-15 06:09:12 -08:00
Henrik Rydgård
6df37b86bc
Merge pull request #14076 from unknownbrackets/zhp-map
...
GPU: Force texture invalidation for ZHP minimap
2021-02-15 11:33:32 +01:00
Unknown W. Brackets
abfeacef61
GPU: Fix a type comparison warning.
2021-02-14 10:30:10 -08:00
Unknown W. Brackets
da2e722794
Windows: Fix some format warnings.
2021-02-14 10:30:10 -08:00
Unknown W. Brackets
6247e4d0ee
Windows: Add some missing override specifiers.
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
Henrik Rydgård
d23bef1525
Merge pull request #14129 from unknownbrackets/gpu-copyimage
...
GPU: Force reinterpret off without copy image
2021-02-13 07:38:52 +01:00
Unknown W. Brackets
5aa3e3180f
GPU: Force reinterpret off without copy image.
...
Also, assert we have it when using it, since there's ifs.
2021-02-12 20:40:21 -08:00
Henrik Rydgård
2864ff16c0
Some GLSL compilers are very particular about the sign of shift operands..
2021-02-12 15:06:44 +01:00
Henrik Rydgård
252160b5e2
GL: Call CreateDeviceObjects *after* updating render_.
...
Also remove a redundant call to fetch render_ in the constructor, it's
already passed in.
2021-02-09 09:53:03 +01:00
Unknown W. Brackets
ec3bfe08ae
GPU: Force texture invalidation for ZHP minimap.
...
See #14069 , our texture hash misses this change.
2021-02-07 09:02:28 -08:00
Unknown W. Brackets
c1fa4958d9
vertexjit: Only save extra regs on x64.
2021-02-01 07:06:18 -08:00
Unknown W. Brackets
30b6f1f865
Merge pull request #14043 from unknownbrackets/vertexjit-abi
...
vertexjit: Correct saved registers on x64
2021-01-31 15:38:00 -08:00
Unknown W. Brackets
cc4d0479bf
Core: Assert debug stats remain positive.
2021-01-31 15:06:11 -08:00
Unknown W. Brackets
ddff063097
vertexjit: Correct saved registers on x64.
2021-01-31 15:05:15 -08:00
Henrik Rydgård
294f530cd0
Have the flat shading workaround obey the driver workarounds checkbox
2021-01-31 15:50:19 +01:00
Henrik Rydgård
95a14be6f9
Merge pull request #14034 from unknownbrackets/ge-pause
...
Ge: Restore saved context when ending a list
2021-01-31 10:52:55 +01:00
Unknown W. Brackets
f2ad47512b
Ge: Restore saved context when ending a list.
...
Otherwise another list queued by a Head push could use the wrong context
data. See #13346 .
2021-01-31 00:28:42 -08:00
Unknown W. Brackets
5041a898a2
Ge: Improve some logging and memchecks.
...
Explicitly trigger memchecks on readback.
2021-01-31 00:22:49 -08:00
Henrik Rydgård
c48bdf7efc
Vulkan: Fix image layout issues after compute shader uploads.
...
We're already in GENERAL so probably not worth to transfer to DST just
to do even more transfers due to the silliness of GenerateMip.
I'm planning to rework the whole texture upload thing to be far more
optimal with some kind of TextureUploadManager
Fixes #13987
2021-01-30 23:09:42 +01:00
Henrik Rydgård
9a24bcdd9f
Vertex cache minihash: Round up the starting address to a multiple of 4.
2021-01-30 18:40:18 +01:00
Unknown W. Brackets
c630d365cd
Vulkan: Allow tex shaders to specify a max scale.
2021-01-28 01:03:02 -08:00
Henrik Rydgård
136c861d17
Merge pull request #13972 from unknownbrackets/clear-stencil
...
GPU: Respect stencil write mask for 5551 buffers
2021-01-25 09:38:16 +01:00
Unknown W. Brackets
0e25f6a83f
D3D9: Don't allow separate alpha clears.
...
Doesn't seem like the color mask applies to clears.
2021-01-24 16:07:13 -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
Henrik Rydgård
c91a3a3dd2
GE: Better naming of render passes for color reinterpret
2021-01-25 00:12:25 +01:00
Henrik Rydgård
960e2dac36
OpenGL fragment shader gen: Fix precision inconsistency for v_color0/1.
...
Probably won't fix anything, just want this in for, well, consistency.
Noticed it debugging the iOS flat shading issues, but doesn't fix that.
2021-01-24 18:29:55 +01:00
Henrik Rydgård
cf797d8da5
Merge pull request #13944 from unknownbrackets/vulkan-scaling
...
Vulkan: Prevent scaling shader leak
2021-01-18 22:55:17 +01:00
Unknown W. Brackets
97b68e6964
Vulkan: Prevent scaling shader leak.
...
No need to recreate if they haven't changed.
2021-01-18 13:31:43 -08:00
Unknown W. Brackets
60b354a661
GPU: Fix safe size checks when rect offscreen.
2021-01-17 19:57:32 -08:00
Henrik Rydgård
c8bbf40bb0
GL FB readback: Only use "inout" if we actually want to read from the fb.
2021-01-17 19:13:56 +01:00
Unknown W. Brackets
5e3579a780
SoftGPU: Fix sprite provoking vertex in fast path.
...
It was right everywhere else.
2021-01-16 20:13:16 -08:00
Henrik Rydgård
71f9196d61
VK: Re-apply the old Adreno driver bug workaround. Fixes #13910 .
...
Should likely fix issue #13923 too.
2021-01-16 12:57:14 +01:00
Henrik Rydgård
0386cafe53
Make sure we don't try to set a negative viewport size.
...
Should help #13921 .
2021-01-16 09:45:21 +01: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
f0bb504bb1
Postshader: Improve error reporting.
2021-01-03 19:15:05 +01:00
Henrik Rydgård
63424fb5be
Merge pull request #13862 from unknownbrackets/shader-minor
...
GPU: Ignore color write mask if unusable
2021-01-03 18:08:43 +01:00
Unknown W. Brackets
1834a524c8
GPU: Be careful with color write mask precision.
2021-01-03 08:50:34 -08:00
Unknown W. Brackets
4006a4b143
GPU: Ignore color write mask if unusable.
...
We unconditionally attempt to use a shader with color write mask, so we
can't just refuse to generate a shader - it'll mean non-supporting devices
get no shader at all.
It's better to continue ignoring the mask in that case.
2021-01-03 08:15:37 -08:00
Henrik Rydgård
678d881a1b
Merge pull request #13855 from unknownbrackets/headless
...
Remove "Null" GPU and enable softgpu without a backend
2021-01-02 20:41:55 +01:00
Unknown W. Brackets
e1050fe855
UWP: Don't try compiling samplerjit.
2021-01-02 09:54:35 -08:00
Unknown W. Brackets
3c9ab13672
GPU: Remove NULL GPU.
...
We can use the software GPU without a backend now, and this is in every
way superior and will result in better tests/headless behavior.
2021-01-02 09:36:13 -08:00
Unknown W. Brackets
ed65bc2327
SoftGPU: Allow rendering with no backend at all.
2021-01-02 09:25:41 -08:00
Unknown W. Brackets
66a6b27d78
UWP: Allow software renderer.
...
It can use the Direct3D 11 backend now for a while, so it should work on
UWP just fine.
2021-01-02 09:24:43 -08:00
Unknown W. Brackets
6a2b3f8f78
SoftGPU: Update PPGe draw context.
...
Oops, this was missing.
2021-01-02 09:23:25 -08:00
Unknown W. Brackets
4240fa3053
GPU: Correct some incorrect deallocations.
2021-01-01 15:43:13 -08: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
bdf36a4141
Temporary workaround for Wipeout Pure lens flare flicker.
...
See #13344 .
Will try to figure out something better after the next release...
2020-12-20 13:04:28 +01:00
Henrik Rydgård
e0aa187161
UWP: Fix dialog rendering (PPGe).
2020-12-20 12:11:02 +01:00
Henrik Rydgård
e05c3ef63f
UWP: Make the home button say "Home" instead of "Browse...".
2020-12-20 11:40:02 +01:00
Henrik Rydgård
a272deeba3
Postprocessing shader, GL: Fix shader version bug. Fixes #13779
2020-12-19 23:45:31 +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
05bfac0ef0
Misc logging improvements
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
7061993c8f
VK: Restore the ARM Mali Z hack that got lost in the refactor somehow.
...
Warning fixes.
2020-12-14 19:54:39 +01:00
Henrik Rydgård
32c9728c0c
Some cleanups in GL feature and shader language detection.
...
Gets rid of many wrong or bad checks for IsCoreContext.
2020-12-14 19:46:11 +01:00
Henrik Rydgård
3b54063955
Fix regression in Dream Club Portable. Fixes, for OpenGL, #6497
2020-12-13 18:27:37 +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
2f700aa495
Fix DiRT 2's car reflections.
2020-12-13 00:19:39 +01:00
iota97
0a44d9f600
Do not use x86 for other machine
2020-12-06 15:50:50 +01:00
Henrik Rydgård
06425dae8c
Remove superfluous variable from uniform buffer
2020-12-03 09:13:46 +01:00
Henrik Rydgård
c0a5fa3e8b
Fix a crash if JIT space failed to allocate
2020-12-02 00:33:51 +01:00
Unknown W. Brackets
b60250fca8
Respect stage in BindFramebufferAsColorTexture().
...
Introduced in #13634 , only matters in error cases.
2020-11-29 07:59:35 -08:00
Henrik Rydgård
f1ab6c62c8
Fix Ghosts & Goblins for older backends too.
...
Fixes #13717
2020-11-28 16:16:51 +01:00
Henrik Rydgård
9818c8aabd
Better debug names for BlitFramebuffer operations.
2020-11-28 13:45:26 +01:00
Henrik Rydgård
d5fe6154b5
Enable color reinterpret for Ultimate Ghosts & Goblins
...
The game uses it by accident probably, but whatever - it's a clean fix.
Fixes, but only for "modern" APIs, #13717 .
2020-11-27 23:52:33 +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
29b2f2c4ef
Better GLSL version handling. Now specify the latest version supported by the device.
...
Correct the version check for our own implementations of packUnorm4x8 etc.
2020-11-16 23:30:07 +01:00
Henrik Rydgård
d9350d4899
Fix scale in FramebufferCommon::GetFramebuffer. Fixes #13644
2020-11-15 22:38:47 +01:00
Henrik Rydgård
38684762c8
Fix Star Ocean stencil issue with OpenGL. Fixes #13746
2020-11-11 23:23:31 +01:00
Henrik Rydgård
e14437cb3f
OpenGL: Assorted shader-depal bugfixes and regression fixes.
...
Fixes #13517
2020-11-11 23:09:48 +01:00
Henrik Rydgård
653a4bddde
Fix check for when to generate packUnorm4x8 replacements
2020-11-11 22:46:25 +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
34efa1281b
More consistent use of GLSL precision modifiers, now use them in Vulkan too.
...
Might help #13464 ?
2020-11-10 22:42:41 +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
d99cba7308
Outrun on OpenGL: Fix weird purple highlight seen on some devices
...
mediump int is just not enough.
2020-11-10 22:01:57 +01:00
Henrik Rydgård
0510101f6c
Fix task switching issue with reinterpret. Fixes #13649
2020-11-10 13:24:52 +01:00
Henrik Rydgård
5eea7435d0
Minor cleanup in GL backend, fixes #13647
...
Was a stray old texture in boundTextures_ in thin3d. Now makes sure to
invalidate them, and also make it possible to look up bound framebuffer
textures when checking for valid tex parameters.
2020-11-10 00:13:44 +01:00
Henrik Rydgård
9f33a82b49
Merge pull request #13646 from hrydgard/framebuffer-fetch-fixes
...
Framebuffer fetch fixes
2020-11-09 19:30:35 +01:00
Henrik Rydgård
81024d9ec0
Merge pull request #13643 from hrydgard/move-shader-translations
...
Reorganize end of fragment shader, move shader translator to Common
2020-11-09 19:30:12 +01:00
Henrik Rydgård
85fd7c26f7
Merge branch 'master' into framebuffer-fetch-fixes
2020-11-09 18:14:42 +01:00
Henrik Rydgård
a31fc4087b
D3D11: Fix writing to SV_Depth. Fixes #13641
2020-11-09 16:05:28 +01:00
Henrik Rydgård
ba139975e0
Linker fix - need to move init_resources along.
2020-11-09 15:39:46 +01:00
Henrik Rydgård
2384b7a17d
Remove support for NV_shader_framebuffer_fetch extension, very old and rare.
...
Minor refactor.
2020-11-09 13:31:39 +01:00
Henrik Rydgård
e77a9d7368
Reorganize the end of the fragment shader generator.
...
Thanks unknown.
2020-11-09 11:19:02 +01:00
Henrik Rydgård
766dbc5a9f
Move ShaderTranslation.cpp/h to Common/GPU.
2020-11-09 11:18:43 +01:00
Henrik Rydgård
669c18a088
Fix crashes on exit (Vulkan). Should help #13223
2020-11-09 11:13:44 +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
2aa9ee97f4
Simplify shader blend logic in FragmentShaderGenerator.cpp
2020-11-08 12:54:05 +01:00
Henrik Rydgård
d81522af11
Address feedback.
2020-11-08 11:32:55 +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
4e16fcaf1a
Fix reinterpret shader for D3D11
2020-11-08 11:32:55 +01:00
Henrik Rydgård
28f8578408
Cleanup reinterpret shader resources in FramebufferManagerCommon::DeviceLost().
2020-11-08 11:32:55 +01:00
Henrik Rydgård
96c36d5c10
More work on reinterpret. Get Vulkan running
2020-11-08 11:32:55 +01:00
Henrik Rydgård
981d0a2abe
Reinterpret the data when binding a framebuffer with a different 16-bit format.
...
Car reflections in Outrun are better (see #11358 ) but have some
blue/yellow color garbage that will need a different fix.
2020-11-08 11:32:55 +01:00
Henrik Rydgård
1ccc8c129c
Reinterpret code runs, no idea if it works
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
19b4febbbf
More reinterpret shader gen and test work.
...
More work on reinterpret
Buildsystem fixes
2020-11-08 10:41:20 +01:00
Henrik Rydgård
614540aa6e
Merge pull request #13634 from hrydgard/device-lost-improvements
...
Device lost improvements, unify BindFramebufferAsColorTexture
2020-11-07 19:47:35 +01:00
Henrik Rydgård
106fc70a75
Forgot a line in caa960ee8e
2020-11-07 11:25:05 +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
e37468700d
Remove some accidentally added lines
2020-11-07 00:57:26 +01:00
Henrik Rydgård
caa960ee8e
GLSL ES compilers can be very picky about uint/int. Fixes #13628 - for real this time hopefully
2020-11-07 00:32:00 +01:00
Henrik Rydgård
381ca11561
Fix bugs caused by 44ec286ba4
2020-11-06 21:50:16 +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
3c5a05acb3
Buildfix
2020-11-05 18:25:14 +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
127cf41480
Fix bug in framebuffer naming
2020-11-05 08:51:29 +01:00
Henrik Rydgård
d39badc8c1
Inline "OptimizeDownloadRange" to make the code more readable
2020-11-05 08:50:16 +01:00
Henrik Rydgård
6db943e831
Merge the two ShaderStage enums
2020-11-05 08:34:35 +01:00
Henrik Rydgård
207b76da6e
Show an error on screen if a shader fails to compile.
...
Part of #1 investigation of #13541
2020-11-05 08:27:13 +01:00
Henrik Rydgård
03e8eac6ef
Merge the two ShaderLanguage enums.
2020-11-04 09:40:11 +01:00
Henrik Rydgård
733a152c54
Move ShaderWriter to Common/GPU, along with some stuff from ShaderCommon.h.
2020-11-04 09:18:35 +01:00
Henrik Rydgård
88e772cdf7
GLSL ES: Extensions must go first. Fixes #13620
2020-11-03 19:53:02 +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
Unknown W. Brackets
f3415f4f9c
GPU: Correct shader blend equations.
...
This was wrong when ported to HLSL, and then ported back everywhere.
2020-11-02 21:56:43 -08:00
Henrik Rydgård
21830d4984
Bugfix last commit
2020-11-02 16:22:20 +01:00
Henrik Rydgård
ce4ee010ac
Apparently only MSVC can handle the ambiguity.
2020-11-02 11:45:47 +01:00
Henrik Rydgård
97e8d5b93b
Buildfix the rest of the platforms
2020-11-02 10:37:11 +01:00
Henrik Rydgård
0292d1719d
GEDebugger: Use utf-8 internally.
2020-11-02 10:02:52 +01:00
Henrik Rydgård
39b5eb5b3d
ShaderWriter, a replacement for the sprintf WRITE macro.
2020-11-02 10:02:52 +01:00
Henrik Rydgård
291742535b
Safety, comments
2020-11-02 10:02:52 +01:00
Henrik Rydgård
32eb882bc6
Clarify some logic, improve framebuffer names
2020-11-02 10:02:49 +01:00
Henrik Rydgård
085900adb5
Fix vertex shader generator bug. Got caught by the new test
2020-11-02 09:03:08 +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
30b1aafcde
Another hlsl compatibility fix
2020-11-01 19:58:54 +01:00
Henrik Rydgård
17778131bd
Share the uniform buffer declarations between D3D11 and VK.
2020-11-01 19:58:53 +01:00
Henrik Rydgård
f1dbd25de9
Fix remaining differences between generated shaders
2020-11-01 19:58:53 +01:00
Henrik Rydgård
642f2004d3
Start working on getting tess to match
2020-11-01 19:58:53 +01:00
Henrik Rydgård
ba7c2e856b
Fix through mode differences
2020-11-01 19:58:50 +01:00
Henrik Rydgård
9b3662460c
Make the lighting code match
2020-11-01 19:58:50 +01:00
Henrik Rydgård
8efb40180e
Make the hardware skinning code match
2020-11-01 19:58:50 +01:00
Henrik Rydgård
b6992e428b
More HLSL work. Some vertex shaders are starting to pass.
2020-11-01 19:58:50 +01:00
Henrik Rydgård
fbb7f72eec
Vertex shader merge work
2020-11-01 19:58:45 +01:00
Henrik Rydgård
105a6ce920
Oops, seems I screwed those #version statements up worse.
2020-11-01 19:53:08 +01:00
Henrik Rydgård
4053c3d1ec
Fix #version statement for GLES 2.0 vertex shaders
2020-11-01 19:42:33 +01:00
Henrik Rydgård
2e9f42a75f
Fix #version statement in GLES 2 fragment shaders
2020-11-01 18:06:56 +01:00
Henrik Rydgård
0938d495d9
Remove a redundant bit from vertex shader IDs.
...
(complicates automated testing of shader generation)
Should have no noticeable effects.
2020-11-01 11:48:55 +01:00
Henrik Rydgård
fb785f5f0d
Fix an old inconsistency between D3D9 and D3D11 projection matrices.
2020-11-01 11:35:46 +01:00
Henrik Rydgård
d32fc34b2b
Remove inPrefix. HLSL shaders gets slightly longer but probably no biggie.
...
The extra variable should be optimized out anyway.
Tried doing it with the preprocessor, couldn't get it to work.
2020-10-31 23:22:06 +01:00
Henrik Rydgård
042f799573
Fix silly issue in vertex shader gen
2020-10-31 22:59:38 +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
2f1bbd314e
Fragment shader gen: Remove unnecessary allocations
2020-10-31 18:32:43 +01:00
Henrik Rydgård
7a63b5e69e
Cleanup
2020-10-31 18:32:43 +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
c311eeaf7d
Switch D3D9 too to the glsl shader generator
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
b7d674411e
Test parsing of generated OpenGL shaders too (by using glslang).
2020-10-31 18:32:43 +01:00
Henrik Rydgård
44c57d87f4
Get D3D9 fragment shader generation to parity
2020-10-31 18:32:43 +01:00
Henrik Rydgård
a2ed609e90
HLSL fix
2020-10-31 18:32:43 +01:00
Henrik Rydgård
c2a6090c3f
More D3D9 fixes.
2020-10-31 18:32:43 +01:00
Henrik Rydgård
af4d6e7642
Set up the test for D3D9, start fixing stuff.
2020-10-31 18:32:43 +01:00
Henrik Rydgård
b070ed45e9
Evolve the HLSL and GLSL fragment shader generators even closer together.
2020-10-31 18:32:42 +01:00
Henrik Rydgård
b4a76a9f09
Change fragment shader output to work the same in GLSL and HLSL.
2020-10-31 18:32:42 +01:00
Henrik Rydgård
d833b5985d
Make discard work the same way in the HLSL shader generator.
2020-10-31 18:32:42 +01:00
Henrik Rydgård
984a4d2641
Start adding HLSL support to the GLSL shader generator.
2020-10-31 18:32:42 +01:00
Henrik Rydgård
200c25bcc9
wip
2020-10-31 18:32:42 +01:00
Henrik Rydgård
92d73e3b03
HLSL: Use #define to switch to glsl-like vector types.
2020-10-31 18:32:42 +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
8b2aeade15
Fix checks for fragment test cache in GLES fragment shader generator
2020-10-28 23:51:22 +01:00
Henrik Rydgård
71706724e1
Somehow forgot to delete VertexShaderGeneratorVulkan.cpp
2020-10-26 09:59:16 +01:00
Henrik Rydgård
148d3b72e5
Use splat3(x) liberally (converts to vec3(x) on GLES, vec3(x,x,x) on D3D)
...
Prep for merging the HLSL and GLSL generators.
2020-10-25 08:34:35 +01:00
Henrik Rydgård
2977c56a12
Complete the vertex shader merge, deleting the Vulkan-specific vertex shader generator.
2020-10-25 08:34:35 +01:00
Henrik Rydgård
fb2ac3a67e
Additional fixes
2020-10-25 08:34:35 +01:00
Henrik Rydgård
69c8912b93
More tess fixes
2020-10-25 08:34:35 +01:00
Henrik Rydgård
6055350a2c
Initial work on fixing tess
2020-10-25 08:34:35 +01:00
Henrik Rydgård
7532116b69
Fix additional minor differences
2020-10-25 08:34:35 +01:00
Henrik Rydgård
a8f4a4d749
Fix more vertex shader differences
2020-10-25 08:34:35 +01:00
Henrik Rydgård
057fd9f8a3
Bridge more vertex shader differences
2020-10-25 08:34:35 +01:00
Henrik Rydgård
22b26ffc09
Time for the vertex shaders. Set up a test, start eliminating differences.
2020-10-25 08:34:35 +01:00
Henrik Rydgård
254c316b10
Merge pull request #13570 from hrydgard/gl-allow-wrap-framebuffers
...
GL: Allow texture wrapping on framebuffers
2020-10-23 22:41:10 +02:00
Henrik Rydgård
020fb55a65
Completes the merge, deleting the Vulkan-specific fragment shader generator.
2020-10-23 10:03:44 +02:00
Henrik Rydgård
56ddd597c1
Fix more tiny differences. The fragment shader generators now match!
2020-10-23 10:03:44 +02:00
Henrik Rydgård
fe8691fba7
Fix additional differences
2020-10-23 10:03:44 +02:00
Henrik Rydgård
aea4635d60
Fix minute differences between the shader generators found by the new tester
2020-10-23 10:03:44 +02:00
Henrik Rydgård
ef18938aa0
Hack up a test comparing Vulkan fragment haders generated by the GL GLSL generator to the ones generated by the Vulkan generator.
2020-10-23 10:03:44 +02:00
Henrik Rydgård
9e245d6835
OpenGL: Share the shader version detection.
...
Use a version integer instead of a string
2020-10-23 10:03:44 +02:00
Henrik Rydgård
c45515866b
Cleanup
...
Clean up GLSL language setup further
2020-10-23 10:03:44 +02:00
Henrik Rydgård
2917b0e9e6
GLES: Read compat params first, emit code later.
2020-10-23 10:03:44 +02:00
Henrik Rydgård
e30de2f6a5
More splat3
2020-10-23 10:03:44 +02:00
Henrik Rydgård
43ce4e7493
Remove an unmotivated ifdef. Additional cleanup
2020-10-22 00:10:21 +02:00
Henrik Rydgård
2c0a3c2e23
Prepare for more GLSL testing
2020-10-21 23:39:34 +02: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
712f56fb7d
Vulkan: remove array indexing for light parameters to match the other backends
2020-10-21 23:20:11 +02:00
Henrik Rydgård
391d2ea73d
Rename vk uniforms to match the other backends
2020-10-21 21:13:08 +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
6cc8c2ebc1
Merge pull request #13328 from hrydgard/libretro-fixes
...
Fix libretro with Vulkan
2020-10-14 22:08:11 +02:00
Henrik Rydgård
b8e8325888
Fix text issue in God Eater Burst. Forgot that games can allocate texture in volatile memory too.
...
We considered any texture from kernel memory "reliable", which is wrong
since games can allocate out of the upper half of kernel RAM, which is
called "volatile" memory.
Fixes issue #13511
2020-10-14 00:09:08 +02:00
aliaspider
1aff9b3e2b
Vulkan: fix stack overflow.
2020-10-13 06:05:30 +01:00
Henrik Rydgård
332bb7feeb
VK: Whenever safely possible, shrink the render area.
...
We just set the render area to the union of the scissor rects used in a pass.
Might help some games on some mobile hardware, a little bit.
Possibly #13464 ?
2020-10-11 23:23:25 +02:00
Henrik Rydgård
495fd9a13c
Fix OpenGL crash introduced in #13536
2020-10-11 22:34:37 +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
afb35c3be3
Fix GPU profile display on notched screens
2020-10-11 19:04:35 +02:00
Henrik Rydgård
5ece3de8ba
Track and accumulate pipeline flags for render passes.
...
(Information that will later let us make some interesting optimizations)
2020-10-11 12:22:25 +02:00
Henrik Rydgård
940611fe65
Remove the USE_GENERAL_LAYOUT_FOR* debug defines.
2020-10-11 11:06:54 +02:00
Henrik Rydgård
dc0f7ca8ee
VK: Copy depth buffer if we can't blit. Some GPUs can't blit to depth.
...
Fixes some recent issues with Intel GPUs on Vulkan.
2020-10-11 10:57:35 +02:00
Henrik Rydgård
b28baed7d3
Create a safer variant of BlockTransferAllowCreateFB, enable for FF Type 0
...
Performance improvement by avoiding unnecessary readbacks.
New one is called IntraVRAMBlockTransferAllowCreateFB.
This one only allows intra-VRAM block transfers to happen on-GPU, such as the one this
game uses for bloom. Good chances to avoid missing stuff that actually requires
real readback, if there's any.
2020-10-10 23:59:51 +02:00
shenweip
a66cb1237d
Warning fixes.
2020-10-10 19:18:46 +02:00
Henrik Rydgård
93e327ab78
Vulkan: Automatically generate mipmaps for replacement textures.
2020-10-05 22:36:55 +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
4310e35714
Windows: Remove the native project.
2020-10-05 06:56:10 +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
4f43cff5ca
Move fileutil, net, image loaders, ui to Common. ( #13506 )
...
* Move and rename file_util/fd_util to Common/File/FileUtil and DirListing
Let's also move net while we're at it.
Move the ZIM/PNG loaders over to Common.
Move the UI framework into Common
iOS buildfix
* Buildfix
* Buildfixes
* Apple buildfix
* This typo again..
* UWP buildfix
* Fix build of PPSSPPQt, such as it is (it's not in good condition...)
* Guess what? Another buildfix.
2020-10-04 20:48:47 +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
989e353482
Common.h shouldn't include Log.h.
...
Buildfixes
More buildfixes. Move JSON code to common.
2020-10-04 11:42:14 +02:00