Open Parovozik opened 7 years ago
1.0.639_March7.2017 (https://github.com/benvanik/xenia/commit/257fbfc40846a5301d91c7e512c1be10a19fc649) 1.0.826_Jule11.2017 (https://github.com/benvanik/xenia/commit/a3bc6b0c04aeccf39a6312fa3aa53c017e7903ed) LOG GiJoe_Vulkan_1.0.826_a3bc6b0c.txt .
I did some tests about this, f87e55d and c0ee30c didn't cause this issue. It turns out that what breaks games is caused by b34350e, there's probably something wrong with DemandResolveTexture. Reverting this commit makes background rendering again with the latest version. You can find the changelog in my xenia fork (also with some fixes for sth06, might work for other games as well).
Thanks. I will try it :)
Yes, this works is fine and given effect only on games which was with 'black space'. If compiled build as 'debug', then game on starting often say about error on file texture_cache.cc, at line 352, but still full works. If compiled build as 'release', then all ok. I used last 'xenia-master' + your 3 files (texture_cache.cc, texture_cache.h and vulkan_command_processor.cc). . Colors bug only there. All games which works earlier, still works correctly . How can add these fixes to the master build from here? https://github.com/benvanik/xenia.git (https://github.com/benvanik/xenia/commit/e11ba02e06f06559337a12971ad05eee0f846704)
Sonic Unleashed (Preview/Demo/Final) is also affected by this black screen bug.
Before: After:
And for those who want to try @AllanCat's fork, I compiled it with AppVeyor.
I did some tests on the current build, it seems there's problem with finding resolve texture's texture_info. (if (it->second->texture_info == texture_info) seems hitting wrong textures?)
By adjusting Demand and DemandResolveTexture's for loop, some textures are showing again(Sonic06's light shader, Catherine's background), but not for Sonic Unleashed and Fist of the North Star.
Here's the change i tried.
Also Is there any reason why we combined normal texture and resolve texture?
@AllanCat Thanks, i will try it :) I think for SonicU and Fist of the North Star other type of error - there problem with lighting a scene or objects
@Parovozik Thanks for testing :) With old build(separated texture cache) both of them are showing some textures ingame but covered with lighting error, with current build(even with my attempt↑) they shows nothing but ui.
Here's screenshots of FotN on old build
You can see it working by looking at right/bottom of screen, pause also showing correct background.
btw combined with my attempt, adjusting PrepareResolve's info.width/height in texture_info.cc can yield correct texture alignment in some games. (eliminated noise at right/bottom edge, random screen flicking and some effect artifacts)
Change from
info.width = width - 1;
info.height = height - 1;
to
info.width = (width > 2) ? width - 2 : width - 1;
info.height = (height > 2) ? height - 2 : height - 1;
Catherine before after
Sonic06 before after
motion blur is fixed too before after
Cool. I tried last master + fixes for [texture_cache.cc]. It works equally as previous fixes for [texture_cache.cc] [texture_cache.h][vulkan_command_processor.cc] and repair Black Screen, but look as more correct :) FotNS:
I believe I documented this somewhere - this is a known issue and easy to fix. When the game wants to read from a resolve texture, sometimes it uses a special format that converts the texture on the fly. I've actually already written a function in texture_info.h (GetBaseFormat) which can revert those special formats back to their base, but have not hooked it up yet.
Is there an exact place to do this trick? I tried hooked it on some spots and they didn't seem to work. Thanks!
Is this issue related to why character models don't render in many games? Sprites don't render in Guardian Heroes. Player models don't render in NHL 3 on 3 Arcade.
Pinpointed the issue. In RDR, they resolve to a k_2_10_10_10_FLOAT, and sample it as a k_2_10_10_10. Currently, we don't support aliasing, so a new (empty) texture is created.
@AllanCat Your last 'black screen fix' give improve for some games, example Fast Furious Showdown: Master: Master+BSF: Master: Master+BSF: Master: Master+BSF:
I'll see what I can do tomorrow, I need to get some sleep.
Still happens on master with Sonic Unleashed xenia.log
For some games 3D part unvisible (just black space, maybe color buffers or something else). Last working build 1.0.639 (https://github.com/benvanik/xenia/commit/257fbfc40846a5301d91c7e512c1be10a19fc649) After changes 1.0.640-1.0.641 (https://github.com/benvanik/xenia/commit/f87e55d0306a4e645bcc97bbd26dc9eea676cb05) (https://github.com/benvanik/xenia/commit/c0ee30c6b45691200b22409aa71745911d911f2a) and next (src/xenia/gpu/texture_info.cc) include last 1.0.778 this still not fixed. Additionaly this give memory leak (VRAM) for some games (RDR, MCLA for example)
Catherine
LOG Catherine1.0.778_LOG.txt .
Oblivion
LOG Oblivion1.0.778_LOG.txt .
MCLA
LOG MCLA639.txt LOG MCLA778.txt .
RDR
LOG RDR778.txt .