i965: Add a header_present flag for setting up dp read messages.
authorEric Anholt <eric@anholt.net>
Fri, 9 Nov 2012 19:17:48 +0000 (11:17 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 5 Dec 2012 00:27:53 +0000 (16:27 -0800)
As of gen7, we can skip the header on some messages, and this can make
optimization on those messages much nicer when you've got GRFs instead of MRFs
as the source.

src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_vec4_emit.cpp

index fce4f15fbabe3a6d4b2be8cf20573866f6b8888d..8c3a634e2ccfa013e123b0e741dd7be78b607fc8 100644 (file)
@@ -907,6 +907,7 @@ void brw_set_dp_read_message(struct brw_compile *p,
                             GLuint msg_type,
                             GLuint target_cache,
                             GLuint msg_length,
+                             bool header_present,
                             GLuint response_length);
 
 void brw_set_dp_write_message(struct brw_compile *p,
index 72fb5c5ae2c8b8f0af83f96b608c0923c847577f..8a629ff0b406c74227520962cd6279dc00f2d828 100644 (file)
@@ -620,6 +620,7 @@ brw_set_dp_read_message(struct brw_compile *p,
                        GLuint msg_type,
                        GLuint target_cache,
                        GLuint msg_length,
+                        bool header_present,
                        GLuint response_length)
 {
    struct brw_context *brw = p->brw;
@@ -638,7 +639,7 @@ brw_set_dp_read_message(struct brw_compile *p,
    }
 
    brw_set_message_descriptor(p, insn, sfid, msg_length, response_length,
-                             true, false);
+                             header_present, false);
 
    if (intel->gen >= 7) {
       insn->bits3.gen7_dp.binding_table_index = binding_table_index;
@@ -1967,6 +1968,7 @@ brw_oword_block_read_scratch(struct brw_compile *p,
                              BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ, /* msg_type */
                              BRW_DATAPORT_READ_TARGET_RENDER_CACHE,
                              1, /* msg_length */
+                              true, /* header_present */
                              rlen);
    }
 }
@@ -2024,6 +2026,7 @@ void brw_oword_block_read(struct brw_compile *p,
                           BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ,
                           BRW_DATAPORT_READ_TARGET_DATA_CACHE,
                           1, /* msg_length */
+                           true, /* header_present */
                           1); /* response_length (1 reg, 2 owords!) */
 
    brw_pop_insn_state(p);
index 5637b220672330953b7eca11a72d9807e2c23db6..7609d92a72ff783b42b97f6fa985a71b8329fad8 100644 (file)
@@ -463,6 +463,7 @@ vec4_generator::generate_scratch_read(vec4_instruction *inst,
                           msg_type,
                           BRW_DATAPORT_READ_TARGET_RENDER_CACHE,
                           2, /* mlen */
+                           true, /* header_present */
                           1 /* rlen */);
 }
 
@@ -596,6 +597,7 @@ vec4_generator::generate_pull_constant_load(vec4_instruction *inst,
                           msg_type,
                           BRW_DATAPORT_READ_TARGET_DATA_CACHE,
                           2, /* mlen */
+                           true, /* header_present */
                           1 /* rlen */);
 }