i965/fs: Use next_insn_offset rather than nr_insn.
authorMatt Turner <mattst88@gmail.com>
Sun, 18 May 2014 18:16:26 +0000 (11:16 -0700)
committerMatt Turner <mattst88@gmail.com>
Sun, 25 May 2014 06:03:24 +0000 (23:03 -0700)
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs_generator.cpp
src/mesa/drivers/dri/i965/gen8_fs_generator.cpp

index 6cff9b34ef93df27b3755735c8731f4e19702c32..d1d271933c6b3617b340a4aac397ebad7064f405 100644 (file)
@@ -1796,12 +1796,12 @@ fs_generator::generate_assembly(exec_list *simd8_instructions,
 
    if (simd16_instructions) {
       /* align to 64 byte boundary. */
-      while ((p->nr_insn * sizeof(struct brw_instruction)) % 64) {
+      while (p->next_insn_offset % 64) {
          brw_NOP(p);
       }
 
       /* Save off the start of this SIMD16 program */
-      prog_data->prog_offset_16 = p->nr_insn * sizeof(struct brw_instruction);
+      prog_data->prog_offset_16 = p->next_insn_offset;
 
       brw_set_compression_control(p, BRW_COMPRESSION_COMPRESSED);
 
index aec9421e853575ff70808d3239ba6189d70fe952..bab1208a217674391ffe8085d7b1cf4fb0eb949d 100644 (file)
@@ -1284,11 +1284,11 @@ gen8_fs_generator::generate_assembly(exec_list *simd8_instructions,
 
    if (simd16_instructions) {
       /* Align to a 64-byte boundary. */
-      while ((nr_inst * sizeof(gen8_instruction)) % 64)
+      while (next_inst_offset % 64)
          NOP();
 
       /* Save off the start of this SIMD16 program */
-      prog_data->prog_offset_16 = nr_inst * sizeof(gen8_instruction);
+      prog_data->prog_offset_16 = next_inst_offset;
 
       struct annotation_info annotation;
       memset(&annotation, 0, sizeof(annotation));