mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-14 18:58:29 +12:00
Latte: Small refactor and clean up for texture size code
This commit is contained in:
parent
0993658c82
commit
dd7cb74cd2
13 changed files with 64 additions and 110 deletions
|
@ -764,7 +764,7 @@ void VulkanRenderer::HandleScreenshotRequest(LatteTextureView* texView, bool pad
|
|||
//dumpImage->flagForCurrentCommandBuffer();
|
||||
|
||||
int width, height;
|
||||
LatteTexture_getEffectiveSize(baseImageTex, &width, &height, nullptr, 0);
|
||||
baseImageTex->GetEffectiveSize(width, height, 0);
|
||||
|
||||
VkImage image = nullptr;
|
||||
VkDeviceMemory imageMemory = nullptr;;
|
||||
|
|
|
@ -464,9 +464,8 @@ VKRObjectFramebuffer* VulkanRenderer::surfaceCopy_getOrCreateFramebuffer(VkCopyS
|
|||
VKRObjectTextureView* vkObjTextureView = surfaceCopy_createImageView(state.destinationTexture, state.dstSlice, state.dstMip);
|
||||
|
||||
// create new framebuffer
|
||||
sint32 effectiveWidth = 0;
|
||||
sint32 effectiveHeight = 0;
|
||||
LatteTexture_getEffectiveSize(state.destinationTexture, &effectiveWidth, &effectiveHeight, nullptr, state.dstMip);
|
||||
sint32 effectiveWidth, effectiveHeight;
|
||||
state.destinationTexture->GetEffectiveSize(effectiveWidth, effectiveHeight, state.dstMip);
|
||||
|
||||
std::array<VKRObjectTextureView*, 1> fbAttachments;
|
||||
fbAttachments[0] = vkObjTextureView;
|
||||
|
@ -595,15 +594,11 @@ void VulkanRenderer::surfaceCopy_viaDrawcall(LatteTextureVk* srcTextureVk, sint3
|
|||
// get descriptor set
|
||||
VKRObjectDescriptorSet* vkObjDescriptorSet = surfaceCopy_getOrCreateDescriptorSet(copySurfaceState, copySurfacePipelineInfo);
|
||||
|
||||
// get extend
|
||||
sint32 effectiveWidth = 0;
|
||||
sint32 effectiveHeight = 0;
|
||||
LatteTexture_getEffectiveSize(dstTextureVk, &effectiveWidth, &effectiveHeight, nullptr, texDstMip);
|
||||
sint32 dstEffectiveWidth, dstEffectiveHeight;
|
||||
dstTextureVk->GetEffectiveSize(dstEffectiveWidth, dstEffectiveHeight, texDstMip);
|
||||
|
||||
// get extend
|
||||
sint32 srcEffectiveWidth = 0;
|
||||
sint32 srcEffectiveHeight = 0;
|
||||
LatteTexture_getEffectiveSize(srcTextureVk, &srcEffectiveWidth, &srcEffectiveHeight, nullptr, texSrcMip);
|
||||
sint32 srcEffectiveWidth, srcEffectiveHeight;
|
||||
srcTextureVk->GetEffectiveSize(srcEffectiveWidth, srcEffectiveHeight, texSrcMip);
|
||||
|
||||
CopyShaderPushConstantData_t pushConstantData;
|
||||
|
||||
|
@ -878,9 +873,8 @@ void VulkanRenderer::surfaceCopy_copySurfaceWithFormatConversion(LatteTexture* s
|
|||
sint32 effectiveCopyWidth = width;
|
||||
sint32 effectiveCopyHeight = height;
|
||||
LatteTexture_scaleToEffectiveSize(sourceTexture, &effectiveCopyWidth, &effectiveCopyHeight, 0);
|
||||
sint32 sourceEffectiveWidth;
|
||||
sint32 sourceEffectiveHeight;
|
||||
LatteTexture_getEffectiveSize(sourceTexture, &sourceEffectiveWidth, &sourceEffectiveHeight, nullptr, srcMip);
|
||||
sint32 sourceEffectiveWidth, sourceEffectiveHeight;
|
||||
sourceTexture->GetEffectiveSize(sourceEffectiveWidth, sourceEffectiveHeight, srcMip);
|
||||
|
||||
sint32 texSrcMip = srcMip;
|
||||
sint32 texSrcSlice = srcSlice;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue