Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android/Windows] Crash by Inavalid Memory Access [BLEACH SC (UCJS10085) & SC2 (UCJS10106)] #13346

Closed
nassau-tk opened this issue Aug 29, 2020 · 44 comments
Labels
GE emulation Backend-independent GPU issues
Milestone

Comments

@nassau-tk
Copy link
Contributor

nassau-tk commented Aug 29, 2020

What happens?

BLEACH SoulCarnival &BLEACH SoulCarnival 2 sometime crash at timing of loading.
Please see attached screenshot of inavalid memory access.

What should happen?

Don't crash!! Please!!

What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.

PPSSPP Ver. : 1.10.3-515
OS: Android 9.0
DeviceName: SONY SO-02K / Xperia XZ1 Compact (Japan)
CPU: Snapdragon835 (Octa-core)
GPU: Adreno 540
Resolution: 720×1280
RAM: 4GB
ROM:32GB
ExternalStrage: microSDXC 512GB

PPSSPP Ver.:1.10.3-515
OS:Windows10 (64-bit) Japanese
CPU:Ryzen7 3800X(8-core)
GPU:RADEON RADEON RX5700XT
Resolution:2560×1440
RAM:32GB

[BLEACH SoulCarnival]
BleachSC_InvalidMem

[BLEACH SoulCarnival2]
BleachSC2_InvalidMem

@nassau-tk nassau-tk changed the title [Android/Windows][Inavalid Memory Access] Crash [BLEACH SC (UCJS10085) & SC2 ()] [Android/Windows] Crash by Inavalid Memory Access [BLEACH SC (UCJS10085) & SC2 (UCJS10106)] Aug 29, 2020
@nassau-tk
Copy link
Contributor Author

@Panderner
I tried "Simulate UMD delay".
But,invalid memory error happend.
This games are my favorite.
So,I hope solve the issue as soon as possible by masters.

@hrydgard hrydgard added this to the v1.11.0 milestone Aug 29, 2020
@hrydgard
Copy link
Owner

If i started crashing recently, do you think you can go back and try to find approximatly which build it started crashing in?

@nassau-tk
Copy link
Contributor Author

@hrydgard

OK!
I try to find it!!

@nassau-tk
Copy link
Contributor Author

nassau-tk commented Aug 29, 2020

@hrydgard

I find it!! (May be)

v1.10.3-474-gd465ce512 will not happening the issue.
And, v1.10.3-477-g6d117fb53 is happening the issue.

I tried test 5 times on v1.10.3-474-gd465ce512.
It's not happening the error.
The test is..... clear a same stage.

v1 10 3-477_invalidmemoryaccess

@hrydgard
Copy link
Owner

That points to #13327, which is a bit unexpected. Thanks for testing!

@nassau-tk
Copy link
Contributor Author

Yes!!Master!!
Please, Beat the issue!!

@nassau-tk
Copy link
Contributor Author

I continus tested every new build by Soul Carnival1.
It is not solved yet.

But, I over looked Soul Carnival2.
And,I can't reproduce the issue on v1.10.3-1237.

I will looking for last point later.

@hrydgard
Copy link
Owner

Hm, note to self, just realized that "clear-detection" could (although far-fetched) have impact since in some cases we zero the cleared area in memory, and if we detect wrong or something, that could overwrite....

I'll try to look at this more soon.

@hrydgard hrydgard added the GE emulation Backend-independent GPU issues label Nov 23, 2020
@nassau-tk
Copy link
Contributor Author

I retested v1.10.3-515.
But, I can't reproduce the issue on SC2.
Why? I can't understand!

@hrydgard
Copy link
Owner

I don't understand either :)

@nassau-tk
Copy link
Contributor Author

The issue still happen v1.10.3-1375.
But,I can reproduce only BLEACH SC1.

@hrydgard
Copy link
Owner

hrydgard commented Jan 3, 2021

@nassau-tk If you try this: #13863

Does it still happen?

@nassau-tk
Copy link
Contributor Author

How can I try this on my phone?
Please, tell me.

@hrydgard
Copy link
Owner

hrydgard commented Jan 3, 2021

Right, okay, I'll just merge it so you get a build, can always revert. Merged.

@nassau-tk
Copy link
Contributor Author

v1.10.3-1471 is not solved.
Screenshot_20210104-050033_PPSSPP

@hrydgard
Copy link
Owner

hrydgard commented Jan 3, 2021

ok, i'll revert it then.

@sum2012
Copy link
Collaborator

sum2012 commented Jan 3, 2021

@nassau-tk Are you setting is default ?

@brujo5
Copy link

brujo5 commented Jan 4, 2021

Captura de pantalla (56)
Captura de pantalla (58)
Captura de pantalla (59)

You can play the game by switch to Interpreter before loading screen then switch back to Jit. or play all the whole game with interpreter CPU.

hang/freeze/crash in loading screen only happends with JIT or IR interpreter.

here log with interpreter (working)
ppsspplog.zip

here log with jit (not working)
ppsspplog.zip

@Panderner
Copy link
Contributor

Captura de pantalla (56)
Captura de pantalla (58)
Captura de pantalla (59)

