Commit d19d4362 authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

Merge branch 'TimeInterlace'

parents ed9fabe2 9466e2d7
...@@ -1834,6 +1834,8 @@ void icetSparseImageInterlace(const IceTSparseImage in_image, ...@@ -1834,6 +1834,8 @@ void icetSparseImageInterlace(const IceTSparseImage in_image,
return; return;
} }
icetTimingInterlaceBegin();
pixel_size = colorPixelSize(color_format) + depthPixelSize(depth_format); pixel_size = colorPixelSize(color_format) + depthPixelSize(depth_format);
{ {
...@@ -1924,6 +1926,8 @@ void icetSparseImageInterlace(const IceTSparseImage in_image, ...@@ -1924,6 +1926,8 @@ void icetSparseImageInterlace(const IceTSparseImage in_image,
} }
icetSparseImageSetActualSize(out_image, out_data); icetSparseImageSetActualSize(out_image, out_data);
icetTimingInterlaceEnd();
} }
IceTSizeType icetGetInterlaceOffset(IceTInt partition_index, IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
...@@ -1941,6 +1945,8 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index, ...@@ -1941,6 +1945,8 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
return 0; return 0;
} }
icetTimingInterlaceBegin();
lower_partition_size = original_image_size/eventual_num_partitions; lower_partition_size = original_image_size/eventual_num_partitions;
remaining_pixels = original_image_size%eventual_num_partitions; remaining_pixels = original_image_size%eventual_num_partitions;
...@@ -1960,6 +1966,7 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index, ...@@ -1960,6 +1966,7 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
if (interlaced_partition_idx == partition_index) { if (interlaced_partition_idx == partition_index) {
/* Found any partitions before this one. */ /* Found any partitions before this one. */
icetTimingInterlaceEnd();
return offset; return offset;
} }
...@@ -1973,6 +1980,7 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index, ...@@ -1973,6 +1980,7 @@ IceTSizeType icetGetInterlaceOffset(IceTInt partition_index,
/* Should never get here. */ /* Should never get here. */
icetRaiseError("Could not find partition index.", ICET_SANITY_CHECK_FAIL); icetRaiseError("Could not find partition index.", ICET_SANITY_CHECK_FAIL);
icetTimingInterlaceEnd();
return 0; return 0;
} }
......
...@@ -34,6 +34,7 @@ void icetStateResetTiming(void) ...@@ -34,6 +34,7 @@ void icetStateResetTiming(void)
icetStateSetDouble(ICET_BUFFER_READ_TIME, 0.0); icetStateSetDouble(ICET_BUFFER_READ_TIME, 0.0);
icetStateSetDouble(ICET_BUFFER_WRITE_TIME, 0.0); icetStateSetDouble(ICET_BUFFER_WRITE_TIME, 0.0);
icetStateSetDouble(ICET_COMPRESS_TIME, 0.0); icetStateSetDouble(ICET_COMPRESS_TIME, 0.0);
icetStateSetDouble(ICET_INTERLACE_TIME, 0.0);
icetStateSetDouble(ICET_BLEND_TIME, 0.0); icetStateSetDouble(ICET_BLEND_TIME, 0.0);
icetStateSetDouble(ICET_COMPOSITE_TIME, 0.0); icetStateSetDouble(ICET_COMPOSITE_TIME, 0.0);
icetStateSetDouble(ICET_COLLECT_TIME, 0.0); icetStateSetDouble(ICET_COLLECT_TIME, 0.0);
...@@ -103,7 +104,8 @@ static void icetTimingEnd(IceTEnum start_pname, ...@@ -103,7 +104,8 @@ static void icetTimingEnd(IceTEnum start_pname,
IceTDouble old_time; IceTDouble old_time;
icetGetDoublev(start_pname, &start_time); icetGetDoublev(start_pname, &start_time);
icetGetDoublev(result_pname, &old_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) ...@@ -167,6 +169,21 @@ void icetTimingCompressEnd(void)
"compress"); "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) void icetTimingBlendBegin(void)
{ {
icetTimingBegin(ICET_SUBFUNC_START_TIME, icetTimingBegin(ICET_SUBFUNC_START_TIME,
......
...@@ -336,12 +336,13 @@ ICET_EXPORT void icetDiagnostics(IceTBitField mask); ...@@ -336,12 +336,13 @@ ICET_EXPORT void icetDiagnostics(IceTBitField mask);
#define ICET_BUFFER_READ_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0002) #define ICET_BUFFER_READ_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0002)
#define ICET_BUFFER_WRITE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0003) #define ICET_BUFFER_WRITE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0003)
#define ICET_COMPRESS_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0004) #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_BLEND_TIME ICET_COMPARE_TIME
#define ICET_COMPOSITE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0006) #define ICET_COMPOSITE_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0007)
#define ICET_COLLECT_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)0x0008) #define ICET_TOTAL_DRAW_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0009)
#define ICET_BYTES_SENT (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_START_TIME (ICET_STATE_TIMING_START | (IceTEnum)0x0010)
#define ICET_DRAW_TIME_ID (ICET_STATE_TIMING_START | (IceTEnum)0x0011) #define ICET_DRAW_TIME_ID (ICET_STATE_TIMING_START | (IceTEnum)0x0011)
......
...@@ -32,6 +32,9 @@ ICET_EXPORT void icetTimingBufferWriteEnd(void); ...@@ -32,6 +32,9 @@ ICET_EXPORT void icetTimingBufferWriteEnd(void);
ICET_EXPORT void icetTimingCompressBegin(void); ICET_EXPORT void icetTimingCompressBegin(void);
ICET_EXPORT void icetTimingCompressEnd(void); ICET_EXPORT void icetTimingCompressEnd(void);
ICET_EXPORT void icetTimingInterlaceBegin(void);
ICET_EXPORT void icetTimingInterlaceEnd(void);
ICET_EXPORT void icetTimingBlendBegin(void); ICET_EXPORT void icetTimingBlendBegin(void);
ICET_EXPORT void icetTimingBlendEnd(void); ICET_EXPORT void icetTimingBlendEnd(void);
......
...@@ -55,6 +55,7 @@ typedef struct { ...@@ -55,6 +55,7 @@ typedef struct {
IceTDouble buffer_read_time; IceTDouble buffer_read_time;
IceTDouble buffer_write_time; IceTDouble buffer_write_time;
IceTDouble compress_time; IceTDouble compress_time;
IceTDouble interlace_time;
IceTDouble blend_time; IceTDouble blend_time;
IceTDouble draw_time; IceTDouble draw_time;
IceTDouble composite_time; IceTDouble composite_time;
...@@ -826,7 +827,7 @@ static void SimpleTimingCollectAndPrintLog() ...@@ -826,7 +827,7 @@ static void SimpleTimingCollectAndPrintLog()
for (log_index = 0; log_index < total_logs; log_index++) { for (log_index = 0; log_index < total_logs; log_index++) {
timings_type *timing = all_logs + log_index; timings_type *timing = all_logs + log_index;
printf("LOG,%d,%s,%s,%d,%d,%d,%d,%s,%s,%s,%d,%d,%lg,%lg,%lg,%lg,%lg,%lg,%lg,%lg,%ld,%lg\n", printf("LOG,%d,%s,%s,%d,%d,%d,%d,%s,%s,%s,%d,%d,%lg,%lg,%lg,%lg,%lg,%lg,%lg,%lg,%lg,%ld,%lg\n",
timing->num_proc, timing->num_proc,
timing->strategy_name, timing->strategy_name,
timing->si_strategy_name, timing->si_strategy_name,
...@@ -843,6 +844,7 @@ static void SimpleTimingCollectAndPrintLog() ...@@ -843,6 +844,7 @@ static void SimpleTimingCollectAndPrintLog()
timing->buffer_read_time, timing->buffer_read_time,
timing->buffer_write_time, timing->buffer_write_time,
timing->compress_time, timing->compress_time,
timing->interlace_time,
timing->blend_time, timing->blend_time,
timing->draw_time, timing->draw_time,
timing->composite_time, timing->composite_time,
...@@ -1160,6 +1162,8 @@ static int SimpleTimingDoRender() ...@@ -1160,6 +1162,8 @@ static int SimpleTimingDoRender()
&timing_array[frame].buffer_write_time); &timing_array[frame].buffer_write_time);
icetGetDoublev(ICET_COMPRESS_TIME, icetGetDoublev(ICET_COMPRESS_TIME,
&timing_array[frame].compress_time); &timing_array[frame].compress_time);
icetGetDoublev(ICET_INTERLACE_TIME,
&timing_array[frame].interlace_time);
icetGetDoublev(ICET_BLEND_TIME, icetGetDoublev(ICET_BLEND_TIME,
&timing_array[frame].blend_time); &timing_array[frame].blend_time);
icetGetDoublev(ICET_TOTAL_DRAW_TIME, icetGetDoublev(ICET_TOTAL_DRAW_TIME,
...@@ -1219,6 +1223,7 @@ static int SimpleTimingDoRender() ...@@ -1219,6 +1223,7 @@ static int SimpleTimingDoRender()
UPDATE_MAX(buffer_read_time); UPDATE_MAX(buffer_read_time);
UPDATE_MAX(buffer_write_time); UPDATE_MAX(buffer_write_time);
UPDATE_MAX(compress_time); UPDATE_MAX(compress_time);
UPDATE_MAX(interlace_time);
UPDATE_MAX(blend_time); UPDATE_MAX(blend_time);
UPDATE_MAX(draw_time); UPDATE_MAX(draw_time);
UPDATE_MAX(composite_time); UPDATE_MAX(composite_time);
...@@ -1585,6 +1590,7 @@ int SimpleTimingRun() ...@@ -1585,6 +1590,7 @@ int SimpleTimingRun()
"buffer read time," "buffer read time,"
"buffer write time," "buffer write time,"
"compress time," "compress time,"
"interlace time,"
"blend time," "blend time,"
"draw time," "draw time,"
"composite time," "composite time,"
......
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