Commit e09e947d by Tim Van Patten Committed by Commit Bot

Capture/Replay: Don't force built-in attribs to have a location

CaptureMidExecutionSetup() hits an assert while capturing "World War Doh": ANGLE : FATAL: FrameCapture.cpp:2876 (CaptureMidExecutionSetup): ! Assert failed [[[...]]] attrib.location != -1 This is due to CaptureMidExecutionSetup() enforcing that all attributes, including built-ins, have a location. However, in the case of "World War Doh", the built-in 'gl_GlobalInvocationID' does not have a location. Moving the assert to after the gl::IsBuiltInName() check allows the capture to complete without hitting any asserts. Bug: angleproject:4048 Test: Capture "World War Doh" Change-Id: Ice96dec629b1477b11a710283c4ec4bf1c95c6e2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2606807Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Commit-Queue: Tim Van Patten <timvp@google.com>
parent bf6cc88a
......@@ -2817,14 +2817,14 @@ void CaptureMidExecutionSetup(const gl::Context *context,
// This can affect attributes that are optimized out in some implementations.
for (const sh::ShaderVariable &attrib : program->getState().getProgramInputs())
{
ASSERT(attrib.location != -1);
if (gl::IsBuiltInName(attrib.name))
{
// Don't try to bind built-in attributes
continue;
}
ASSERT(attrib.location != -1);
cap(CaptureBindAttribLocation(
replayState, true, id, static_cast<GLuint>(attrib.location), attrib.name.c_str()));
}
......
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