mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 16:45:29 +03:00
Force Textures to be Optimal on Host GPU
We don't respect the host subresource layout in synchronizing linear textures from the guest to the host when mapped to memory directly, this leads to texture corruption and while the real fix would involve respecting the host subresource layout, this has been deferred for later as real world performance advantages/disadvantages associated with this change can be observed more carefully to determine if it's worth it.
This commit is contained in:
parent
ab4962c4e4
commit
9f5c3d8ecd
@ -254,7 +254,7 @@ namespace skyline::gpu {
|
|||||||
dimensions(guest->dimensions),
|
dimensions(guest->dimensions),
|
||||||
format(guest->format),
|
format(guest->format),
|
||||||
layout(vk::ImageLayout::eUndefined),
|
layout(vk::ImageLayout::eUndefined),
|
||||||
tiling((guest->tileConfig.mode == texture::TileMode::Block) ? vk::ImageTiling::eOptimal : vk::ImageTiling::eLinear),
|
tiling(vk::ImageTiling::eOptimal), // Force Optimal due to not adhering to host subresource layout during Linear synchronization
|
||||||
mipLevels(1),
|
mipLevels(1),
|
||||||
layerCount(guest->layerCount),
|
layerCount(guest->layerCount),
|
||||||
sampleCount(vk::SampleCountFlagBits::e1) {
|
sampleCount(vk::SampleCountFlagBits::e1) {
|
||||||
@ -287,7 +287,7 @@ namespace skyline::gpu {
|
|||||||
dimensions(dimensions),
|
dimensions(dimensions),
|
||||||
format(format),
|
format(format),
|
||||||
layout(initialLayout == vk::ImageLayout::ePreinitialized ? vk::ImageLayout::ePreinitialized : vk::ImageLayout::eUndefined),
|
layout(initialLayout == vk::ImageLayout::ePreinitialized ? vk::ImageLayout::ePreinitialized : vk::ImageLayout::eUndefined),
|
||||||
tiling(tiling),
|
tiling(vk::ImageTiling::eOptimal), // Same as above
|
||||||
mipLevels(mipLevels),
|
mipLevels(mipLevels),
|
||||||
layerCount(layerCount),
|
layerCount(layerCount),
|
||||||
sampleCount(sampleCount) {
|
sampleCount(sampleCount) {
|
||||||
|
Loading…
Reference in New Issue
Block a user