mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-01 21:44:17 +01:00
handle rasterization kill for mesh shaders
This commit is contained in:
parent
e8f726ecd7
commit
395cd1cd11
@ -504,8 +504,11 @@ void LatteSHRC_UpdateVSBaseHash(uint8* vertexShaderPtr, uint32 vertexShaderSize,
|
|||||||
if (g_renderer->GetType() == RendererAPI::Metal)
|
if (g_renderer->GetType() == RendererAPI::Metal)
|
||||||
{
|
{
|
||||||
if (usesGeometryShader)
|
if (usesGeometryShader)
|
||||||
|
{
|
||||||
vsHash += _activeFetchShader->mtlShaderHashObject;
|
vsHash += _activeFetchShader->mtlShaderHashObject;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
// 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();
|
||||||
|
|
||||||
@ -522,6 +525,7 @@ void LatteSHRC_UpdateVSBaseHash(uint8* vertexShaderPtr, uint32 vertexShaderSize,
|
|||||||
if (rasterizationEnabled)
|
if (rasterizationEnabled)
|
||||||
vsHash += 51ULL;
|
vsHash += 51ULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
uint32 tmp = LatteGPUState.contextNew.PA_CL_VTE_CNTL.getRawValue() ^ 0x43F;
|
uint32 tmp = LatteGPUState.contextNew.PA_CL_VTE_CNTL.getRawValue() ^ 0x43F;
|
||||||
vsHash += tmp;
|
vsHash += tmp;
|
||||||
|
@ -3871,7 +3871,7 @@ void LatteDecompiler_emitMSLShader(LatteDecompilerShaderContext* shaderContext,
|
|||||||
|
|
||||||
// Rasterization
|
// Rasterization
|
||||||
rasterizationEnabled = true;
|
rasterizationEnabled = true;
|
||||||
if (shader->shaderType == LatteConst::ShaderType::Vertex)
|
if (shader->shaderType == LatteConst::ShaderType::Vertex && !(shaderContext->options->usesGeometryShader || isRectVertexShader))
|
||||||
{
|
{
|
||||||
rasterizationEnabled = !shaderContext->contextRegistersNew->PA_CL_CLIP_CNTL.get_DX_RASTERIZATION_KILL();
|
rasterizationEnabled = !shaderContext->contextRegistersNew->PA_CL_CLIP_CNTL.get_DX_RASTERIZATION_KILL();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user