Merge remote branch 'origin/master' into pipe-video
[mesa.git] / src / gallium / drivers / i965 / brw_wm.h
index 28d216260e52d363a1b2c97efa637fba3b08ff38..f1ca9f6369661f18d8619b41391bb147399ad2ff 100644 (file)
@@ -129,22 +129,18 @@ struct brw_wm_ref {
    GLuint insn:24;
 };
 
-struct brw_wm_imm_ref {
-   const struct brw_wm_ref *ref;
-   GLfloat imm1f;
-};
-
-
 struct brw_wm_instruction {
    struct brw_wm_value *dst[4];
    struct brw_wm_ref *src[3][4];
    GLuint opcode:8;
    GLuint saturate:1;
    GLuint writemask:4;
+   GLuint sampler:4;
    GLuint tex_unit:4;   /* texture/sampler unit for texture instructions */
-   GLuint tex_target:4; /* TGSI_TEXTURE_x for texture instructions*/
+   GLuint target:4;     /* TGSI_TEXTURE_x for texture instructions,
+                         * target binding table index for FB_WRITE
+                         */
    GLuint eot:1;       /* End of thread indicator for FB_WRITE*/
-   GLuint target:10;    /* target binding table index for FB_WRITE*/
 };
 
 
@@ -181,7 +177,6 @@ struct brw_wm_instruction {
 #define Y    1
 #define Z    2
 #define W    3
-#define GET_SWZ(swz, comp) (((swz) >> ((comp)*2)) & 0x3)
 
 
 struct brw_fp_src {
@@ -205,10 +200,10 @@ struct brw_fp_instruction {
    struct brw_fp_dst dst;
    struct brw_fp_src src[3];
    unsigned opcode:8;
+   unsigned target:8; /* XXX: special usage for FB_WRITE */
    unsigned tex_unit:4;
-   unsigned tex_target:4;
-   unsigned target:10;         /* destination surface for FB_WRITE */
-   unsigned eot:1;             /* mark last instruction (usually FB_WRITE) */
+   unsigned sampler:4;
+   unsigned pad:8;
 };
 
 
@@ -273,9 +268,6 @@ struct brw_wm_compile {
    struct brw_wm_instruction instruction[BRW_WM_MAX_INSN];
    GLuint nr_insns;
 
-   struct brw_wm_imm_ref imm_ref[BRW_WM_MAX_CONST];
-   GLuint nr_imm_refs;
-
    struct brw_wm_grf pass2_grf[BRW_WM_MAX_GRF/2];
 
    GLuint grf_limit;
@@ -333,6 +325,9 @@ void brw_wm_print_insn( struct brw_wm_compile *c,
 void brw_wm_print_program( struct brw_wm_compile *c,
                           const char *stage );
 
+void brw_wm_print_fp_program( struct brw_wm_compile *c,
+                              const char *stage );
+
 void brw_wm_lookup_iz( GLuint line_aa,
                       GLuint lookup,
                       GLboolean ps_uses_depth,