Fix getTextureType enum conversion fomatting

This commit is contained in:
PixelyIon 2022-05-07 03:46:00 +05:30
parent ae5bcbdb5c
commit 874a6a2a6c

View File

@ -930,23 +930,34 @@ namespace skyline::gpu::interconnect {
auto readConstantBuffer{[&executor = executor, &constantBuffers = pipelineStage.constantBuffers](u32 index, u32 offset) { auto readConstantBuffer{[&executor = executor, &constantBuffers = pipelineStage.constantBuffers](u32 index, u32 offset) {
return constantBuffers[index].Read<u32>(executor, offset); return constantBuffers[index].Read<u32>(executor, offset);
}}; }};
auto getTextureType{[this](u32 handle) { auto getTextureType{[this](u32 handle) {
using TicType = TextureImageControl::TextureType; using TicType = TextureImageControl::TextureType;
using ShaderType = ShaderCompiler::TextureType; using ShaderType = ShaderCompiler::TextureType;
switch (GetTextureImageControl(BindlessTextureHandle{handle}.textureIndex).textureType) { switch (GetTextureImageControl(BindlessTextureHandle{handle}.textureIndex).textureType) {
case TicType::e1D: return ShaderType::Color1D; case TicType::e1D:
case TicType::e1DArray: return ShaderType::ColorArray1D; return ShaderType::Color1D;
case TicType::e1DBuffer: return ShaderType::Buffer; case TicType::e1DArray:
return ShaderType::ColorArray1D;
case TicType::e1DBuffer:
return ShaderType::Buffer;
case TicType::e2D: return ShaderType::Color2D; case TicType::e2D:
case TicType::e2DArray: return ShaderType::ColorArray2D; case TicType::e2DNoMipmap:
return ShaderType::Color2D;
case TicType::e2DArray:
return ShaderType::ColorArray2D;
case TicType::e3D: return ShaderType::Color3D; case TicType::e3D:
return ShaderType::Color3D;
case TicType::eCube: return ShaderType::ColorCube; case TicType::eCube:
case TicType::eCubeArray: return ShaderType::ColorArrayCube; return ShaderType::ColorCube;
case TicType::eCubeArray:
return ShaderType::ColorArrayCube;
} }
}}; }};
if (!shader.invalidated && shader.program) if (!shader.invalidated && shader.program)
shader.invalidated |= shader.program->VerifyState(readConstantBuffer, getTextureType); shader.invalidated |= shader.program->VerifyState(readConstantBuffer, getTextureType);