mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 23:11:18 +12:00
Revert "only set array length for texture view arrays"
This reverts commit d9f857bcc4
.
This commit is contained in:
parent
732e3be63d
commit
14258cdb28
1 changed files with 9 additions and 10 deletions
|
@ -2,7 +2,6 @@
|
||||||
#include "Cafe/HW/Latte/Renderer/Metal/LatteTextureMtl.h"
|
#include "Cafe/HW/Latte/Renderer/Metal/LatteTextureMtl.h"
|
||||||
#include "Cafe/HW/Latte/Renderer/Metal/MetalRenderer.h"
|
#include "Cafe/HW/Latte/Renderer/Metal/MetalRenderer.h"
|
||||||
#include "Cafe/HW/Latte/Renderer/Metal/LatteToMtl.h"
|
#include "Cafe/HW/Latte/Renderer/Metal/LatteToMtl.h"
|
||||||
#include "Metal/MTLTexture.hpp"
|
|
||||||
|
|
||||||
uint32 LatteTextureMtl_AdjustTextureCompSel(Latte::E_GX2SURFFMT format, uint32 compSel)
|
uint32 LatteTextureMtl_AdjustTextureCompSel(Latte::E_GX2SURFFMT format, uint32 compSel)
|
||||||
{
|
{
|
||||||
|
@ -159,21 +158,21 @@ MTL::Texture* LatteTextureViewMtl::CreateSwizzledView(uint32 gpuSamplerSwizzle)
|
||||||
|
|
||||||
uint32 baseLevel = firstMip;
|
uint32 baseLevel = firstMip;
|
||||||
uint32 levelCount = this->numMip;
|
uint32 levelCount = this->numMip;
|
||||||
uint32 baseLayer = 0;
|
uint32 baseLayer;
|
||||||
uint32 layerCount = 1;
|
uint32 layerCount;
|
||||||
|
// TODO: check if base texture is 3D texture as well
|
||||||
// TODO: check if base texture is 3D texture as well?
|
|
||||||
if (textureType == MTL::TextureType3D)
|
if (textureType == MTL::TextureType3D)
|
||||||
{
|
{
|
||||||
cemu_assert_debug(firstMip == 0);
|
cemu_assert_debug(firstMip == 0);
|
||||||
cemu_assert_debug(this->numSlice == baseTexture->depth);
|
cemu_assert_debug(this->numSlice == baseTexture->depth);
|
||||||
|
baseLayer = 0;
|
||||||
|
layerCount = 1;
|
||||||
}
|
}
|
||||||
// Cube array needs to have layer count multiple of 6 as opposed to when creating a texture
|
else
|
||||||
else if (textureType == MTL::TextureTypeCubeArray || textureType == MTL::TextureType2DArray)
|
{
|
||||||
{
|
baseLayer = firstSlice;
|
||||||
baseLayer = firstSlice;
|
|
||||||
layerCount = this->numSlice;
|
layerCount = this->numSlice;
|
||||||
}
|
}
|
||||||
|
|
||||||
MTL::TextureSwizzleChannels swizzle;
|
MTL::TextureSwizzleChannels swizzle;
|
||||||
swizzle.red = GetMtlTextureSwizzle(compSelR);
|
swizzle.red = GetMtlTextureSwizzle(compSelR);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue