r600g: add assembler support for other vtx fetch fields.
authorDave Airlie <airlied@redhat.com>
Fri, 1 Oct 2010 01:38:40 +0000 (11:38 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 1 Oct 2010 03:36:56 +0000 (13:36 +1000)
this shouldn't change behaviour, just push the choice of what
to do out to the shader.

src/gallium/drivers/r600/r600_asm.c
src/gallium/drivers/r600/r600_asm.h
src/gallium/drivers/r600/r600_shader.c

index dc8dc9fe436693da598efa28214135183055c391..f07af8126ce5e2b10c646445dba6ad76155c8070 100644 (file)
@@ -601,7 +601,11 @@ static int r600_bc_vtx_build(struct r600_bc *bc, struct r600_bc_vtx *vtx, unsign
                                S_SQ_VTX_WORD1_DST_SEL_Y(vtx->dst_sel_y) |
                                S_SQ_VTX_WORD1_DST_SEL_Z(vtx->dst_sel_z) |
                                S_SQ_VTX_WORD1_DST_SEL_W(vtx->dst_sel_w) |
-                               S_SQ_VTX_WORD1_USE_CONST_FIELDS(1) |
+                               S_SQ_VTX_WORD1_USE_CONST_FIELDS(vtx->use_const_fields) |
+                               S_SQ_VTX_WORD1_DATA_FORMAT(vtx->data_format) |
+                               S_SQ_VTX_WORD1_NUM_FORMAT_ALL(vtx->num_format_all) |
+                               S_SQ_VTX_WORD1_FORMAT_COMP_ALL(vtx->format_comp_all) |
+                               S_SQ_VTX_WORD1_SRF_MODE_ALL(vtx->srf_mode_all) |
                                S_SQ_VTX_WORD1_GPR_DST_GPR(vtx->dst_gpr);
        bc->bytecode[id++] = S_SQ_VTX_WORD2_MEGA_FETCH(1);
        bc->bytecode[id++] = 0;
index cf67ca2d68e091c0f78d7e61876a2b0d06246be5..cbf46a8b64be9022821ee5ccb15fd418009d2c29 100644 (file)
@@ -101,6 +101,11 @@ struct r600_bc_vtx {
        unsigned                        dst_sel_y;
        unsigned                        dst_sel_z;
        unsigned                        dst_sel_w;
+       unsigned                        use_const_fields;
+       unsigned                        data_format;
+       unsigned                        num_format_all;
+       unsigned                        format_comp_all;
+       unsigned                        srf_mode_all;
 };
 
 struct r600_bc_output {
index a2091db460baf191e6b4b6a7523226249bafe659..d35a99085dc1eac585a22dfd37de3082a1ebcc2d 100644 (file)
@@ -439,6 +439,7 @@ static int tgsi_declaration(struct r600_shader_ctx *ctx)
                        vtx.dst_sel_y = 1;
                        vtx.dst_sel_z = 2;
                        vtx.dst_sel_w = 3;
+                       vtx.use_const_fields = 1;
                        r = r600_bc_add_vtx(ctx->bc, &vtx);
                        if (r)
                                return r;