Commit 807d0338 authored by Kenneth Moreland's avatar Kenneth Moreland

Add timing for image interlace.

parent ed9fabe2
......@@ -1834,6 +1834,8 @@ void icetSparseImageInterlace(const IceTSparseImage in_image,
return;
}
icetTimingInterlaceBegin();
pixel_size = colorPixelSize(color_format) + depthPixelSize(depth_format);
{
......@@ -1924,6 +1926,8 @@ void icetSparseImageInterlace(const IceTSparseImage in_image,
}
icetSparseImageSetActualSize(out_image, out_data);
icetTimingInterlaceEnd();
}
IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
......@@ -1941,6 +1945,8 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
return 0;
}
icetTimingInterlaceBegin();
lower_partition_size = original_image_size/eventual_num_partitions;
remaining_pixels = original_image_size%eventual_num_partitions;
......@@ -1960,6 +1966,7 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
if (interlaced_partition_idx == partition_index) {
/* Found any partitions before this one. */
icetTimingInterlaceEnd();
return offset;
}
......@@ -1973,6 +1980,7 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
/* Should never get here. */
icetRaiseError("Could not find partition index.", ICET_SANITY_CHECK_FAIL);
icetTimingInterlaceEnd();
return 0;
}
......
......@@ -34,6 +34,7 @@ void icetStateResetTiming(void)
icetStateSetDouble(ICET_BUFFER_READ_TIME, 0.0);
icetStateSetDouble(ICET_BUFFER_WRITE_TIME, 0.0);
icetStateSetDouble(ICET_COMPRESS_TIME, 0.0);
icetStateSetDouble(ICET_INTERLACE_TIME, 0.0);
icetStateSetDouble(ICET_BLEND_TIME, 0.0);
icetStateSetDouble(ICET_COMPOSITE_TIME, 0.0);
icetStateSetDouble(ICET_COLLECT_TIME, 0.0);
......@@ -103,7 +104,8 @@ static void icetTimingEnd(IceTEnum start_pname,
IceTDouble old_time;
icetGetDoublev(start_pname, &start_time);
icetGetDoublev(result_pname, &old_time);
icetStateSetDouble(result_pname, icetWallTime() - start_time);
icetStateSetDouble(result_pname,
old_time + (icetWallTime() - start_time));
}
}
......@@ -167,6 +169,21 @@ void icetTimingCompressEnd(void)
"compress");
}
void icetTimingInterlaceBegin(void)
{
icetTimingBegin(ICET_SUBFUNC_START_TIME,
ICET_SUBFUNC_TIME_ID,
ICET_INTERLACE_TIME,
"interlace");
}
void icetTimingInterlaceEnd(void)
{
icetTimingEnd(ICET_SUBFUNC_START_TIME,
ICET_SUBFUNC_TIME_ID,
ICET_INTERLACE_TIME,
"interlace");
}
void icetTimingBlendBegin(void)
{
icetTimingBegin(ICET_SUBFUNC_START_TIME,
......
......@@ -336,12 +336,13 @@ ICET_EXPORT void icetDiagnostics(IceTBitField mask);
#define ICET_BUFFER_READ_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0002)
#define ICET_BUFFER_WRITE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0003)
#define ICET_COMPRESS_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0004)
#define ICET_COMPARE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0005)
#define ICET_INTERLACE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0005)
#define ICET_COMPARE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0006)
#define ICET_BLEND_TIME ICET_COMPARE_TIME
#define ICET_COMPOSITE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0006)
#define ICET_COLLECT_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0007)
#define ICET_TOTAL_DRAW_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0008)
#define ICET_BYTES_SENT (ICET_STATE_TIMING_START | (IceTEnum)0x0009)
#define ICET_COMPOSITE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0007)
#define ICET_COLLECT_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0008)
#define ICET_TOTAL_DRAW_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0009)
#define ICET_BYTES_SENT (ICET_STATE_TIMING_START | (IceTEnum)0x000A)
#define ICET_DRAW_START_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0010)
#define ICET_DRAW_TIME_ID (ICET_STATE_TIMING_START | (IceTEnum)0x0011)
......
......@@ -32,6 +32,9 @@ ICET_EXPORT void icetTimingBufferWriteEnd(void);
ICET_EXPORT void icetTimingCompressBegin(void);
ICET_EXPORT void icetTimingCompressEnd(void);
ICET_EXPORT void icetTimingInterlaceBegin(void);
ICET_EXPORT void icetTimingInterlaceEnd(void);
ICET_EXPORT void icetTimingBlendBegin(void);
ICET_EXPORT void icetTimingBlendEnd(void);
......
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