src/tests/gl_tests/DrawBaseVertexBaseInstanceTest.cpp


Log

Author Commit Date CI Message
David Benjamin f60da874 2019-11-19T18:45:45 Fix out-of-bounds access bug in ANGLE tests When not filled in, as in Android, activeGPUIndex is -1. This is fine for Android because it doesn't use vendorID, but the function computed vendorID unconditionally without checking for -1. Default activeGPUIndex to 0 instead of -1. Note code still needs to check for systemInfo.gpus.empty(). This caused crashes when _LIBCPP_DEBUG=0 was enabled. Bug: chromium:923166 Change-Id: If4d1dff9553a580fd92bc0497fc092789d07ed93 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1925031 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
shrekshao 35f74cd6 2019-10-31T16:47:10 Reorder BaseVertexBaseInstance draw calls parameters To match the parameter order of MultiDraw* calls. And potentially expose in chromium directly with ANGLE_ prefix. Bug: angleproject:3402, chromium:891861 Change-Id: I19548f4c3c7faa422e43905850b218039de43015 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1894241 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
shrekshao c847a75f 2019-09-20T14:08:32 Fix redundant draw in DrawBaseVertexBaseInstanceTest Discovered this redundant draw issue when writing javascript webgl conformance test. Together fix some broken formatting. TBR=geofflang@chromium.org Bug: 3402 Change-Id: I29dbcd04da7e47d9e0bc79074ff69202378c1214 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1816822 Reviewed-by: Shrek Shao <shrekshao@google.com> Commit-Queue: Shrek Shao <shrekshao@google.com>
shrekshao b5560486 2019-08-30T17:09:04 BaseInstance VertexAttribDivisor fix Add tests not using gl_InstanceID/gl_BaseInstance but set vertexAttribDivisor which implicitly reference base instance value. Add fixes and workarounds based on this change. Bug: chromium:891861, angleproject:3402 Change-Id: I2d93c181029f4ca1741f244363568096964d6b19 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1779350 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
shrekshao cd31f286 2019-06-25T14:22:41 Implement Draw base vertex and base instance functions This patch implements functionality of glDrawArraysInstancedBaseInstanceANGLE, glDrawElementsInstancedBaseVertexBaseInstanceANGLE, glMultiDrawArraysInstancedBaseInstanceANGLE, and glMultiDrawElementsInstancedBaseVertexBaseInstanceANGLE Workaround for OpenGL driver on Mac: gl_VertexID on Mac with AMD GPU doesn't include baseVertex value. So replace gl_VertexID with (gl_VertexID + angle_BaseVertex) if any. Workaround for Vulkan GLSL: gl_InstanceIndex on Vulkan includes baseInstance. So replace gl_InstanceIndex with (gl_InstanceIndex - angle_BaseInstance) when angle_BaseInstance is declared. Bug: chromium:891861, angleproject:3402 Change-Id: Ia1d94b5d4d7da7e635468c05c962c4f7eb1b1919 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1750126 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>