r600g: Replace the CHIPREV_* defines with the chip_class enum.
[mesa.git] / src / gallium / drivers / r600 / r600_asm.h
index 570292e9fdc9e44ad2f325235c558dcc57753bca..423e94b8a1df709e476c54d2e692bc14ac0a85b4 100644 (file)
@@ -34,6 +34,7 @@ struct r600_bc_alu_src {
        unsigned                        neg;
        unsigned                        abs;
        unsigned                        rel;
+       uint32_t                        value;
 };
 
 struct r600_bc_alu_dst {
@@ -52,11 +53,8 @@ struct r600_bc_alu {
        unsigned                        last;
        unsigned                        is_op3;
        unsigned                        predicate;
-       unsigned                        nliteral;
-       unsigned                        literal_added;
        unsigned                        bank_swizzle;
        unsigned                        bank_swizzle_force;
-       u32                             value[4];
        unsigned                        omod;
 };
 
@@ -105,6 +103,8 @@ struct r600_bc_vtx {
        unsigned                        num_format_all;
        unsigned                        format_comp_all;
        unsigned                        srf_mode_all;
+       unsigned                        offset;
+       unsigned                        endian;
 };
 
 struct r600_bc_output {
@@ -118,6 +118,7 @@ struct r600_bc_output {
        unsigned                        swizzle_y;
        unsigned                        swizzle_z;
        unsigned                        swizzle_w;
+       unsigned                        burst_count;
        unsigned                        barrier;
 };
 
@@ -171,7 +172,7 @@ struct r600_cf_callstack {
 
 struct r600_bc {
        enum radeon_family              family;
-       int                             chiprev; /* 0 - r600, 1 - r700, 2 - evergreen */
+       enum chip_class                 chip_class;
        int                             type;
        struct list_head                cf;
        struct r600_bc_cf               *cf_last;
@@ -190,26 +191,26 @@ struct r600_bc {
 
 /* eg_asm.c */
 int eg_bc_cf_build(struct r600_bc *bc, struct r600_bc_cf *cf);
-void eg_cf_vtx(struct r600_vertex_element *ve, u32 *bytecode, unsigned count);
 
 /* r600_asm.c */
 int r600_bc_init(struct r600_bc *bc, enum radeon_family family);
 void r600_bc_clear(struct r600_bc *bc);
 int r600_bc_add_alu(struct r600_bc *bc, const struct r600_bc_alu *alu);
-int r600_bc_add_literal(struct r600_bc *bc, const u32 *value);
 int r600_bc_add_vtx(struct r600_bc *bc, const struct r600_bc_vtx *vtx);
 int r600_bc_add_tex(struct r600_bc *bc, const struct r600_bc_tex *tex);
 int r600_bc_add_output(struct r600_bc *bc, const struct r600_bc_output *output);
 int r600_bc_build(struct r600_bc *bc);
 int r600_bc_add_cfinst(struct r600_bc *bc, int inst);
 int r600_bc_add_alu_type(struct r600_bc *bc, const struct r600_bc_alu *alu, int type);
+void r600_bc_special_constants(u32 value, unsigned *sel, unsigned *neg);
 void r600_bc_dump(struct r600_bc *bc);
-void r600_cf_vtx(struct r600_vertex_element *ve, u32 *bytecode, unsigned count);
-void r600_cf_vtx_tc(struct r600_vertex_element *ve, u32 *bytecode, unsigned count);
+
+int cm_bc_add_cf_end(struct r600_bc *bc);
 
 int r600_vertex_elements_build_fetch_shader(struct r600_pipe_context *rctx, struct r600_vertex_element *ve);
 
 /* r700_asm.c */
+void r700_bc_cf_vtx_build(uint32_t *bytecode, const struct r600_bc_cf *cf);
 int r700_bc_alu_build(struct r600_bc *bc, struct r600_bc_alu *alu, unsigned id);
 
 #endif