Add support for sample (00000) on Ivybridge

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
This commit is contained in:
Xiang, Haihao 2011-05-23 13:45:04 +08:00 committed by Damien Lespiau
parent c8d6bf353e
commit 67d4ed665d
2 changed files with 19 additions and 1 deletions

View File

@ -1389,6 +1389,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 {
GLuint binding_table_index:8;
GLuint msg_control:4;

View File

@ -951,7 +951,13 @@ msgtarget: NULL_TOKEN
| SAMPLER LPAREN INTEGER COMMA INTEGER COMMA
sampler_datatype RPAREN
{
if (gen_level >= 5) {
if (gen_level >= 7) {
$$.bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_SAMPLER;
$$.bits3.generic_gen5.header_present = 1; /* ??? */
$$.bits3.sampler_gen7.binding_table_index = $3;
$$.bits3.sampler_gen7.sampler = $5;
$$.bits3.sampler_gen7.simd_mode = 2; /* SIMD16, maybe we should add a new parameter */
} else if (gen_level >= 5) {
$$.bits2.send_gen5.sfid = BRW_MESSAGE_TARGET_SAMPLER;
$$.bits3.generic_gen5.header_present = 1; /* ??? */
$$.bits3.sampler_gen5.binding_table_index = $3;