Rpcs3: DX12: Blade Arcus From Shining EX broken texture

Created on 24 Apr 2016  路  44Comments  路  Source: RPCS3/rpcs3

@tambry
@vlj
@kd-11
@Zangetsu38

[d9caad4d]


DX12 ;
{rsx::thread} class fmt::exception thrown: rsx::to_surface_depth_format(): Unknow surface depth format 0
(in file C:\rpcs3\rpcs3\Emu\RSX\GCM.cpp:991)


OGL ;
{rsx::thread} class fmt::exception thrown: rsx::to_surface_color_format(): unknow surface color format 0
(in file C:\rpcs3\rpcs3\Emu\RSX\GCM.cpp:1036)


Video : https://www.youtube.com/watch?v=_x5XBPHlexU&feature=youtu.be

Settings:
-PPU - Interpreter (Fast)
-SPU - Interpreter ASMJIT
-Vulkan
-1280x720
-Xaudio2
-Frame limit OFF

LLE:
-libsre (cellSre_Library v1.1
-libspurs_jq (cellSpursJq_Library v1.1)

Log : https://gist.github.com/SakataGintokiYT/f3294e54eabcf26d25ed2595e4765db3

{rsx::thread} RSX: Surface color buffer: Unsupported surface color format (0xc)


Fotoszok.pl
Fotoszok.pl
Fotoszok.pl
Fotoszok.pl
Fotoszok.pl

Bug Direct3D 12

Most helpful comment

I'll fix dx12 in a separate pull request to keep changes manageable. There are some other incoming fixes for opengl and vulkan after https://github.com/RPCS3/rpcs3/pull/1722 gets merged. I can look at dx12 after that.

All 44 comments

@SakataGintokiYT so only vulkan backend work but OGL and DX12 failed to start ?

@raven02
yes

Try to change as follow in GCM.cpp and compile to see if it works for DX12

rsx::surface_depth_format rsx::to_surface_depth_format(u8 in)
{
        switch (in)
        {
        case 0: // Unknown surface depth format 0
        case CELL_GCM_SURFACE_Z16: 
            return rsx::surface_depth_format::z16;
        case CELL_GCM_SURFACE_Z24S8: return rsx::surface_depth_format::z24s8;
        }
        throw EXCEPTION("Unknow surface depth format %x", in);
}

@raven02
Unknow surface depth format 0 -Probably Fix


*Now
DX 12 [ surface color format 0]

{rsx::thread} class fmt::exception thrown: rsx::to_surface_color_format(): unknow surface color format 0
(in file C:\rpcs3\rpcs3\Emu\RSX\GCM.cpp:1038)

The change seems like a hack. Very likely caused by a bug somewhere else, as noted by @MoochMcGee on #1711.

In headers there are only two such formats:

...
CELL_GCM_SURFACE_Z16 = (1),
CELL_GCM_SURFACE_Z24S8 = (2),
...

(from CellGcmEnum in /target/ppu/include/cell/gcm/gcm_enum.h)

Probably 0 means the default format . i remember @vlj did put a case 0 in depth format case

https://github.com/vlj/rpcs3/commit/740354d2c9bdcdfca3ed136e8cc1761bfb996b86

Could also be a bug in the game that was hidden by the ps3 libraries. If this is the case, 0 would return the default format, probably one of the normalized 8-bit channel ones (RGBA8 BGRA8 ARGB8) so VK_FORMAT_B8G8R8A8_UNORM might work. @SakataGintokiYT @raven02 You can just check if adding a zero case to the default catch-all block displays correctly.

The 0 values are because a clear command is given before buffers are set up properly. We never expect the game to not have parameters set up which causes issues on opengl renderer. Some simple fixes later and it works the same as vulkan with missing visuals. @SakataGintokiYT How do you get ingame? The display is just black

@kd-11
I skip black screen by pressing c and enter

I'm submitting a fix that should allow the emulator to ignore clear commands if the current surface is set to none. That allows the game to work on all renderers and DX12 looks better in the intros than GL and vulkan. I'll look into the other two later.

However i'm wondering why vulkan works in first place but not DX12 and OpenGL

With vulkan, there is a check for this. If we have not initialized any rendering, clearing does nothing since there is a check for a working present image, initialized to FFFF which is invalid. That is what caught the bogus clear request.

OGL and Vulkan should be ok now, except for the black textures. DX12 has better menus but no ingame graphics making it completely unplayable.

Its a blending issue for all backends actually. I'll submit a fix soon.

@kd-11 .It would be nice if you can help to take a look this as well https://github.com/RPCS3/rpcs3/issues/1699

which DX12 shows the title screen but not Vulkan and OpenGL backend

@raven02 Its the blending factors for this game that are messed up. Probably a bug affecting multiple games. Could also be a channel swizzling issue. Colors seems correct though.

It seems the game requests a surface format with discarded alpha and sets up the blending factors in the menus so that final alpha value becomes zero since it is assumed that alpha is always going to be read back as one. I've updated https://github.com/RPCS3/rpcs3/pull/1722 to respect alpha configuration requested (opengl only for now). @SakataGintokiYT Please test if there are any regressions caused by the pull request.

@kd-11

OGL :

Fotoszok.pl
Fotoszok.pl
Fotoszok.pl
Fotoszok.pl
Fotoszok.pl

I'll look into the viewport after i get dx12 and vk up to speed.

I have updated the PR to also fix vulkan issues. @SakataGintokiYT please check for any issues

Vulkan looks good on this game .
untitled
3

This is DX12

1
2
3

Vulkan

*Story mode
Fotoszok.pl
Fotoszok.pl
Fotoszok.pl
Fotoszok.pl
Fotoszok.pl

@SakataGintokiYT I've updated the pull request to fix the channel swap issues

I'll fix dx12 in a separate pull request to keep changes manageable. There are some other incoming fixes for opengl and vulkan after https://github.com/RPCS3/rpcs3/pull/1722 gets merged. I can look at dx12 after that.

@kd-11
Do you have Fix for DX12 ?

Not yet. Haven't had a look at it just yet.

Nice speed . I got only 10-13 fps in title using LLVM

Scoot Pilgrim VS The, World: The Game

[6c45b880]
Game ID [NPUB30162]

{rsx::thread} class fmt::exception thrown: rsx::to_surface_color_format(): unknow surface color format 0
(in file C:\rpcs3\rpcs3\Emu\RSX\GCM.cpp:1036)

{rsx::thread} class fmt::exception thrown: rsx::to_surface_depth_format(): Unknow surface depth format 0
(in file C:\rpcs3\rpcs3\Emu\RSX\GCM.cpp:991)

Log : https://gist.github.com/SakataGintokiYT/12e22bf62c0bf0a7b09f4d49181ae56a

Does it boot and in-game or just black screen?

Looks like a bogus command but i rememebr it should be caught in OGL and Vulkan backend .

it happen in DX12 only?

@raven02
The same issue on all backend / no booting

@raven02
This issue not appears but still no booting

Vulkan:
{rsx::thread} class fmt::exception thrown: vk::image::image(): Assertion failed! Result is C4650B07h
(in file c:\jacky\rpcs3-master\rpcs3\emu\rsx\vk\VKHelpers.h:369)

OpenGL :
{rsx::thread} class std::logic_error thrown: 0x8cd6

DX12 : Win32 error :
https://gist.github.com/SakataGintokiYT/e1ed3a4932317fa252b43f131767f349

I see. Then probably other issues that we don't know.

@raven02 @SakataGintokiYT This is another example of a game that tries to draw something or clear a framebuffer before properly initializing; e.g sending a clear command before setting up frame buffers or just starting to draw before setting up render targets properly. I could take a look but it'd take a few days for my schedule to clear up a bit.

{246b5937}

@raven02
@kd-11
State: Black screen / with some sound --{intro Rockstar} ^_^

GTA San Andreas / The same error
[DX12/OGL/]

{rsx::thread} class fmt::exception thrown: rsx::to_surface_color_format(): unknow surface color format 0
(in file C:\rpcs3\rpcs3\Emu\RSX\GCM.cpp:1036)

[Vulkan]

{rsx::thread} class fmt::exception thrown: rsx::to_surface_depth_format(): Unknow surface depth format 0
(in file C:\rpcs3\rpcs3\Emu\RSX\GCM.cpp:991)

{rsx::thread} class fmt::exception thrown: rsx::to_surface_color_format(): unknow surface color format 0
(in file C:\rpcs3\rpcs3\Emu\RSX\GCM.cpp:1036)

*Log : https://gist.github.com/SakataGintokiYT/8be4e75ad98159be112489e9fb803a7a

@SakataGintokiYT , please test it using DX12 with https://github.com/RPCS3/rpcs3/pull/1898

@raven02
No change and still broken graphic

@SakataGintokiYT I mean did you still encounter the surface depth format 0 ?

@raven02
In Blade Arcus From Shining EX [ This error not appear ]

GTA San Andreas

{rsx::thread} class fmt::exception thrown: rsx::to_surface_depth_format(): Unknow surface depth format 0
(in file C:\rpcs3\rpcs3\Emu\RSX\GCM.cpp:991)

Scoot Pilgrim VS The, World: The Game

{rsx::thread} class fmt::exception thrown: rsx::to_surface_depth_format(): Unknow surface depth format 0
(in file C:\rpcs3\rpcs3\Emu\RSX\GCM.cpp:991)

@raven02

{rsx::thread} class std::runtime_error thrown: OpenGL error: invalid value. file 'C:\rpcs3\rpcs3\Emu\RSX\GL\GLGSRender.cpp' function 'GLGSRender::begin' line 279

Sometimes the game starts up ;(

[OpenGL] XD ^_^
Master + vlj rsx-refactor-wip

Fotoszok.pl


[ DX12]
Master + vlj rsx-refactor-wip

GTA San Andreas working on Vlj rsx-refactor-wip [Fix depth format 0]

Working Rockstar intro :
Fotoszok.pl

{rsx::thread} RSX: FS build failed:E:\EMU\PS3[ RPCS3 ]\FragmentProgram.hlsl(134,7-40): error X3037: constructors only defined for numeric base types

{rsx::thread} class fmt::exception thrown: D3D12Traits::build_pipeline(): fragment program compilation failure
(in file c:\rpcs3\rpcs3\emu\rsx\d3d12\D3D12PipelineState.h:162)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Luffykun007 picture Luffykun007  路  3Comments

XeClutch picture XeClutch  路  3Comments

xiangzhai picture xiangzhai  路  3Comments

iBlackS0ul picture iBlackS0ul  路  3Comments

uaqlover picture uaqlover  路  3Comments