2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2008-12-08 05:25:12 +00:00
|
|
|
|
2019-12-05 14:36:39 +00:00
|
|
|
#include "VideoCommon/IndexGenerator.h"
|
|
|
|
|
|
|
|
#include <array>
|
2013-02-22 01:10:00 +00:00
|
|
|
#include <cstddef>
|
2018-11-27 07:16:53 +00:00
|
|
|
#include <cstring>
|
2013-02-22 01:10:00 +00:00
|
|
|
|
2014-09-08 01:06:58 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
2016-01-17 21:54:31 +00:00
|
|
|
#include "Common/Logging/Log.h"
|
2014-05-08 23:53:18 +00:00
|
|
|
#include "VideoCommon/OpcodeDecoding.h"
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "VideoCommon/VideoConfig.h"
|
2008-12-08 05:25:12 +00:00
|
|
|
|
2019-12-05 14:36:39 +00:00
|
|
|
namespace
|
|
|
|
{
|
|
|
|
constexpr u16 s_primitive_restart = UINT16_MAX;
|
|
|
|
|
2014-01-16 13:30:17 +00:00
|
|
|
template <bool pr>
|
2019-12-05 14:38:49 +00:00
|
|
|
u16* WriteTriangle(u16* index_ptr, u32 index1, u32 index2, u32 index3)
|
2009-09-29 18:27:41 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
*index_ptr++ = index1;
|
|
|
|
*index_ptr++ = index2;
|
|
|
|
*index_ptr++ = index3;
|
2019-12-05 14:52:16 +00:00
|
|
|
if constexpr (pr)
|
2019-12-05 14:38:49 +00:00
|
|
|
*index_ptr++ = s_primitive_restart;
|
|
|
|
return index_ptr;
|
2013-02-22 01:10:00 +00:00
|
|
|
}
|
|
|
|
|
2014-01-16 13:30:17 +00:00
|
|
|
template <bool pr>
|
2019-12-05 14:38:49 +00:00
|
|
|
u16* AddList(u16* index_ptr, u32 num_verts, u32 index)
|
2013-02-22 03:01:53 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
for (u32 i = 2; i < num_verts; i += 3)
|
2010-05-22 21:58:43 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
index_ptr = WriteTriangle<pr>(index_ptr, index + i - 2, index + i - 1, index + i);
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
2019-12-05 14:38:49 +00:00
|
|
|
return index_ptr;
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
|
|
|
|
2014-01-16 13:30:17 +00:00
|
|
|
template <bool pr>
|
2019-12-05 14:38:49 +00:00
|
|
|
u16* AddStrip(u16* index_ptr, u32 num_verts, u32 index)
|
2009-09-29 18:27:41 +00:00
|
|
|
{
|
2019-12-05 14:52:16 +00:00
|
|
|
if constexpr (pr)
|
2013-04-08 17:39:43 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
for (u32 i = 0; i < num_verts; ++i)
|
2013-03-29 13:27:33 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
*index_ptr++ = index + i;
|
2013-03-29 13:27:33 +00:00
|
|
|
}
|
2019-12-05 14:38:49 +00:00
|
|
|
*index_ptr++ = s_primitive_restart;
|
2013-03-29 13:27:33 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
bool wind = false;
|
2019-12-05 14:38:49 +00:00
|
|
|
for (u32 i = 2; i < num_verts; ++i)
|
2013-03-29 13:27:33 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
index_ptr = WriteTriangle<pr>(index_ptr, index + i - 2, index + i - !wind, index + i - wind);
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2013-03-29 13:27:33 +00:00
|
|
|
wind ^= true;
|
|
|
|
}
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
2019-12-05 14:38:49 +00:00
|
|
|
return index_ptr;
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
2013-02-22 01:10:00 +00:00
|
|
|
|
2013-04-08 15:22:16 +00:00
|
|
|
/**
|
|
|
|
* FAN simulator:
|
|
|
|
*
|
|
|
|
* 2---3
|
|
|
|
* / \ / \
|
|
|
|
* 1---0---4
|
|
|
|
*
|
|
|
|
* would generate this triangles:
|
|
|
|
* 012, 023, 034
|
|
|
|
*
|
|
|
|
* rotated (for better striping):
|
|
|
|
* 120, 302, 034
|
|
|
|
*
|
|
|
|
* as odd ones have to winded, following strip is fine:
|
|
|
|
* 12034
|
|
|
|
*
|
|
|
|
* so we use 6 indices for 3 triangles
|
|
|
|
*/
|
|
|
|
|
2014-01-16 13:30:17 +00:00
|
|
|
template <bool pr>
|
2019-12-05 14:38:49 +00:00
|
|
|
u16* AddFan(u16* index_ptr, u32 num_verts, u32 index)
|
2009-09-29 18:27:41 +00:00
|
|
|
{
|
2013-04-08 15:22:16 +00:00
|
|
|
u32 i = 2;
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2019-12-05 14:52:16 +00:00
|
|
|
if constexpr (pr)
|
2013-04-08 17:39:43 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
for (; i + 3 <= num_verts; i += 3)
|
2013-04-08 15:22:16 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
*index_ptr++ = index + i - 1;
|
|
|
|
*index_ptr++ = index + i + 0;
|
|
|
|
*index_ptr++ = index;
|
|
|
|
*index_ptr++ = index + i + 1;
|
|
|
|
*index_ptr++ = index + i + 2;
|
|
|
|
*index_ptr++ = s_primitive_restart;
|
2013-04-08 15:22:16 +00:00
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2019-12-05 14:38:49 +00:00
|
|
|
for (; i + 2 <= num_verts; i += 2)
|
2013-04-08 15:22:16 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
*index_ptr++ = index + i - 1;
|
|
|
|
*index_ptr++ = index + i + 0;
|
|
|
|
*index_ptr++ = index;
|
|
|
|
*index_ptr++ = index + i + 1;
|
|
|
|
*index_ptr++ = s_primitive_restart;
|
2013-04-08 15:22:16 +00:00
|
|
|
}
|
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2019-12-05 14:38:49 +00:00
|
|
|
for (; i < num_verts; ++i)
|
2010-05-22 21:58:43 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
index_ptr = WriteTriangle<pr>(index_ptr, index, index + i - 1, index + i);
|
2013-02-22 01:10:00 +00:00
|
|
|
}
|
2019-12-05 14:38:49 +00:00
|
|
|
return index_ptr;
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
|
|
|
|
2013-04-08 15:22:16 +00:00
|
|
|
/*
|
|
|
|
* QUAD simulator
|
|
|
|
*
|
|
|
|
* 0---1 4---5
|
|
|
|
* |\ | |\ |
|
|
|
|
* | \ | | \ |
|
|
|
|
* | \| | \|
|
|
|
|
* 3---2 7---6
|
|
|
|
*
|
|
|
|
* 012,023, 456,467 ...
|
|
|
|
* or 120,302, 564,746
|
|
|
|
* or as strip: 1203, 5647
|
2013-04-10 10:36:59 +00:00
|
|
|
*
|
|
|
|
* Warning:
|
2013-04-10 10:45:44 +00:00
|
|
|
* A simple triangle has to be rendered for three vertices.
|
|
|
|
* ZWW do this for sun rays
|
2013-04-08 15:22:16 +00:00
|
|
|
*/
|
2014-01-16 13:30:17 +00:00
|
|
|
template <bool pr>
|
2019-12-05 14:38:49 +00:00
|
|
|
u16* AddQuads(u16* index_ptr, u32 num_verts, u32 index)
|
2009-09-29 18:27:41 +00:00
|
|
|
{
|
2013-06-23 12:38:25 +00:00
|
|
|
u32 i = 3;
|
2019-12-05 14:38:49 +00:00
|
|
|
for (; i < num_verts; i += 4)
|
2009-09-29 18:27:41 +00:00
|
|
|
{
|
2019-12-05 14:52:16 +00:00
|
|
|
if constexpr (pr)
|
2013-04-08 17:39:43 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
*index_ptr++ = index + i - 2;
|
|
|
|
*index_ptr++ = index + i - 1;
|
|
|
|
*index_ptr++ = index + i - 3;
|
|
|
|
*index_ptr++ = index + i - 0;
|
|
|
|
*index_ptr++ = s_primitive_restart;
|
2013-03-29 13:27:33 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
index_ptr = WriteTriangle<pr>(index_ptr, index + i - 3, index + i - 2, index + i - 1);
|
|
|
|
index_ptr = WriteTriangle<pr>(index_ptr, index + i - 3, index + i - 1, index + i - 0);
|
2016-06-24 08:43:46 +00:00
|
|
|
}
|
2013-03-29 13:27:33 +00:00
|
|
|
}
|
2016-06-24 08:43:46 +00:00
|
|
|
|
2013-04-10 10:36:59 +00:00
|
|
|
// three vertices remaining, so render a triangle
|
2019-12-05 14:38:49 +00:00
|
|
|
if (i == num_verts)
|
2013-04-10 10:36:59 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
index_ptr = WriteTriangle<pr>(index_ptr, index + num_verts - 3, index + num_verts - 2,
|
|
|
|
index + num_verts - 1);
|
2013-04-10 10:36:59 +00:00
|
|
|
}
|
2019-12-05 14:38:49 +00:00
|
|
|
return index_ptr;
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
|
|
|
|
2014-05-17 18:55:32 +00:00
|
|
|
template <bool pr>
|
2019-12-05 14:38:49 +00:00
|
|
|
u16* AddQuads_nonstandard(u16* index_ptr, u32 num_verts, u32 index)
|
2014-05-17 18:55:32 +00:00
|
|
|
{
|
2020-11-14 03:33:26 +00:00
|
|
|
WARN_LOG_FMT(VIDEO, "Non-standard primitive drawing command GL_DRAW_QUADS_2");
|
2019-12-05 14:38:49 +00:00
|
|
|
return AddQuads<pr>(index_ptr, num_verts, index);
|
2014-05-17 18:55:32 +00:00
|
|
|
}
|
|
|
|
|
2019-12-05 14:38:49 +00:00
|
|
|
u16* AddLineList(u16* index_ptr, u32 num_verts, u32 index)
|
2009-09-29 18:27:41 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
for (u32 i = 1; i < num_verts; i += 2)
|
2009-09-29 18:27:41 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
*index_ptr++ = index + i - 1;
|
|
|
|
*index_ptr++ = index + i;
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
2019-12-05 14:38:49 +00:00
|
|
|
return index_ptr;
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
|
|
|
|
2019-12-05 14:38:49 +00:00
|
|
|
// Shouldn't be used as strips as LineLists are much more common
|
2013-04-08 15:58:23 +00:00
|
|
|
// so converting them to lists
|
2019-12-05 14:38:49 +00:00
|
|
|
u16* AddLineStrip(u16* index_ptr, u32 num_verts, u32 index)
|
2009-09-29 18:27:41 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
for (u32 i = 1; i < num_verts; ++i)
|
2009-09-29 18:27:41 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
*index_ptr++ = index + i - 1;
|
|
|
|
*index_ptr++ = index + i;
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
2019-12-05 14:38:49 +00:00
|
|
|
return index_ptr;
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
|
|
|
|
2022-07-23 05:47:04 +00:00
|
|
|
template <bool pr, bool linestrip>
|
|
|
|
u16* AddLines_VSExpand(u16* index_ptr, u32 num_verts, u32 index)
|
|
|
|
{
|
|
|
|
// VS Expand uses (index >> 2) as the base vertex
|
|
|
|
// Bit 0 indicates which side of the line (left/right for a vertical line)
|
|
|
|
// Bit 1 indicates which point of the line (top/bottom for a vertical line)
|
|
|
|
// VS Expand assumes the two points will be adjacent vertices
|
|
|
|
constexpr u32 advance = linestrip ? 1 : 2;
|
|
|
|
for (u32 i = 1; i < num_verts; i += advance)
|
|
|
|
{
|
|
|
|
u32 p0 = (index + i - 1) << 2;
|
|
|
|
u32 p1 = (index + i - 0) << 2;
|
|
|
|
if constexpr (pr)
|
|
|
|
{
|
|
|
|
*index_ptr++ = p0 + 0;
|
|
|
|
*index_ptr++ = p0 + 1;
|
|
|
|
*index_ptr++ = p1 + 2;
|
|
|
|
*index_ptr++ = p1 + 3;
|
|
|
|
*index_ptr++ = s_primitive_restart;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*index_ptr++ = p0 + 0;
|
|
|
|
*index_ptr++ = p0 + 1;
|
|
|
|
*index_ptr++ = p1 + 2;
|
|
|
|
*index_ptr++ = p0 + 1;
|
|
|
|
*index_ptr++ = p1 + 2;
|
|
|
|
*index_ptr++ = p1 + 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return index_ptr;
|
|
|
|
}
|
|
|
|
|
2019-12-05 14:38:49 +00:00
|
|
|
u16* AddPoints(u16* index_ptr, u32 num_verts, u32 index)
|
2009-09-29 18:27:41 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
for (u32 i = 0; i != num_verts; ++i)
|
2009-09-29 18:27:41 +00:00
|
|
|
{
|
2019-12-05 14:38:49 +00:00
|
|
|
*index_ptr++ = index + i;
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
2019-12-05 14:38:49 +00:00
|
|
|
return index_ptr;
|
|
|
|
}
|
2022-07-23 05:47:04 +00:00
|
|
|
|
|
|
|
template <bool pr>
|
|
|
|
u16* AddPoints_VSExpand(u16* index_ptr, u32 num_verts, u32 index)
|
|
|
|
{
|
|
|
|
// VS Expand uses (index >> 2) as the base vertex
|
|
|
|
// Bottom two bits indicate which of (TL, TR, BL, BR) this is
|
|
|
|
for (u32 i = 0; i < num_verts; ++i)
|
|
|
|
{
|
|
|
|
u32 base = (index + i) << 2;
|
|
|
|
if constexpr (pr)
|
|
|
|
{
|
|
|
|
*index_ptr++ = base + 0;
|
|
|
|
*index_ptr++ = base + 1;
|
|
|
|
*index_ptr++ = base + 2;
|
|
|
|
*index_ptr++ = base + 3;
|
|
|
|
*index_ptr++ = s_primitive_restart;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
*index_ptr++ = base + 0;
|
|
|
|
*index_ptr++ = base + 1;
|
|
|
|
*index_ptr++ = base + 2;
|
|
|
|
*index_ptr++ = base + 1;
|
|
|
|
*index_ptr++ = base + 2;
|
|
|
|
*index_ptr++ = base + 3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return index_ptr;
|
|
|
|
}
|
2019-12-05 14:38:49 +00:00
|
|
|
} // Anonymous namespace
|
|
|
|
|
|
|
|
void IndexGenerator::Init()
|
|
|
|
{
|
2021-04-30 21:57:12 +00:00
|
|
|
using OpcodeDecoder::Primitive;
|
|
|
|
|
2019-12-05 14:38:49 +00:00
|
|
|
if (g_Config.backend_info.bSupportsPrimitiveRestart)
|
|
|
|
{
|
2021-04-30 21:57:12 +00:00
|
|
|
m_primitive_table[Primitive::GX_DRAW_QUADS] = AddQuads<true>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_QUADS_2] = AddQuads_nonstandard<true>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_TRIANGLES] = AddList<true>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_TRIANGLE_STRIP] = AddStrip<true>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_TRIANGLE_FAN] = AddFan<true>;
|
2019-12-05 14:38:49 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2021-04-30 21:57:12 +00:00
|
|
|
m_primitive_table[Primitive::GX_DRAW_QUADS] = AddQuads<false>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_QUADS_2] = AddQuads_nonstandard<false>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_TRIANGLES] = AddList<false>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_TRIANGLE_STRIP] = AddStrip<false>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_TRIANGLE_FAN] = AddFan<false>;
|
2019-12-05 14:38:49 +00:00
|
|
|
}
|
2022-07-23 05:47:04 +00:00
|
|
|
if (g_Config.UseVSForLinePointExpand())
|
|
|
|
{
|
|
|
|
if (g_Config.backend_info.bSupportsPrimitiveRestart)
|
|
|
|
{
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_LINES] = AddLines_VSExpand<true, false>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_LINE_STRIP] = AddLines_VSExpand<true, true>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_POINTS] = AddPoints_VSExpand<true>;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_LINES] = AddLines_VSExpand<false, false>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_LINE_STRIP] = AddLines_VSExpand<false, true>;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_POINTS] = AddPoints_VSExpand<false>;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_LINES] = AddLineList;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_LINE_STRIP] = AddLineStrip;
|
|
|
|
m_primitive_table[Primitive::GX_DRAW_POINTS] = AddPoints;
|
|
|
|
}
|
2019-12-05 14:38:49 +00:00
|
|
|
}
|
|
|
|
|
2019-12-05 15:01:33 +00:00
|
|
|
void IndexGenerator::Start(u16* index_ptr)
|
2019-12-05 14:38:49 +00:00
|
|
|
{
|
2019-12-05 15:01:33 +00:00
|
|
|
m_index_buffer_current = index_ptr;
|
|
|
|
m_base_index_ptr = index_ptr;
|
|
|
|
m_base_index = 0;
|
2019-12-05 14:38:49 +00:00
|
|
|
}
|
|
|
|
|
2021-04-30 21:57:12 +00:00
|
|
|
void IndexGenerator::AddIndices(OpcodeDecoder::Primitive primitive, u32 num_vertices)
|
2019-12-05 14:38:49 +00:00
|
|
|
{
|
2019-12-05 15:01:33 +00:00
|
|
|
m_index_buffer_current =
|
|
|
|
m_primitive_table[primitive](m_index_buffer_current, num_vertices, m_base_index);
|
|
|
|
m_base_index += num_vertices;
|
2019-12-05 14:38:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void IndexGenerator::AddExternalIndices(const u16* indices, u32 num_indices, u32 num_vertices)
|
|
|
|
{
|
2019-12-05 15:01:33 +00:00
|
|
|
std::memcpy(m_index_buffer_current, indices, sizeof(u16) * num_indices);
|
|
|
|
m_index_buffer_current += num_indices;
|
|
|
|
m_base_index += num_vertices;
|
2009-09-29 18:27:41 +00:00
|
|
|
}
|
2013-03-22 23:18:35 +00:00
|
|
|
|
2022-07-23 05:47:04 +00:00
|
|
|
u32 IndexGenerator::GetRemainingIndices(OpcodeDecoder::Primitive primitive) const
|
2013-03-22 23:18:35 +00:00
|
|
|
{
|
2023-01-03 03:23:31 +00:00
|
|
|
u32 max_index = UINT16_MAX;
|
2022-07-23 05:47:04 +00:00
|
|
|
|
|
|
|
if (g_Config.UseVSForLinePointExpand() && primitive >= OpcodeDecoder::Primitive::GX_DRAW_LINES)
|
|
|
|
max_index >>= 2;
|
|
|
|
|
2023-01-03 03:23:31 +00:00
|
|
|
// Although we reserve UINT16_MAX for primitive restart, we aren't allowed to use that as an
|
|
|
|
// actual index. But, the maximum number of vertices a game can send is UINT16_MAX, so up to
|
|
|
|
// 0xffff indices will be used by the game. These indices would be 0x0000 through 0xfffe,
|
|
|
|
// and since m_base_index gets incremented for each index used, after that m_base_index
|
|
|
|
// would be 0xffff and no indices remain. If a game uses 0xfffe vertices, assuming m_base_index
|
|
|
|
// started at 0 it would end at 0xfffe and one more index could be used. So, we do not need to
|
|
|
|
// subtract 1 from max_index to correctly reserve one index for primitive restart.
|
|
|
|
//
|
|
|
|
// Pocoyo Racing uses a draw command with 0xffff vertices, which previously caused issues; see
|
|
|
|
// https://bugs.dolphin-emu.org/issues/13136 for details.
|
2019-12-05 15:01:33 +00:00
|
|
|
|
2023-01-03 02:56:25 +00:00
|
|
|
if (m_base_index > max_index) [[unlikely]]
|
|
|
|
{
|
|
|
|
PanicAlertFmt("GetRemainingIndices would overflow; we've already written too many indices? "
|
|
|
|
"base index {} > max index {}",
|
|
|
|
m_base_index, max_index);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return max_index - m_base_index;
|
2013-03-22 23:18:35 +00:00
|
|
|
}
|