Commit b3e920e2 by Gert Wollny Committed by Angle LUCI CQ

Capture/Replay: don't capture DrawElements with count zero

Usually Context::noopDraw would reject calls that doen't draw, but FrameCapture::maybeCaptureDrawElementsClientData seems to be called before Context::noopDraw, and since in ComputeTypedIndexRange we would obtain the illegal range [0,0) (which is actually prohibited by an ssertion "count > 0"), we have to exit early. With that the test can be enabled. Bug: angleproject:6111 Change-Id: I4c242712bd90602f84ad6072b02c3a13a26840f7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2993089Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Gert Wollny <gert.wollny@collabora.com>
parent 5d314b59
...@@ -4076,7 +4076,14 @@ void FrameCapture::maybeCaptureDrawElementsClientData(const gl::Context *context ...@@ -4076,7 +4076,14 @@ void FrameCapture::maybeCaptureDrawElementsClientData(const gl::Context *context
return; return;
} }
// if the count is zero then the index evaluation is not valid and we wouldn't be drawing
// anything anyway, so skip capturing
GLsizei count = call.params.getParam("count", ParamType::TGLsizei, 1).value.GLsizeiVal; GLsizei count = call.params.getParam("count", ParamType::TGLsizei, 1).value.GLsizeiVal;
if (count == 0)
{
return;
}
gl::DrawElementsType drawElementsType = gl::DrawElementsType drawElementsType =
call.params.getParam("typePacked", ParamType::TDrawElementsType, 2) call.params.getParam("typePacked", ParamType::TDrawElementsType, 2)
.value.DrawElementsTypeVal; .value.DrawElementsTypeVal;
......
...@@ -53,7 +53,6 @@ VertexAttributeTest.* ...@@ -53,7 +53,6 @@ VertexAttributeTest.*
ViewportTest.* ViewportTest.*
VulkanExternalImageTest.* VulkanExternalImageTest.*
WebGLCompatibilityTest.NullIndexBuffer/*
WebGLCompatibilityTest.EnableProgramBinaryExtension/* WebGLCompatibilityTest.EnableProgramBinaryExtension/*
WebGLCompatibilityTest.MultiContextNoRenderingFeedbackLoops/* WebGLCompatibilityTest.MultiContextNoRenderingFeedbackLoops/*
WebGLFramebufferTest.* WebGLFramebufferTest.*
......
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