mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 23:11:18 +12:00
use the ENABLE_METAL macro
This commit is contained in:
parent
0b1932c206
commit
40264302c2
1 changed files with 17 additions and 15 deletions
|
@ -524,6 +524,7 @@ void LatteSHRC_UpdateVSBaseHash(uint8* vertexShaderPtr, uint32 vertexShaderSize,
|
||||||
if (LatteGPUState.contextNew.PA_CL_CLIP_CNTL.get_DX_CLIP_SPACE_DEF())
|
if (LatteGPUState.contextNew.PA_CL_CLIP_CNTL.get_DX_CLIP_SPACE_DEF())
|
||||||
vsHash += 0x1537;
|
vsHash += 0x1537;
|
||||||
|
|
||||||
|
#if ENABLE_METAL
|
||||||
if (g_renderer->GetType() == RendererAPI::Metal)
|
if (g_renderer->GetType() == RendererAPI::Metal)
|
||||||
{
|
{
|
||||||
if (usesGeometryShader || _activeFetchShader->mtlFetchVertexManually)
|
if (usesGeometryShader || _activeFetchShader->mtlFetchVertexManually)
|
||||||
|
@ -542,27 +543,28 @@ void LatteSHRC_UpdateVSBaseHash(uint8* vertexShaderPtr, uint32 vertexShaderSize,
|
||||||
|
|
||||||
if (!usesGeometryShader)
|
if (!usesGeometryShader)
|
||||||
{
|
{
|
||||||
// Rasterization
|
// Rasterization
|
||||||
bool rasterizationEnabled = !LatteGPUState.contextNew.PA_CL_CLIP_CNTL.get_DX_RASTERIZATION_KILL();
|
bool rasterizationEnabled = !LatteGPUState.contextNew.PA_CL_CLIP_CNTL.get_DX_RASTERIZATION_KILL();
|
||||||
|
|
||||||
// HACK
|
// HACK
|
||||||
if (!LatteGPUState.contextNew.PA_CL_VTE_CNTL.get_VPORT_X_OFFSET_ENA())
|
if (!LatteGPUState.contextNew.PA_CL_VTE_CNTL.get_VPORT_X_OFFSET_ENA())
|
||||||
rasterizationEnabled = true;
|
rasterizationEnabled = true;
|
||||||
|
|
||||||
const auto& polygonControlReg = LatteGPUState.contextNew.PA_SU_SC_MODE_CNTL;
|
const auto& polygonControlReg = LatteGPUState.contextNew.PA_SU_SC_MODE_CNTL;
|
||||||
uint32 cullFront = polygonControlReg.get_CULL_FRONT();
|
uint32 cullFront = polygonControlReg.get_CULL_FRONT();
|
||||||
uint32 cullBack = polygonControlReg.get_CULL_BACK();
|
uint32 cullBack = polygonControlReg.get_CULL_BACK();
|
||||||
if (cullFront && cullBack)
|
if (cullFront && cullBack)
|
||||||
rasterizationEnabled = false;
|
rasterizationEnabled = false;
|
||||||
|
|
||||||
if (rasterizationEnabled)
|
if (rasterizationEnabled)
|
||||||
vsHash += 51ULL;
|
vsHash += 51ULL;
|
||||||
|
|
||||||
// Vertex fetch
|
// Vertex fetch
|
||||||
if (_activeFetchShader->mtlFetchVertexManually)
|
if (_activeFetchShader->mtlFetchVertexManually)
|
||||||
vsHash += 349ULL;
|
vsHash += 349ULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
_shaderBaseHash_vs = vsHash;
|
_shaderBaseHash_vs = vsHash;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue