diff options
author | Kenneth Graunke <[email protected]> | 2011-04-29 01:43:10 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-05-17 23:33:01 -0700 |
commit | 36f8de02e71ee5c2ca55d86c486eb00d043ae1f5 (patch) | |
tree | f21108945834fd42cfa5a63b4c0638ab114770df /src | |
parent | 3f44043da37bcd0c481ceddf4f878ddb3419b763 (diff) |
i965: Fix sampler message descriptor on Ivybridge.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_emit.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_structs.h | 12 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c index 528b907520e..cff6bcad7fd 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c @@ -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; diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index bcc5ad4b1e6..a63df37def2 100644 --- a/src/mesa/drivers/dri/i965/brw_structs.h +++ b/src/mesa/drivers/dri/i965/brw_structs.h @@ -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 { |