Copy all layers of textures with CopyRectangleFromTexture

This commit is contained in:
mimimi085181 2016-02-14 17:13:07 +01:00
parent 99555a35ca
commit bb4d636f34
3 changed files with 4 additions and 3 deletions

View File

@ -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(),

View File

@ -168,7 +168,7 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture(
0,
dstrect.GetWidth(),
dstrect.GetHeight(),
1);
srcentry->config.layers);
return;
}
else if (!framebuffer)

View File

@ -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);