diff options
author | Matt Turner <[email protected]> | 2014-05-25 14:59:06 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-06-02 15:17:30 -0700 |
commit | 328e9593173bc69352e1707f119a7aca9d540cf9 (patch) | |
tree | c2b6e727fa97793d4476e1169f5cd5ed0a55d0bf | |
parent | 757d7ddf01db694c51c63ea260510d89febea18a (diff) |
i965/gen8: Print number of instructions directly.
Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/gen8_fs_generator.cpp | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp index 3703368e5f5..6d455a3af60 100644 --- a/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp +++ b/src/mesa/drivers/dri/i965/gen8_fs_generator.cpp @@ -886,6 +886,8 @@ gen8_fs_generator::generate_untyped_surface_read(fs_inst *ir, void gen8_fs_generator::generate_code(exec_list *instructions) { + int start_offset = next_inst_offset; + struct annotation_info annotation; memset(&annotation, 0, sizeof(annotation)); @@ -1250,6 +1252,8 @@ gen8_fs_generator::generate_code(exec_list *instructions) patch_jump_targets(); annotation_finalize(&annotation, next_inst_offset); + int before_size = next_inst_offset - start_offset; + if (unlikely(INTEL_DEBUG & DEBUG_WM)) { if (prog) { fprintf(stderr, @@ -1264,6 +1268,8 @@ gen8_fs_generator::generate_code(exec_list *instructions) fprintf(stderr, "Native code for blorp program (SIMD%d dispatch):\n", dispatch_width); } + fprintf(stderr, "SIMD%d shader: %d instructions.\n", + dispatch_width, before_size / 16); dump_assembly(store, annotation.ann_count, annotation.ann, brw, prog, gen8_disassemble); diff --git a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp index c319ed5c099..14070cd1368 100644 --- a/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp +++ b/src/mesa/drivers/dri/i965/gen8_vec4_generator.cpp @@ -886,6 +886,8 @@ gen8_vec4_generator::generate_code(exec_list *instructions) patch_jump_targets(); annotation_finalize(&annotation, next_inst_offset); + int before_size = next_inst_offset; + if (unlikely(debug_flag)) { if (shader_prog) { fprintf(stderr, "Native code for %s vertex shader %d:\n", @@ -894,6 +896,7 @@ gen8_vec4_generator::generate_code(exec_list *instructions) } else { fprintf(stderr, "Native code for vertex program %d:\n", prog->Id); } + fprintf(stderr, "vec4 shader: %d instructions.\n", before_size / 16); dump_assembly(store, annotation.ann_count, annotation.ann, brw, prog, gen8_disassemble); |