Experimenting with index ranges. Look unused by d3d :(

This commit is contained in:
Ben Vanik 2015-01-02 18:21:39 -08:00
parent 5236477043
commit 79179c28ef
2 changed files with 10 additions and 1 deletions

View File

@ -1311,8 +1311,15 @@ void CommandProcessor::PrepareDraw(DrawCommand* draw_command) {
cmd.index_count = 0;
cmd.index_buffer.address = nullptr;
// Generic stuff.
// Starting index when drawing indexed.
cmd.start_index = regs[XE_GPU_REG_VGT_INDX_OFFSET].u32;
// Min/max index ranges. This is often [0,FFFF|FFFFFF], but if it's not we
// can use it to do a glDrawRangeElements.
cmd.min_index = regs[XE_GPU_REG_VGT_MIN_VTX_INDX].u32;
cmd.max_index = regs[XE_GPU_REG_VGT_MAX_VTX_INDX].u32;
// ?
cmd.base_vertex = 0;
cmd.state_data = nullptr;

View File

@ -79,6 +79,8 @@ static_assert(sizeof(UniformDataBlock) <= 16 * 1024,
struct DrawCommand {
PrimitiveType prim_type;
uint32_t start_index;
uint32_t min_index;
uint32_t max_index;
uint32_t index_count;
uint32_t base_vertex;