Commit 66ec30a7 by Manh Nguyen Committed by Commit Bot

Fix ExceedMaxVertexAtomicCounters test crash with FrameCapture

The AtomicCounterBufferTest31.ExceedMaxVertexAtomicCounters crash is because when program linking fails, as it should for this test, the code tries to get the info log by calling glGetProgramInfoLog. The FrameCapture capturing this call currently tries to make sure that the program is linked. However, glGetProgramInfoLog does not require the program to be linked to execute. Bug: angleproject:4679 Change-Id: Ibbb87d6437152e9eb225e411100b1729e56e4c4a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2227857Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Commit-Queue: Manh Nguyen <nguyenmh@google.com>
parent 97bb5a64
......@@ -3894,10 +3894,9 @@ void CaptureStringLimit(const GLchar *str, uint32_t limit, ParamCapture *paramCa
}
}
gl::Program *GetLinkedProgramForCapture(const gl::State &glState, gl::ShaderProgramID handle)
gl::Program *GetProgramForCapture(const gl::State &glState, gl::ShaderProgramID handle)
{
gl::Program *program = glState.getShaderProgramManagerForCapture().getProgram(handle);
ASSERT(program->isLinked());
return program;
}
......
......@@ -333,7 +333,7 @@ void CaptureMemory(const void *source, size_t size, ParamCapture *paramCapture);
void CaptureString(const GLchar *str, ParamCapture *paramCapture);
void CaptureStringLimit(const GLchar *str, uint32_t limit, ParamCapture *paramCapture);
gl::Program *GetLinkedProgramForCapture(const gl::State &glState, gl::ShaderProgramID handle);
gl::Program *GetProgramForCapture(const gl::State &glState, gl::ShaderProgramID handle);
// For GetIntegerv, GetFloatv, etc.
void CaptureGetParameter(const gl::State &glState,
......
......@@ -398,7 +398,7 @@ void CaptureGetProgramInfoLog_infoLog(const State &glState,
GLchar *infoLog,
ParamCapture *paramCapture)
{
gl::Program *programObj = GetLinkedProgramForCapture(glState, program);
gl::Program *programObj = GetProgramForCapture(glState, program);
ASSERT(programObj);
paramCapture->readBufferSizeBytes = programObj->getExecutable().getInfoLogLength() + 1;
}
......
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