mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-05 11:45:10 +01:00
Reset RT mappings on dimension and format changes
This commit is contained in:
parent
8180bf852e
commit
6cc925c2d3
@ -152,6 +152,7 @@ namespace skyline::gpu::interconnect {
|
|||||||
value /= renderTarget.guest.format->bpb; // Width is in bytes rather than format units for linear textures
|
value /= renderTarget.guest.format->bpb; // Width is in bytes rather than format units for linear textures
|
||||||
renderTarget.guest.dimensions.width = value;
|
renderTarget.guest.dimensions.width = value;
|
||||||
renderTarget.view.reset();
|
renderTarget.view.reset();
|
||||||
|
renderTarget.guest.mappings.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetColorRenderTargetWidth(size_t index, u32 value) {
|
void SetColorRenderTargetWidth(size_t index, u32 value) {
|
||||||
@ -165,6 +166,7 @@ namespace skyline::gpu::interconnect {
|
|||||||
void SetRenderTargetHeight(RenderTarget &renderTarget, u32 value) {
|
void SetRenderTargetHeight(RenderTarget &renderTarget, u32 value) {
|
||||||
renderTarget.guest.dimensions.height = value;
|
renderTarget.guest.dimensions.height = value;
|
||||||
renderTarget.view.reset();
|
renderTarget.view.reset();
|
||||||
|
renderTarget.guest.mappings.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetColorRenderTargetHeight(size_t index, u32 value) {
|
void SetColorRenderTargetHeight(size_t index, u32 value) {
|
||||||
@ -268,6 +270,7 @@ namespace skyline::gpu::interconnect {
|
|||||||
|
|
||||||
renderTarget.disabled = !renderTarget.guest.format;
|
renderTarget.disabled = !renderTarget.guest.format;
|
||||||
renderTarget.view.reset();
|
renderTarget.view.reset();
|
||||||
|
renderTarget.guest.mappings.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetDepthRenderTargetFormat(maxwell3d::DepthRtFormat format) {
|
void SetDepthRenderTargetFormat(maxwell3d::DepthRtFormat format) {
|
||||||
@ -296,6 +299,7 @@ namespace skyline::gpu::interconnect {
|
|||||||
depthRenderTarget.guest.dimensions.width = depthRenderTarget.widthBytes / depthRenderTarget.guest.format->bpb;
|
depthRenderTarget.guest.dimensions.width = depthRenderTarget.widthBytes / depthRenderTarget.guest.format->bpb;
|
||||||
|
|
||||||
depthRenderTarget.view.reset();
|
depthRenderTarget.view.reset();
|
||||||
|
depthRenderTarget.guest.mappings.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetRenderTargetTileMode(RenderTarget &renderTarget, maxwell3d::RenderTargetTileMode mode) {
|
void SetRenderTargetTileMode(RenderTarget &renderTarget, maxwell3d::RenderTargetTileMode mode) {
|
||||||
@ -325,6 +329,7 @@ namespace skyline::gpu::interconnect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderTarget.view.reset();
|
renderTarget.view.reset();
|
||||||
|
renderTarget.guest.mappings.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetColorRenderTargetTileMode(size_t index, maxwell3d::RenderTargetTileMode mode) {
|
void SetColorRenderTargetTileMode(size_t index, maxwell3d::RenderTargetTileMode mode) {
|
||||||
@ -341,6 +346,7 @@ namespace skyline::gpu::interconnect {
|
|||||||
else
|
else
|
||||||
renderTarget.guest.layerCount = mode.depthOrlayerCount;
|
renderTarget.guest.layerCount = mode.depthOrlayerCount;
|
||||||
renderTarget.view.reset();
|
renderTarget.view.reset();
|
||||||
|
renderTarget.guest.mappings.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetColorRenderTargetArrayMode(size_t index, maxwell3d::RenderTargetArrayMode mode) {
|
void SetColorRenderTargetArrayMode(size_t index, maxwell3d::RenderTargetArrayMode mode) {
|
||||||
@ -357,6 +363,7 @@ namespace skyline::gpu::interconnect {
|
|||||||
void SetRenderTargetLayerStride(RenderTarget &renderTarget, u32 layerStrideLsr2) {
|
void SetRenderTargetLayerStride(RenderTarget &renderTarget, u32 layerStrideLsr2) {
|
||||||
renderTarget.layerStride = layerStrideLsr2 << 2;
|
renderTarget.layerStride = layerStrideLsr2 << 2;
|
||||||
renderTarget.view.reset();
|
renderTarget.view.reset();
|
||||||
|
renderTarget.guest.mappings.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetColorRenderTargetLayerStride(size_t index, u32 layerStrideLsr2) {
|
void SetColorRenderTargetLayerStride(size_t index, u32 layerStrideLsr2) {
|
||||||
@ -374,6 +381,7 @@ namespace skyline::gpu::interconnect {
|
|||||||
|
|
||||||
renderTarget.guest.baseArrayLayer = static_cast<u16>(baseArrayLayer);
|
renderTarget.guest.baseArrayLayer = static_cast<u16>(baseArrayLayer);
|
||||||
renderTarget.view.reset();
|
renderTarget.view.reset();
|
||||||
|
renderTarget.guest.mappings.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureView *GetRenderTarget(RenderTarget &renderTarget) {
|
TextureView *GetRenderTarget(RenderTarget &renderTarget) {
|
||||||
|
Loading…
Reference in New Issue
Block a user