You can play the game by switch to Interpreter before loading screen then switch back to Jit. or play all the whole game with interpreter CPU.

hang/freeze/crash in loading screen only happends with JIT or IR interpreter.

Oh it's a same problem for Tony Hawk's Underground 2 Remix and MTX Mototrax.

@sum2012
Copy link
Collaborator

sum2012 commented Jan 4, 2021 via email

@nassau-tk
Copy link
Contributor Author

@sum2012

Maybe, my setting is default.

@nassau-tk
Copy link
Contributor Author

Captura de pantalla(56)
Captura de pantalla(58)
Captura de pantalla(59)

画面をロードする前にインタープリターに切り替えてから、Jitに戻すことでゲームをプレイできます。または、ゲーム全体をインタープリターCPUでプレイします。

ロード画面でのハング/フリーズ/クラッシュは、JITまたはIRインタープリターでのみ発生します。

ここに通訳付きのログ(作業中)
ppsspplog.zip

ここでjitでログを記録します(機能していません)
ppsspplog.zip

Captura de pantalla (56)
Captura de pantalla (58)
Captura de pantalla (59)

You can play the game by switch to Interpreter before loading screen then switch back to Jit. or play all the whole game with interpreter CPU.

hang/freeze/crash in loading screen only happends with JIT or IR interpreter.

here log with interpreter (working)
ppsspplog.zip

here log with jit (not working)
ppsspplog.zip

Um...
I can't reproduce it.

"Way 1"

  1. Start PPSSPP.
  2. Set interpreter.
  3. Play the game.
  4. Invalid memory access happen.

"Way 2"

  1. Start PPSSPP.
  2. Start the game on interpreter.
  3. Load save data.
  4. Change to JIT.
  5. Play the game.
  6. Invalid memory access happen.

Is there some wrong way?

@nassau-tk
Copy link
Contributor Author

Screenshot_20210104-155439_PPSSPP

@hrydgard
Copy link
Owner

hrydgard commented Jan 4, 2021

Hm, maybe some of you have different settings for "Ignore bad memory accesses" system setting in PPSSPP? Or different versions of the games? Not sure..

@brujo5
Copy link

brujo5 commented Jan 4, 2021

Game version UCJS10085

i think you need to enable ignore bad memory acceses in system settings + interpreter cpu

tested with DX11,GL,DX9

Captura de pantalla (61)
Captura de pantalla (62)

if you uncheck that setting not work.

@nassau-tk
Copy link
Contributor Author

@brujo5

Yes, I could reproduce your way to avoidance.

@unknownbrackets
Copy link
Collaborator

See #13941 (comment) - DisableFirstFrameReadback doesn't make a difference. LSU might just be preventing fast memory from working and triggering the crash screen, I'm not sure.

-[Unknown]

@nassau-tk
Copy link
Contributor Author

Log of when long time wait after freeze.

https://gist.github.com/nassau-tk/f891d3288b1e196ae04eb3aad04af355

@hrydgard
Copy link
Owner

Given #13346 (comment) , maybe the game relied on something getting zeroed? I don't want to revert that for obvious reasons, but not really sure what to do for 1.11 other than introducing yet another compat.ini hack...

@unknownbrackets
Copy link
Collaborator

Well, it's either zeroing something it shouldn't or not zeroing something it should.

