RPCS3 / rpcs3

PlayStation 3 emulator and debugger
https://rpcs3.net/
GNU General Public License v2.0
15.64k stars 1.92k forks source link

Vulkan: Hatsune Miku Project Diva F scaling issue (NV specific) #1655

Closed Nezarn closed 8 years ago

Nezarn commented 8 years ago

Vulkan: rpcs3_2016-04-02_21-41-32

OpenGL: rpcs3_2016-04-02_22-11-39

On DX12 and OGL it works fine. (also the other game i have vulkan works fine so i guess its not a driver\graphics card issue (i have a gtx 970))

Hatsune Miku Project Diva F 2nd demo has the same issue with vulkan.

Shaders and logs (vulkan + opengl) https://gist.github.com/Nezarn/9df63f3ee8c0a5f2ae6c18fa0a4bc15f

SakataGintokiYT commented 8 years ago

[Vulkan] - Try on 1920x1080

Nezarn commented 8 years ago

Its still bad, screen is still cut off rpcs3_2016-04-03_12-31-39

kd-11 commented 8 years ago

Might be a viewport or blitting region issue during flip. I'll take a look.

kd-11 commented 8 years ago

Seems to be Geforce specific. Plays fine on Radeon with res set to 1280x720. With AMD, the only scaling issue is that the image is not centered after correcting for aspect ratio. This is however not the same as the bug shown here. A developer on NV hardware will have to take a look.

dbz400 commented 8 years ago

@kd-11 how about in 720x480 ? basically vulkan has distortion on 720x480 for all my games using nvidia card (however 1280x720 works fine)

kd-11 commented 8 years ago

@raven02 720x480 isnt 16:9 hence the distortion. I'll try to set up centered scaling once I finish the fullscreen issue.

ghost commented 8 years ago

I have noticed that using DSR on an Nvidia Graphics card can help, but it's not exactly perfect either. From what I've seen, a higher screen resolution makes it so less of the image is scaled out, but when I use my 1600x900 screen resolution, the image looks almost like Nezarn's.

dbz400 commented 8 years ago

@kd-11 , hopefully this scaling issue on Vulkan for NV users can be fixed .

kd-11 commented 8 years ago

Unfortunately, I dont have access to NV+vulkan gpu. The driver seems to not like the texture format being scaled here though. The vulkan spec has something about this, but I'll have to check again since its been a while. If I'm right, i'll have to emulate hardware texture scaling for NV.

dbz400 commented 8 years ago

Vulkan on NV is trouble . I remember we also have difficulty to get Vulkan work on NV at the very beginning

kd-11 commented 8 years ago

@raven02 Can you check if using Nearest filtering fixes this bug? You can find the function copy_scaled_image in VkTexture.cpp and change VK_FILTER_LINEAR to VK_FILTER_NEAREST

ghost commented 8 years ago

Raven02, with the latest build, the scaling is still incorrect even when in fullscreen.

dbz400 commented 8 years ago

@kd-11 No luck .Just tested , still scale wrong .

vkCmdBlitImage(cmd, src, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, dst, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, &rgn, VK_FILTER_NEAREST);

dbz400 commented 8 years ago

Yes , full screen scaling is also incorrect as well

dbz400 commented 8 years ago

Issue resolved .Closed

kd-11 commented 8 years ago

Just to clarify for future reference, the bug was in the renderArea declaration of the render pass.