Merge branch 'mesa_7_6_branch'
[mesa.git] / src / gallium / drivers / nv50 / nv50_program.h
index 78deed6a3843f2eaf06ada5ef6d440157b4ae149..d78dee083f1452cf6ed725c48718ae7364278078 100644 (file)
@@ -15,6 +15,15 @@ struct nv50_program_exec {
        } param;
 };
 
+struct nv50_sreg4 {
+       uint8_t hw;
+       uint8_t id_vp;
+       uint8_t id_fp;
+
+       uint8_t mask;
+       boolean linear;
+};
+
 struct nv50_program {
        struct pipe_shader_state pipe;
        struct tgsi_shader_info info;
@@ -24,10 +33,10 @@ struct nv50_program {
        struct nv50_program_exec *exec_head;
        struct nv50_program_exec *exec_tail;
        unsigned exec_size;
-       struct nouveau_resource *data;
-       unsigned data_start;
+       struct nouveau_resource *data[1];
+       unsigned data_start[1];
 
-       struct pipe_buffer *buffer;
+       struct nouveau_bo *bo;
 
        float *immd;
        unsigned immd_nr;
@@ -36,9 +45,20 @@ struct nv50_program {
        struct {
                unsigned high_temp;
                unsigned high_result;
-               struct {
-                       unsigned attr[2];
-               } vp;
+
+               uint32_t attr[2];
+               uint32_t regs[4];
+
+               /* for VPs, io_nr doesn't count 'private' results (PSIZ etc.) */
+               unsigned io_nr;
+               struct nv50_sreg4 io[PIPE_MAX_SHADER_OUTPUTS];
+
+               /* FP colour inputs, VP/GP back colour outputs */
+               struct nv50_sreg4 two_side[2];
+
+               /* VP only */
+               uint8_t clpd, clpd_nr;
+               uint8_t psiz;
        } cfg;
 };