Did this work in OpenGL and Vulkan for 1.9.x (before #12952)? If it worked in Vulkan then, then it seems like we DON'T want some clear. If it didn't work in Vulkan then there's some clearing we want.

-[Unknown]

@nassau-tk
Copy link
Contributor Author

nassau-tk commented Jan 25, 2021

@unknownbrackets

I tested on v1.9.3-1077 (1.9.3 last build.).
It's worked on OpenGL & Vulkan both.

@iota97
Copy link
Contributor

iota97 commented Jan 27, 2021

Checking before and after changes in these lines:

  • clearingColor is false in both version
  • writingColor is false in the working one, get true and it crash after the PR (clearing a 480x272 area)

Basically gstate.getColorMask() != 0xFFFFFFFF crash while gstate.getColorMask() != 0 work fine.

Not sure how the color mask is meant to be used, if is "we write only to that part" I guess we write something as long as is not all 0 indeed, but could be the opposite anyway xD

@unknownbrackets
Copy link
Collaborator

Is this reproducible in any demo?

-[Unknown]

@nassau-tk
Copy link
Contributor Author

Sometime, If use special arts (Click L Button) then it error will happen.
See below Log & Screenshot..

https://gist.github.com/nassau-tk/620f583c54fd62750a08d30e8557b186

image

image

@nassau-tk
Copy link
Contributor Author

nassau-tk commented Jan 30, 2021

Is this reproducible in any demo?

-[Unknown]

I don't know it.
Because, I don't have DEMO version.

My test is checking in only 1st stage.
So, If you can play 1st stage then the issue will reproduce probably.

EDIT: SC2 is inclued in BLEACH HEAT the SOUL6 (UCJS10093).
But, I can't reproduce the issue in SC2 now.

@nassau-tk
Copy link
Contributor Author

nassau-tk commented Jan 31, 2021

Bleach SC1 & SC2 background size is not drawing correctly when enter the menu screen in game.

I can't judge the related of these issue.
So,For reference.

[ Real PSP Bleach SoulCarnival 2 ]==> blur processing ON & The HP gage of the upper left goes off, and "NowLoading" is drawn by the lower right.
Bleach_SC2_Menu_Blur_RealPSP

[PPSSPP Bleach SoulCarnival 2 ]==> blur processing OFF(Maybe) & The HP gage of the upper left is expanded while being indicated.
Bleach_SC2_Menu_Blur_PPSSPP

NOTICE: SC1 happen same work too when enter the menu.

EDIT: GEdump here.(SC1 & SC2 Timing of enter the menu.)
BLEACH_SC1_Background_too_much _LARGE_UCJS10085.zip
BLEACH_SC2_Background_too_much _LARGE_UCJS10106.zip

@unknownbrackets
Copy link
Collaborator

The dump shows a 128x128 version of the screen being textured at 0x041d2200, but it's stretched to the full screen.

My suspicion is that we're missing some CPU copy which is actually copying the full screen to 128x128 to blur it (not sure why this would go through the CPU though.)

I don't think that's related to the crash directly, but it could be the effect is related.

-[Unknown]

@unknownbrackets
Copy link
Collaborator

Basically gstate.getColorMask() != 0xFFFFFFFF crash while gstate.getColorMask() != 0 work fine.

Not sure how the color mask is meant to be used, if is "we write only to that part" I guess we write something as long as is not all 0 indeed, but could be the opposite anyway xD

This is a mask of bits NOT to write. So if it's 0, it means all bits will be written. If it's 0xFFFFFF, it means no writing of color (this might mean writing alpha or something else.) This mask is used whether clearing or not. If it's even 0xFFFFFE, at least one bit is being written.

The purpose of this check is: we may only be clearing the depthbuffer. In this case, it's unsafe to memset VRAM or copy to it, because the framebuffer might not even be set properly - it could just be a clear of depth.

-[Unknown]

@unknownbrackets
Copy link
Collaborator

Got some information from someone with the game - based on some back and forth debugging. The game doesn't use CPU copies for that effect, and apparently it crashes soon after you trigger that effect too.

Seems like it's when going into the menu (additionally to loading?), and when you trigger this it does a PAUSE signal. Right after the pause is a draw that textures wrong and stretches wrong, like it's drawing to the wrong target. I suspect the safe size of this draw is involved somehow...

-[Unknown]

@nassau-tk
Copy link
Contributor Author

@unknownbrackets

hm...Is it means that "Wrong size background has related with crash"? 😅

@unknownbrackets
Copy link
Collaborator

Yeah, I think you were right. During the PAUSE, it enqueues a new list which copies the screen to a temporary, but smaller (this part makes sense.) In the frame dump above, this temporary is simply stretched to the screen's normal framebuffer.

But instead right after the paused list unpauses, it textures to self, resulting in a stretched mess (which isn't updated, so you see it in the dump). It never reasserts the framebuffer when doing this self-texture either. I think this has to do with saving/restoring the list context...

-[Unknown]

@nassau-tk
Copy link
Contributor Author

Oh! I understood! It's good information for me!
I hope beat this issue and v1.11 come speedy. 😉

unknownbrackets added a commit to unknownbrackets/ppsspp that referenced this issue Jan 31, 2021
Otherwise another list queued by a Head push could use the wrong context
data.  See hrydgard#13346.
@hrydgard
Copy link
Owner

#14034 has been merged, which might fix this. Really nice job tracking that one down.

Please test!

@nassau-tk
Copy link
Contributor Author

qurious-pixel added a commit to qurious-pixel/ppsspp that referenced this issue Feb 9, 2021
* add assets to ubuntu build artifact

This enables us to run PPSSPPSDL in the ubuntu artifact zip as normal release. Can be uploaded to the automated ppsspp download pake. After downloading the artiact zip just chmod +x PPSSPPSDL and install libsdl2-dev libgl1-mesa-dev libglu1-mesa-dev. Then everything works fine :)

* Add more error checking in SD storage detection

See hrydgard#13827

* Add 3 games to ForceMax60FPS

* Add game ID for russian version of Tron Evolution

* Prevent access violation when running out of userMemory due to piling up AdhocMatching events.

* Send AdhocMatching Data from within HLE whenever possible instead of through matchingEvent Thread.

* Reducing AdhocMatching events delay to prevent matchingEvents from piling up on Lord of Arcana.

* Try another method for getting SD card storage paths (env vars).

See hrydgard#13827

* Add a fullscreen toggle button to the main screen (Windows-only for now)

* Manually tighten up the layout a bit in the top right corner

* Use the same logic of game setting for main menu full screen, add other system

* Add a file picker (WIP)

* Enable using the folder browser on Android to select SD card through a gross hack.

Should help hrydgard#13827

Not yet using storage framework properly, just stealing the URI.

* Improve some i18n things

- reuse some translations
- move some strings to a more suitable category

I will adapt the lang .ini files accordingly.

* jit: Fix conditional disable flags.

* irjit: Correct flags for SetCtrlVFPUReg.

Fixes hrydgard#13897.  Caused the reg to be optimized out.

* irjit: Fix mtv for INF4.

* Windows: Handle fullscreen message consistently.

This handles it the same way as SDL, etc. so that the new button on the
main screen works again.

* http: Prevent Windows header leak from HTTPClient.

* UI: Cleanup Windows header in MainScreen.cpp.

Better to have this come from System, probably.  It's mainly for Windows
anyway, to alert people their save data isn't permanent.

* FixPGF for Euro Characters.(Balance emphasis)

* 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 hrydgard#13903.

* Fix copy/paste typo causing crash getting tempdirs if an env var had no value

* Android: Fix headless and unittest build.

* Build: Validate unittest/headless on Android.

* Android: Add NEON/SSE funcs into Headless/UnitTest.

* irjit: Add disable flag for simplify passes.

* irjit: Update clobber flag on inst swap.

Fixes IR in Persona 3.

* PGF Re-Fixed Euro Characters

* Enable BlockTransferAllowCreateFB for Gradius Collection

* Update Template

* Make sure we don't try to set a negative viewport size.

Should help hrydgard#13921.

* VK: Re-apply the old Adreno driver bug workaround. Fixes hrydgard#13910.

Should likely fix issue hrydgard#13923 too.

* Fix Stuck issue on some games (Dissidia 012, Full Auto 2, etc) when Failed to connect to Adhoc Server (faked success)

* Module: Reverse a single HI16/LO16 pair correctly.

If there is only one imported variable as a HI16/LO16, unloading the
module wasn't properly reversing the link.  See hrydgard#13104.

* Module: Keep HI16/LO16 in a temp state object.

This doesn't need to live any longer than the link or unlink, so let's
just make that abundantly clear.

* Remove re-test each month

* Compat: Note that Gradius requires block transfer.

Of course, there are many more that do, but might as well add since we're
tracking it here.

* Headless: Allow connecting the web debugger.

* Module: Keep the state for each import.

On exports, we iterate modules then imports.
But on imports, we iterate the exports to find the module, so we need to
keep the state around higher up.

* SoftGPU: Fix sprite provoking vertex in fast path.

It was right everywhere else.

* Vulkan: Delete only created swapchain images.

We do other null checks here, same reason.  Create may have failed.

* There's little reason to build at O3, so let's just not. Changing to O2.

See hrydgard#13920 for a breakage report.

* CMake fixes and new --ios-xcode ./b.sh command.

Also enables stencil for the iOS backbuffer. Fixes the GPU test and will doubtlessly
fix problems with running non-buffered (which you shouldn't do anyway though).

Slim alternative to hrydgard#13766 with less risk to buildbots.

* Adds two new tests to GPU driver test screen: Adreno shader logic test and flat shading

The adreno test tests for the bug mentioned in hrydgard#13910.
Very clear repro on Adreno 630, Pocophone F1.

The flat shading test is an untested attempt at a repro of

(will test that tomomorrow).

* Add texture to flat shaded test.

* Compat: Note that 3 LEGO games those are require Buffered rendering

* More GPU test improvements

* Fix the flat test. Unfortunately doesn't repro the bug :(

* GL FB readback: Only use "inout" if we actually want to read from the fb.

* Headless: Allow screenshot compare without backend.

This makes not just graphics-enabled tests work in headless on softgpu,
but also screenshot comparison ones.

* Headless: Read expected file as a FileLoader.

This makes it possible to run tests from network locations.

* Headless: Allow PNGs and http:// for screenshot.

* Headless: Disable http disk cache.

* Headless: Simplify executing a ppdmp via headless.

* Headless: Default to PNG for ppdmp tests.

* GPU: Fix safe size checks when rect offscreen.

* Vulkan: Prevent scaling shader leak.

No need to recreate if they haven't changed.

* Compat: Enable reinterpret for Kingdom Hearts.

See hrydgard#11223.  Should enable it for everything at some point.

* Debugger: Add API to trigger buttons.

* Debugger: Broadcast ctrl input events.

This can be useful to trigger debugging functionality on button press.

* Debugger: Include all press states for convenience.

In case of a multi-button shortcut, which might be common for debugging.

* Kernel: Adjust sceKernelGetThreadExitStatus timing.

See hrydgard#13703.

* PGF Fixed Bold & Italic property and camouflage the Font name.

* Oops! I misstook uploading jpn0.pgf.

* Resample all mp3

Fix hrydgard#5213

* Fix Russian (Cyrillic alphabet) on jpn0.pgf.

* Some marks position fixed on jpn0.pgf

* build fix

* PPGe: Scale down by worst of window/internal res.

See hrydgard#13958.

* compat.ini: Add Split/Second to [ReinterpretFramebuffers]. See hrydgard#13957

* Plugins: Enable by default.

* Resample only in 32000Hz

* Fix Greek characters & Roman numbers & all balance on jpn0.pgf

* Do PtpConnect internally during PtpOpen, since some games (ie. The Warriors) seems to do PtpSend immediately after PtpOpen without trying to PtpConnect first.

* Fix returned error code on PtpSend and PtpRecv when socket is not connected yet.

* 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.

* Fix duplicate shader version in the flat shader test

Unbreaks the flat shading test on Adreno (ended up in trying to link a
 #version 300 and a #version 320 shader together which it didn't like)

* Io: Don't allow async close while async busy.

See hrydgard#6582.

* GE: Better naming of render passes for color reinterpret

* GPU: Respect stencil write mask for 5551 buffers.

If the mask is 0x7F on 5551, that's equivalent to allowing the clear
entirely.  See hrydgard#13391.

* D3D9: Don't allow separate alpha clears.

Doesn't seem like the color mask applies to clears.

* Reporting: Expose CRC queue methods for other uses.

This way UI can expose the CRC if needed.

* Don't allow ForcedFirstConnect hack when using PtpConnect within PtpOpen to prevent returning result from blocking PtpConnect instead of result of PtpOpen.

* sceMp3Init:Add layerBits and versionBits information

* Add header information

* GLES: Remove direct khrplatform.h header include.

Shouldn't be needed anymore, was a hack for Nokia.  See hrydgard#13978.

* Mp3: Correct error handling for newer sdk versions.

The 6.xx behavior might be important if a game relies on it to add data.

* Mp3: Allow decode without pcm pointer.

Just like other audio decoding, you're allowed to skip audio.
Also prevents a crash if the mp3 is not yet inited.

* Add back XCode TARGETED_DEVICE_FAMILY config line

xcode warns that the value is deprecated or something, but maybe it still does something. Appears iPad support is broken right now.

* Mp3: Always keep sample rate from original mp3.

Our codec context is updated with the source sample rate, so this makes us
not resample at all.

Converting to stereo still seems correct.

* Updated GameMode initial data sync, in case remote players aren't listening yet when sending initial data (fix Pocket Pool)

* Mp3: Correct logging for init.

* Remove duplicates from ThreadManForKernel

* Vulkan: Add MMPX upscaling texture shader.

See https://casual-effects.com/research/McGuire2021PixelArt/index.html

* Vulkan: Allow tex shaders to specify a max scale.

* Specify MaxScale=2 for the new MMPX texture scaling shader

* Fix Greek characters ltn0~7.pgf

* gitlab ci change requested by m4xw

* FindFFmpeg: Fix a few issues

1. postproc now looks for postprocess.h (there is no postproc.h header).
2. pkg-config fallback condition now works (find_path/library set the
   variable to ${var}-NOTFOUND but it was checking for an empty string).

* (.gitlab-ci.yml) Add windows-x64 target

* Mpeg:Only allow firmware >= 3 for warmup

Fix hrydgard#13996

* Try to build fix on non-windows

* CMake: Add USE_UBSAN

* CMake: Rename USE_ADDRESS_SANITIZER to USE_ASAN

For consistency with USE_UBSAN

* CMake: Fix UBSAN link error

* Fix Russian characters ltn8~15.pgf

* Fix alignment issues in ISOFileSystem

Fixes hrydgard#14002

* jit: Make branch shift more obvious.

And also not technically undefined behavior.

* Fix connection issue on Dynasty Warriors (Shin Sangoku Musou) games when playing with more than 2 players.

* Minimize the Adreno shader compiler bug repro test

* Fix left shift of negative value in MIPSCodeUtils

Fixes a benign UBSAN error to improve the signal-to-noise ratio of
UBSAN errors.

Fixes hrydgard#14015

* x64Emitter: Fix unaligned store UBSAN errors

This compiles to the same assembly as before even without optimizations and avoids UB.

https://godbolt.org/z/4G5edM

While the UB here is benign, this improves signal-to-noise ratio of UBSAN errors.

Fixes hrydgard#14005

* Fix logging flags

1. The logging flags were being ignored (-v, -d)
2. Adds a `--loglevel` argument. Useful when using the debug build for
   ASAN/UBSAN to hide extremely noisy debug messages.

* Attempt to fix hrydgard#14022

* Fix Apple gpu detection

* Core: Correct branch analysis truncation.

* jit: Be very clear on sign extension.

* Only force the log level if it set via an argv

Follow-up to hrydgard#14019

* Io: Consistently use LE values of ISO entries.

Better to be consistent across big endian and little endian, in case
something was mastered wrong.

* 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 hrydgard#13987

* Mpeg:Only allow firmware >= 6 for warmup

Fix blue screen in hrydgard#13146

* Ge: Improve some logging and memchecks.

Explicitly trigger memchecks on readback.

* Ge: Restore saved context when ending a list.

Otherwise another list queued by a Head push could use the wrong context
data.  See hrydgard#13346.

* Framedump test screen. Downloads a list of framedumps.

* Add a new command in developer tools to list and load framedumps from framedump.ppsspp.org/repro/

Useful to make it easy to test GPU driver bugs etc, without having to
use real games or copying files around.

* Add checkbox to enable/disable driver bug workarounds.

* Fix minor rendering glitch in PPSSPP's menus on iOS

* Have the flat shading workaround obey the driver workarounds checkbox

* Loaders: Prevent errors on 0 byte reads.

Was happening when opening an http:// GE frame dump.

* Core: Maintain frame dump disc ID in SFO.

This way we won't generate a fake one later and use it for anything else.

* vertexjit: Correct saved registers on x64.

* Core: Assert debug stats remain positive.

* vertexjit: Only save extra regs on x64.

* Updated PdpStat and PtpStat

* Update README.md for 1.11

* Address initial feedback by iota97

* List fixed games. Thanks sum2012

* More from unknown and sum2012

* More stuff in README.md

* (.gitlab-ci.yml) Add linux-i686 and windows-i686 targets (+ prevent creation of 'null' file when building Windows libretro cores)

* Fix possible lock issue during AdhocMatchingStart

* Updated PdpStat to prevent rcv_sb_cc from exceeding the buffer size arg (since we use larger buffer size to prevent micro stutters or disconnection issue due to too many dropped packets with small buffer size).
TODO: May need to improve it to be able to calculate the correct size if there are multiple datagram messages

* UI: Correct developer tools test run.

* Make a couple of UI animations refresh rate independent

* Core: Reset state properly on CPU init failure.

* Windows: Prevent crash on null symbol map.

Happened during a double error scenario, but might as well check.

* We don't really need to allocate a buffer when using MSG_TRUNC on recvfrom

* Minor renaming

* Moving hleDelayResult from internal function of SetSocketAlert to prevent waking up HLE-blocked thread

* Fix possible race condition issue.

* Fix jpn0.pgf characters position.

* Debugger: Populate funcs if disassembly open early.

* PPGe: Fallback to atlas text on alloc fail.

* PPGe: Clear text allocations on shutdown.

* Updated some Logs to help finding the location of the call to debug.

* Removing hleDelayResult from internal adhoc functions to prevent waking up thread that supposed to be blocked by the outer HLE.

* Run the link script

* Run the link script, fixups

* Update lang,pspautotests submodules

* Do the title screen animation by accumulator instead, to avoid a long first frame breaking it.

* Update version to 1.11

* PPGe: Decimate text images properly.

Co-authored-by: kaiomatico <[email protected]>
Co-authored-by: Henrik Rydgård <[email protected]>
Co-authored-by: Panderner <[email protected]>
Co-authored-by: ANR2ME <[email protected]>
Co-authored-by: iota97 <[email protected]>
Co-authored-by: vnctdj <[email protected]>
Co-authored-by: Unknown W. Brackets <[email protected]>
Co-authored-by: nassau-tk <[email protected]>
Co-authored-by: sum2012 <[email protected]>
Co-authored-by: AdamN <[email protected]>
Co-authored-by: Florin9doi <[email protected]>
Co-authored-by: Gleb Mazovetskiy <[email protected]>
Co-authored-by: jdgleaver <[email protected]>
Panderner added a commit to Panderner/ppsspp that referenced this issue Feb 14, 2021
* Adds two new tests to GPU driver test screen: Adreno shader logic test and flat shading

The adreno test tests for the bug mentioned in hrydgard#13910.
Very clear repro on Adreno 630, Pocophone F1.

The flat shading test is an untested attempt at a repro of

(will test that tomomorrow).

* Add texture to flat shaded test.

* Compat: Note that 3 LEGO games those are require Buffered rendering

* More GPU test improvements

* Fix the flat test. Unfortunately doesn't repro the bug :(

* GL FB readback: Only use "inout" if we actually want to read from the fb.

* Headless: Allow screenshot compare without backend.

This makes not just graphics-enabled tests work in headless on softgpu,
but also screenshot comparison ones.

* Headless: Read expected file as a FileLoader.

This makes it possible to run tests from network locations.

* Headless: Allow PNGs and http:// for screenshot.

* Headless: Disable http disk cache.

* Headless: Simplify executing a ppdmp via headless.

* Headless: Default to PNG for ppdmp tests.

* GPU: Fix safe size checks when rect offscreen.

* Vulkan: Prevent scaling shader leak.

No need to recreate if they haven't changed.

* Compat: Enable reinterpret for Kingdom Hearts.

See hrydgard#11223.  Should enable it for everything at some point.

* Debugger: Add API to trigger buttons.

* Debugger: Broadcast ctrl input events.

This can be useful to trigger debugging functionality on button press.

* Debugger: Include all press states for convenience.

In case of a multi-button shortcut, which might be common for debugging.

* Kernel: Adjust sceKernelGetThreadExitStatus timing.

See hrydgard#13703.

* PGF Fixed Bold & Italic property and camouflage the Font name.

* Oops! I misstook uploading jpn0.pgf.

* Resample all mp3

Fix hrydgard#5213

* Fix Russian (Cyrillic alphabet) on jpn0.pgf.

* Some marks position fixed on jpn0.pgf

* build fix

* PPGe: Scale down by worst of window/internal res.

See hrydgard#13958.

* compat.ini: Add Split/Second to [ReinterpretFramebuffers]. See hrydgard#13957

* Plugins: Enable by default.

* Resample only in 32000Hz

* Fix Greek characters & Roman numbers & all balance on jpn0.pgf

* Do PtpConnect internally during PtpOpen, since some games (ie. The Warriors) seems to do PtpSend immediately after PtpOpen without trying to PtpConnect first.

* Fix returned error code on PtpSend and PtpRecv when socket is not connected yet.

* 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.

* Fix duplicate shader version in the flat shader test

Unbreaks the flat shading test on Adreno (ended up in trying to link a
 #version 300 and a #version 320 shader together which it didn't like)

* Io: Don't allow async close while async busy.

See hrydgard#6582.

* GE: Better naming of render passes for color reinterpret

* GPU: Respect stencil write mask for 5551 buffers.

If the mask is 0x7F on 5551, that's equivalent to allowing the clear
entirely.  See hrydgard#13391.

* D3D9: Don't allow separate alpha clears.

Doesn't seem like the color mask applies to clears.

* Reporting: Expose CRC queue methods for other uses.

This way UI can expose the CRC if needed.

* Don't allow ForcedFirstConnect hack when using PtpConnect within PtpOpen to prevent returning result from blocking PtpConnect instead of result of PtpOpen.

* sceMp3Init:Add layerBits and versionBits information

* Add header information

* GLES: Remove direct khrplatform.h header include.

Shouldn't be needed anymore, was a hack for Nokia.  See hrydgard#13978.

* Mp3: Correct error handling for newer sdk versions.

The 6.xx behavior might be important if a game relies on it to add data.

* Mp3: Allow decode without pcm pointer.

Just like other audio decoding, you're allowed to skip audio.
Also prevents a crash if the mp3 is not yet inited.

* Add back XCode TARGETED_DEVICE_FAMILY config line

xcode warns that the value is deprecated or something, but maybe it still does something. Appears iPad support is broken right now.

* Mp3: Always keep sample rate from original mp3.

Our codec context is updated with the source sample rate, so this makes us
not resample at all.

Converting to stereo still seems correct.

* Updated GameMode initial data sync, in case remote players aren't listening yet when sending initial data (fix Pocket Pool)

* Mp3: Correct logging for init.

* Remove duplicates from ThreadManForKernel

* Vulkan: Add MMPX upscaling texture shader.

See https://casual-effects.com/research/McGuire2021PixelArt/index.html

* Vulkan: Allow tex shaders to specify a max scale.

* Specify MaxScale=2 for the new MMPX texture scaling shader

* Fix Greek characters ltn0~7.pgf

* gitlab ci change requested by m4xw

* FindFFmpeg: Fix a few issues

1. postproc now looks for postprocess.h (there is no postproc.h header).
2. pkg-config fallback condition now works (find_path/library set the
   variable to ${var}-NOTFOUND but it was checking for an empty string).

* (.gitlab-ci.yml) Add windows-x64 target

* Mpeg:Only allow firmware >= 3 for warmup

Fix hrydgard#13996

* Try to build fix on non-windows

* CMake: Add USE_UBSAN

* CMake: Rename USE_ADDRESS_SANITIZER to USE_ASAN

For consistency with USE_UBSAN

* CMake: Fix UBSAN link error

* Fix Russian characters ltn8~15.pgf

* Fix alignment issues in ISOFileSystem

Fixes hrydgard#14002

* jit: Make branch shift more obvious.

And also not technically undefined behavior.

* Fix connection issue on Dynasty Warriors (Shin Sangoku Musou) games when playing with more than 2 players.

* Minimize the Adreno shader compiler bug repro test

* Fix left shift of negative value in MIPSCodeUtils

Fixes a benign UBSAN error to improve the signal-to-noise ratio of
UBSAN errors.

Fixes hrydgard#14015

* x64Emitter: Fix unaligned store UBSAN errors

This compiles to the same assembly as before even without optimizations and avoids UB.

https://godbolt.org/z/4G5edM

While the UB here is benign, this improves signal-to-noise ratio of UBSAN errors.

Fixes hrydgard#14005

* Fix logging flags

1. The logging flags were being ignored (-v, -d)
2. Adds a `--loglevel` argument. Useful when using the debug build for
   ASAN/UBSAN to hide extremely noisy debug messages.

* Attempt to fix hrydgard#14022

* Fix Apple gpu detection

* Core: Correct branch analysis truncation.

* jit: Be very clear on sign extension.

* Only force the log level if it set via an argv

Follow-up to hrydgard#14019

* Io: Consistently use LE values of ISO entries.

Better to be consistent across big endian and little endian, in case
something was mastered wrong.

* 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 hrydgard#13987

* Mpeg:Only allow firmware >= 6 for warmup

Fix blue screen in hrydgard#13146

* Ge: Improve some logging and memchecks.

Explicitly trigger memchecks on readback.

* Ge: Restore saved context when ending a list.

Otherwise another list queued by a Head push could use the wrong context
data.  See hrydgard#13346.

* Framedump test screen. Downloads a list of framedumps.

* Add a new command in developer tools to list and load framedumps from framedump.ppsspp.org/repro/

Useful to make it easy to test GPU driver bugs etc, without having to
use real games or copying files around.

* Add checkbox to enable/disable driver bug workarounds.

* Fix minor rendering glitch in PPSSPP's menus on iOS

* Have the flat shading workaround obey the driver workarounds checkbox

* Loaders: Prevent errors on 0 byte reads.

Was happening when opening an http:// GE frame dump.

* Core: Maintain frame dump disc ID in SFO.

This way we won't generate a fake one later and use it for anything else.

* vertexjit: Correct saved registers on x64.

* Core: Assert debug stats remain positive.

* vertexjit: Only save extra regs on x64.

* Updated PdpStat and PtpStat

* Update README.md for 1.11

* Address initial feedback by iota97

* List fixed games. Thanks sum2012

* More from unknown and sum2012

* More stuff in README.md

* (.gitlab-ci.yml) Add linux-i686 and windows-i686 targets (+ prevent creation of 'null' file when building Windows libretro cores)

* Fix possible lock issue during AdhocMatchingStart

* Updated PdpStat to prevent rcv_sb_cc from exceeding the buffer size arg (since we use larger buffer size to prevent micro stutters or disconnection issue due to too many dropped packets with small buffer size).
TODO: May need to improve it to be able to calculate the correct size if there are multiple datagram messages

* UI: Correct developer tools test run.

* Make a couple of UI animations refresh rate independent

* Core: Reset state properly on CPU init failure.

* Windows: Prevent crash on null symbol map.

Happened during a double error scenario, but might as well check.

* We don't really need to allocate a buffer when using MSG_TRUNC on recvfrom

* Minor renaming

* Moving hleDelayResult from internal function of SetSocketAlert to prevent waking up HLE-blocked thread

* Fix possible race condition issue.

* Fix jpn0.pgf characters position.

* Debugger: Populate funcs if disassembly open early.

* PPGe: Fallback to atlas text on alloc fail.

* PPGe: Clear text allocations on shutdown.

* Updated some Logs to help finding the location of the call to debug.

* Removing hleDelayResult from internal adhoc functions to prevent waking up thread that supposed to be blocked by the outer HLE.

* Run the link script

* Run the link script, fixups

* Update lang,pspautotests submodules

* Do the title screen animation by accumulator instead, to avoid a long first frame breaking it.

* Update version to 1.11

* PPGe: Decimate text images properly.

* Add more games to ReportSmallMemStick

* Handle exec addr errors better - don't let IgnoreBadMemoryAccesses skip dispatcher exceptions.

It would then just fall through into the compiler and die.

Should remove one of the "mystery" crashes from hrydgard#14082.

* Cause the correct type of exception. Never ignore EXEC_ADDR exceptions.

* Buildfix

* GL: Call CreateDeviceObjects *after* updating render_.

Also remove a redundant call to fetch render_ in the constructor, it's
already passed in.

* Remove now-redundant check

* Only allow sceMpegGetAvcAu warmup for God Eater Series

Fix hrydgard#14086

* Rename the new warmup variable from hrydgard#14091

* SaveState: Prevent crash on bad cookie marker.

Just fail to load the save state.

* Update lang submodule (it_IT updates)

* Remove a completely unnecessary check in BackgroundAudio.cpp that caused glitching at 44.1khz.

Fixes hrydgard#14096

* Assorted paranoid cleanups, inspired by hrydgard#14082

* Fix frozen (0 FPS) issue on Kao Challengers and Asterix & Obelix XX (probably also fix other games from the same developer with similar issue) hrydgard#14103

* Windows recvfrom doesn't support MSG_TRUNC, so we're using dummy buffer with max size as alternative for peeking actual size of the next pending message.

* Update zh_CN and zh_TW

* Fix lobby issue on The Warriors, probably also fix similar issue on other games too.

* Update README.md for 1.11.1

* Slight simplification in LogoScreen

Not that I think those crashes actually are from this...

* Update version to 1.11.1

* Some GLSL compilers are very particular about the sign of shift operands..

* Revert (partially) "compat.ini: Add Split/Second to [ReinterpretFramebuffers]. See hrydgard#13957"

Also see hrydgard#14123 . Not sure I intended to actually do this.

This reverts commit d0c3a5a.

* GPU: Force reinterpret off without copy image.

Also, assert we have it when using it, since there's ifs.

* Add some checks trying to prevent creation of 0 sized textures.

Saw a crash log with a driver crash in CreateTexture...

* Update lang submodule

* Io: Truncate reads/writes to valid memory.

A PSP might crash in these cases, but it's better if we avoid a crash.

* Don't assert on invalid format in CwCheat.

Not sure exactly what we should do, though..

* Build: Allow on actions test branch.

* Build: Cache Qt during Actions run.

* Android: Ensure shutdown waits for render.

We apparently have a case where render is busy during shutdown, based on
crash reports.

Co-authored-by: Henrik Rydgård <[email protected]>
Co-authored-by: Unknown W. Brackets <[email protected]>
Co-authored-by: nassau-tk <[email protected]>
Co-authored-by: sum2012 <[email protected]>
Co-authored-by: ANR2ME <[email protected]>
Co-authored-by: AdamN <[email protected]>
Co-authored-by: Florin9doi <[email protected]>
Co-authored-by: Gleb Mazovetskiy <[email protected]>
Co-authored-by: jdgleaver <[email protected]>
Co-authored-by: Anuskuss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GE emulation Backend-independent GPU issues
Projects
None yet
Development

No branches or pull requests

7 participants