Commit 0f34a98a by Nicolas Capens Committed by Nicolas Capens

Remove shader call stack bounding

The root cause of a shader call stack overflow was fixed in https://swiftshader-review.googlesource.com/c/SwiftShader/+/24628 All shaders should now be validated not to exceed our call stack size before reaching this lowering stage of compilation. Thus the run-time checks can be removed. This partially reverts https://swiftshader-review.googlesource.com/c/SwiftShader/+/23568 Bug b/123587120 Change-Id: I04fc2613da7526992dd52c323deca8d9ad2c30c0 Reviewed-on: https://swiftshader-review.googlesource.com/c/24648 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent f9694885
......@@ -1419,7 +1419,7 @@ namespace sw
if(callRetBlock[labelIndex].size() > 1)
{
callStack[Min(stackIndex++, Int(MAX_SHADER_CALL_STACK_SIZE))] = UInt(callSiteIndex);
callStack[stackIndex++] = UInt(callSiteIndex);
}
Int4 restoreLeave = enableLeave;
......@@ -1459,7 +1459,7 @@ namespace sw
if(callRetBlock[labelIndex].size() > 1)
{
callStack[Min(stackIndex++, Int(MAX_SHADER_CALL_STACK_SIZE))] = UInt(callSiteIndex);
callStack[stackIndex++] = UInt(callSiteIndex);
}
Int4 restoreLeave = enableLeave;
......@@ -1488,7 +1488,7 @@ namespace sw
if(callRetBlock[labelIndex].size() > 1)
{
callStack[Min(stackIndex++, Int(MAX_SHADER_CALL_STACK_SIZE))] = UInt(callSiteIndex);
callStack[stackIndex++] = UInt(callSiteIndex);
}
enableIndex++;
......
......@@ -1124,7 +1124,7 @@ namespace sw
if(callRetBlock[labelIndex].size() > 1)
{
callStack[Min(stackIndex++, Int(MAX_SHADER_CALL_STACK_SIZE))] = UInt(callSiteIndex);
callStack[stackIndex++] = UInt(callSiteIndex);
}
Int4 restoreLeave = enableLeave;
......@@ -1164,7 +1164,7 @@ namespace sw
if(callRetBlock[labelIndex].size() > 1)
{
callStack[Min(stackIndex++, Int(MAX_SHADER_CALL_STACK_SIZE))] = UInt(callSiteIndex);
callStack[stackIndex++] = UInt(callSiteIndex);
}
Int4 restoreLeave = enableLeave;
......@@ -1193,7 +1193,7 @@ namespace sw
if(callRetBlock[labelIndex].size() > 1)
{
callStack[Min(stackIndex++, Int(MAX_SHADER_CALL_STACK_SIZE))] = UInt(callSiteIndex);
callStack[stackIndex++] = UInt(callSiteIndex);
}
enableIndex++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment