Xenia: Black screen space of 3D part

Created on 30 Jun 2017  Â·  21Comments  Â·  Source: xenia-project/xenia

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
.
bandicam1
bandicam2

Oblivion

LOG Oblivion1.0.778_LOG.txt
.
bandicam3
bandicam4

MCLA

LOG MCLA639.txt
LOG MCLA778.txt
.
bandicam7
bandicam8

RDR

LOG RDR778.txt
.
bandicam5
bandicam6

bug gpu-vulkan

All 21 comments

Way of the Samurai 3

LOG WaySamurai3_VK_77043ead_1.0.787.txt
.
bandicam 2017-07-07 05-45-01-616
bandicam 2017-07-07 05-43-30-791

Mortal Kombat vs DCU

LOG MKDCU_VK_77043ead_1.0.787.txt
.
bandicam 2017-07-07 05-38-55-478
bandicam 2017-07-07 05-37-12-401

Kengo ZERO: Legend of the 9

LOG: KengoZERO_VK_77043ead_1.0.787.txt
.
bandicam 2017-07-07 20-02-49-026
bandicam 2017-07-07 20-01-15-860
bandicam 2017-07-07 20-03-03-245
bandicam 2017-07-07 20-01-40-228

G.I.Joe

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
.
bandicam 2017-07-14 02-54-52-415
bandicam 2017-07-14 02-56-44-730
bandicam 2017-07-14 02-55-27-289
bandicam 2017-07-14 02-57-20-657

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).
bandicam 2017-07-15 00-43-10-162
bandicam 2017-07-15 00-45-36-547
bandicam 2017-07-15 00-48-04-064
bandicam 2017-07-15 00-49-10-284
bandicam 2017-07-15 00-55-47-510
.
Colors bug only there. All games which works earlier, still works correctly
bandicam 2017-07-15 00-57-57-596
bandicam 2017-07-15 00-59-03-569
.
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:
2017-07-14_16-03-48
After:
2017-07-14_22-18-46

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
fist3
fist2

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;

Comparison

Catherine
before
kat2
after
cat1

Sonic06
before
kdv2
after
kdv1

motion blur is fixed too
before
offb
after
noaa4

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:
desktop 07 27 2017 - 06 04 47 01 mp4_snapshot_01 59_ 2017 07 27_06 11 21

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:
bandicam 2017-08-11 01-14-36-292
Master+BSF:
bandicam 2017-08-11 01-13-27-590
Master:
bandicam 2017-08-11 01-09-26-435
Master+BSF:
bandicam 2017-08-11 01-11-16-998
Master:
bandicam 2017-08-11 01-15-02-542
Master+BSF:
bandicam 2017-08-11 01-16-18-978

@shadowbrony33 can you make a build of this with the amd fix please

I'll see what I can do tomorrow, I need to get some sleep.

Have a good rest and good luck

Sent from my iPhone

On Aug 14, 2017, at 12:05 AM, 0x7FFFFFFF notifications@github.com wrote:

I'll see what I can do tomorrow, I need to get some sleep.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Still happens on master with Sonic Unleashed
2018-02-24_15-25-15
xenia.log

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kobyaustin1 picture kobyaustin1  Â·  4Comments

emoose picture emoose  Â·  3Comments

thx4ever picture thx4ever  Â·  3Comments

arcadee1977 picture arcadee1977  Â·  3Comments

SakataGintokiYT picture SakataGintokiYT  Â·  3Comments