Implemented instanced rendering for emulated point sprites
Non-instanced PointSprite emulation for lower feature levels is
implemented using D3D DrawIndexedInstanced and an instanced vertex
buffer containing a pointsprite quad.
GL instanced rendering using glDrawArraysInstanced and
glDrawElementsInstanced with pointsprite emulation is performed using
a for-loop. The loop iterates over each instance to render and adjusts
the buffer offsets accordingly. This is not performant and is only used
and required by this chosen pointsprite emulation method.
Indexed instanced (glDrawElementsInstanced), uses the same offset loop
because the vertex buffer containing the data to be rendered has already
been expanded using getEmulatedIndexedBuffer(). Expanding the buffer
makes the two rendering operations similar enough to share code.
BUG=angleproject:1279
TEST=angle_end2end_tests
Change-Id: If46cc9f158e29f5518c70ad630b3228f474a9f8b
Reviewed-on: https://chromium-review.googlesource.com/321407
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/tests/perf_tests/IndexDataManagerTest.cpp b/src/tests/perf_tests/IndexDataManagerTest.cpp
index b6465c0..ded8ed1 100644
--- a/src/tests/perf_tests/IndexDataManagerTest.cpp
+++ b/src/tests/perf_tests/IndexDataManagerTest.cpp
@@ -154,13 +154,12 @@
void IndexDataManagerPerfTest::step()
{
rx::TranslatedIndexData translatedIndexData;
- rx::SourceIndexData sourceIndexData;
for (unsigned int iteration = 0; iteration < 100; ++iteration)
{
mIndexBuffer.getIndexRange(GL_UNSIGNED_SHORT, 0, mIndexCount, false,
&translatedIndexData.indexRange);
mIndexDataManager.prepareIndexData(GL_UNSIGNED_SHORT, mIndexCount, &mIndexBuffer, nullptr,
- &translatedIndexData, &sourceIndexData, false);
+ &translatedIndexData, false);
}
}