i965: Rename pixel_scoreboard_clear to last_render_target for clarity.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 8 Oct 2011 05:26:40 +0000 (22:26 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 18 Oct 2011 22:57:55 +0000 (15:57 -0700)
Finding this bit in the documentation proved challenging.  It wasn't in
the SEND instruction's message descriptor section, nor the data port
message descriptor section.  It turns out to be part of the Render
Target Write message's control bits, and in the documentation is named
"Last Render Target Select".

Shaders that use Multiple Render Targets should set this bit on the last
RT write, but not on any prior ones.

The GPU does update the Pixel Scoreboard appropriately, but doesn't
document this bit as directly causing a scoreboard clear.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_disasm.c
src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_structs.h
src/mesa/drivers/dri/i965/brw_vec4_emit.cpp

index a010cd727b79b8b0e159276961395625c5d8c045..1dd6b4b8f4f1b69f20506d46788c7ce32106b418 100644 (file)
@@ -1036,7 +1036,7 @@ int brw_disasm (FILE *file, struct brw_instruction *inst, int gen)
            } else {
                format (file, " (%d, %d, %d, %d)",
                        inst->bits3.dp_write.binding_table_index,
-                       (inst->bits3.dp_write.pixel_scoreboard_clear << 3) |
+                       (inst->bits3.dp_write.last_render_target << 3) |
                        inst->bits3.dp_write.msg_control,
                        inst->bits3.dp_write.msg_type,
                        inst->bits3.dp_write.send_commit_msg);
index 2f353b9003880971568e554cde62fc171a2f9bef..33492f6966d11f05158b761c27ab0d5d1d41201b 100644 (file)
@@ -881,7 +881,7 @@ void brw_set_dp_write_message(struct brw_compile *p,
                              GLuint msg_type,
                              GLuint msg_length,
                              bool header_present,
-                             GLuint pixel_scoreboard_clear,
+                             GLuint last_render_target,
                              GLuint response_length,
                              GLuint end_of_thread,
                              GLuint send_commit_msg);
index 078e289d35b91081d2299bdcb287e8aa8f3fb551..5574df8ff3b6b7eb6f6fff52372e887045df51f9 100644 (file)
@@ -537,7 +537,7 @@ brw_set_dp_write_message(struct brw_compile *p,
                         GLuint msg_type,
                         GLuint msg_length,
                         bool header_present,
-                        GLuint pixel_scoreboard_clear,
+                        GLuint last_render_target,
                         GLuint response_length,
                         GLuint end_of_thread,
                         GLuint send_commit_msg)
@@ -565,24 +565,24 @@ brw_set_dp_write_message(struct brw_compile *p,
    if (intel->gen >= 7) {
       insn->bits3.gen7_dp.binding_table_index = binding_table_index;
       insn->bits3.gen7_dp.msg_control = msg_control;
-      insn->bits3.gen7_dp.pixel_scoreboard_clear = pixel_scoreboard_clear;
+      insn->bits3.gen7_dp.last_render_target = last_render_target;
       insn->bits3.gen7_dp.msg_type = msg_type;
    } else if (intel->gen == 6) {
       insn->bits3.gen6_dp.binding_table_index = binding_table_index;
       insn->bits3.gen6_dp.msg_control = msg_control;
-      insn->bits3.gen6_dp.pixel_scoreboard_clear = pixel_scoreboard_clear;
+      insn->bits3.gen6_dp.last_render_target = last_render_target;
       insn->bits3.gen6_dp.msg_type = msg_type;
       insn->bits3.gen6_dp.send_commit_msg = send_commit_msg;
    } else if (intel->gen == 5) {
       insn->bits3.dp_write_gen5.binding_table_index = binding_table_index;
       insn->bits3.dp_write_gen5.msg_control = msg_control;
-      insn->bits3.dp_write_gen5.pixel_scoreboard_clear = pixel_scoreboard_clear;
+      insn->bits3.dp_write_gen5.last_render_target = last_render_target;
       insn->bits3.dp_write_gen5.msg_type = msg_type;
       insn->bits3.dp_write_gen5.send_commit_msg = send_commit_msg;
    } else {
       insn->bits3.dp_write.binding_table_index = binding_table_index;
       insn->bits3.dp_write.msg_control = msg_control;
-      insn->bits3.dp_write.pixel_scoreboard_clear = pixel_scoreboard_clear;
+      insn->bits3.dp_write.last_render_target = last_render_target;
       insn->bits3.dp_write.msg_type = msg_type;
       insn->bits3.dp_write.send_commit_msg = send_commit_msg;
    }
@@ -619,12 +619,12 @@ brw_set_dp_read_message(struct brw_compile *p,
    if (intel->gen >= 7) {
       insn->bits3.gen7_dp.binding_table_index = binding_table_index;
       insn->bits3.gen7_dp.msg_control = msg_control;
-      insn->bits3.gen7_dp.pixel_scoreboard_clear = 0;
+      insn->bits3.gen7_dp.last_render_target = 0;
       insn->bits3.gen7_dp.msg_type = msg_type;
    } else if (intel->gen == 6) {
       insn->bits3.gen6_dp.binding_table_index = binding_table_index;
       insn->bits3.gen6_dp.msg_control = msg_control;
-      insn->bits3.gen6_dp.pixel_scoreboard_clear = 0;
+      insn->bits3.gen6_dp.last_render_target = 0;
       insn->bits3.gen6_dp.msg_type = msg_type;
       insn->bits3.gen6_dp.send_commit_msg = 0;
    } else if (intel->gen == 5) {
@@ -1714,7 +1714,7 @@ void brw_oword_block_write_scratch(struct brw_compile *p,
                               msg_type,
                               mlen,
                               true, /* header_present */
-                              0, /* pixel scoreboard */
+                              0, /* not a render target */
                               send_commit_msg, /* response_length */
                               0, /* eot */
                               send_commit_msg);
@@ -2059,7 +2059,7 @@ void brw_fb_WRITE(struct brw_compile *p,
                            msg_type,
                            msg_length,
                            header_present,
-                           1,  /* pixel scoreboard */
+                           1, /* last render target write */
                            response_length,
                            eot,
                            0 /* send_commit_msg */);
index b47be698a2728b994f9bc83e123cc6c3b72d40a0..af83511e2b7f76b1e650f2a6a1d9388ce0e6d2fd 100644 (file)
@@ -1314,7 +1314,7 @@ struct brw_instruction
       struct {
         GLuint binding_table_index:8;
         GLuint msg_control:3;
-        GLuint pixel_scoreboard_clear:1;
+        GLuint last_render_target:1;
         GLuint msg_type:3;    
         GLuint send_commit_msg:1;
         GLuint response_length:4;
@@ -1327,7 +1327,7 @@ struct brw_instruction
       struct {
         GLuint binding_table_index:8;
         GLuint msg_control:3;
-        GLuint pixel_scoreboard_clear:1;
+        GLuint last_render_target:1;
         GLuint msg_type:3;    
         GLuint send_commit_msg:1;
         GLuint pad0:3;
@@ -1355,7 +1355,7 @@ struct brw_instruction
         GLuint binding_table_index:8;
         GLuint msg_control:3;
         GLuint slot_group_select:1;
-        GLuint pixel_scoreboard_clear:1;
+        GLuint last_render_target:1;
         GLuint msg_type:4;
         GLuint send_commit_msg:1;
         GLuint pad0:1;
@@ -1371,7 +1371,7 @@ struct brw_instruction
         GLuint binding_table_index:8;
         GLuint msg_control:3;
         GLuint slot_group_select:1;
-        GLuint pixel_scoreboard_clear:1;
+        GLuint last_render_target:1;
         GLuint pad0:1;
         GLuint msg_type:4;
         GLuint pad1:1;
index e93e3193d2a2ac5828e08ac608b6e08d77dcf4fd..73898b787896a27d1fcd2f9d9e687eac60fee922 100644 (file)
@@ -492,7 +492,7 @@ vec4_visitor::generate_scratch_write(vec4_instruction *inst,
                            msg_type,
                            3, /* mlen */
                            true, /* header present */
-                           false, /* pixel scoreboard */
+                           false, /* not a render target write */
                            write_commit, /* rlen */
                            false, /* eot */
                            write_commit);