xenia-project / xenia

Xbox 360 Emulator Research Project
https://xenia.jp
Other
8.27k stars 1.14k forks source link

Improper Vulkan implementation of D3DDevice->Clear #1325

Closed niko1point0 closed 5 years ago

niko1point0 commented 5 years ago

I compiled a triangle program with the Xbox 360 SDK

removed

This line of code is supposed to turn the background into a blue color. It works on the Xbox 360 Console, it works on the D3D12 build of Xenia, but it does not work on the Vulkan build of Xenia Xbox360_Test1.zip

I uploaded the XEX file so that anyone can test it

Triang3l commented 5 years ago

I think Clear internally clears most of the region by drawing a depth-only rectangle with MSAA, with 3 components of the color being reinterpreted as depth, and 1 being reinterpreted as stencil. The old renderer that uses Vulkan hardly does any attempt to emulate EDRAM, and it totally does not support reinterpreting same EDRAM contents in different formats. That's the main difference of the new D3D12 renderer versus the old one.

gibbed commented 5 years ago

Utilizing the XDK for research is not acceptable.

niko1point0 commented 5 years ago

I'm sorry, I did not know that XDK was against the rules. @gibbed could you tell me why it is not allowed? Microsoft released it publicly for free

Triang3l commented 5 years ago

@niko1point0 Microsoft never released it publicly, it was leaked a few times. The reasons are explained in .github/CONTRIBUTING.md.

gibbed commented 5 years ago

If you can provide evidence that Microsoft has provided the Xbox 360 SDK publicly and freely available then please do so. But until we know otherwise, it's verboten as Triang3l has mentioned.

niko1point0 commented 5 years ago

Thank you @Triang3l @gibbed, I understand now

gibbed commented 5 years ago

Certainly! I don't know if this particular one is for the original Xbox or Xbox 360 however.

niko1point0 commented 5 years ago

I figured it out, OpenXDK is for Xbox Original. My bad

gibbed commented 5 years ago

The point stands however, if you're able to replicate this issue in a sample compiled with an open source SDK for Xbox 360, then it's acceptable.

niko1point0 commented 5 years ago

Thank you @gibbed