i965: Fix sampler message descriptor on Ivybridge.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 29 Apr 2011 08:43:10 +0000 (01:43 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 May 2011 06:33:01 +0000 (23:33 -0700)
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_structs.h

index 528b907520eec0c9ea30db6a2b6529ee5399a349..cff6bcad7fd2a7555ca99d70e0c7daeeb37151d7 100644 (file)
@@ -655,7 +655,17 @@ static void brw_set_sampler_message(struct brw_compile *p,
    assert(eot == 0);
    brw_set_src1(p, insn, brw_imm_d(0));
 
-   if (intel->gen >= 5) {
+   if (intel->gen >= 7) {
+      insn->bits3.sampler_gen7.binding_table_index = binding_table_index;
+      insn->bits3.sampler_gen7.sampler = sampler;
+      insn->bits3.sampler_gen7.msg_type = msg_type;
+      insn->bits3.sampler_gen7.simd_mode = simd_mode;
+      insn->bits3.sampler_gen7.header_present = header_present;
+      insn->bits3.sampler_gen7.response_length = response_length;
+      insn->bits3.sampler_gen7.msg_length = msg_length;
+      insn->bits3.sampler_gen7.end_of_thread = eot;
+      insn->header.destreg__conditionalmod = BRW_MESSAGE_TARGET_SAMPLER;
+   } else if (intel->gen >= 5) {
       insn->bits3.sampler_gen5.binding_table_index = binding_table_index;
       insn->bits3.sampler_gen5.sampler = sampler;
       insn->bits3.sampler_gen5.msg_type = msg_type;
index bcc5ad4b1e67c99f64a789d0d52601dc5d381981..a63df37def2e6739502c33a933d4d93e924fa81c 100644 (file)
@@ -1744,6 +1744,18 @@ struct brw_instruction
         GLuint end_of_thread:1;
       } sampler_gen5;
 
+      struct {
+        GLuint binding_table_index:8;
+        GLuint sampler:4;
+        GLuint msg_type:5;
+        GLuint simd_mode:2;
+        GLuint header_present:1;
+        GLuint response_length:5;
+        GLuint msg_length:4;
+        GLuint pad1:2;
+        GLuint end_of_thread:1;
+      } sampler_gen7;
+
       struct brw_urb_immediate urb;
 
       struct {