Copy all layers of textures with CopyRectangleFromTexture
This commit is contained in:
parent
99555a35ca
commit
bb4d636f34
|
@ -93,7 +93,7 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture(
|
|||
srcbox.right = srcrect.right;
|
||||
srcbox.bottom = srcrect.bottom;
|
||||
srcbox.front = 0;
|
||||
srcbox.back = 1;
|
||||
srcbox.back = srcentry->config.layers;
|
||||
|
||||
D3D::context->CopySubresourceRegion(
|
||||
texture->GetTex(),
|
||||
|
@ -130,7 +130,7 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture(
|
|||
srcentry->config.width, srcentry->config.height,
|
||||
PixelShaderCache::GetColorCopyProgram(false),
|
||||
VertexShaderCache::GetSimpleVertexShader(),
|
||||
VertexShaderCache::GetSimpleInputLayout(), nullptr, 1.0, 0);
|
||||
VertexShaderCache::GetSimpleInputLayout(), GeometryShaderCache::GetCopyGeometryShader(), 1.0, 0);
|
||||
|
||||
D3D::context->OMSetRenderTargets(1,
|
||||
&FramebufferManager::GetEFBColorTexture()->GetRTV(),
|
||||
|
|
|
@ -168,7 +168,7 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture(
|
|||
0,
|
||||
dstrect.GetWidth(),
|
||||
dstrect.GetHeight(),
|
||||
1);
|
||||
srcentry->config.layers);
|
||||
return;
|
||||
}
|
||||
else if (!framebuffer)
|
||||
|
|
|
@ -226,6 +226,7 @@ void TextureCacheBase::ScaleTextureCacheEntryTo(TextureCacheBase::TCacheEntryBas
|
|||
TextureCacheBase::TCacheEntryConfig newconfig;
|
||||
newconfig.width = new_width;
|
||||
newconfig.height = new_height;
|
||||
newconfig.layers = (*entry)->config.layers;
|
||||
newconfig.rendertarget = true;
|
||||
|
||||
TCacheEntryBase* newentry = AllocateTexture(newconfig);
|
||||
|
|
Loading…
Reference in New Issue