r5xx: Dump shader constants when dumping program assembly.
[mesa.git] / src / mesa / drivers / dri / r300 / r300_vertprog.c
index e741eb9b1960577b18f25e1e535cd96dc43f5459..861f0427cf5dcd56cc25b34e7ae2c3a28a970eb3 100644 (file)
@@ -171,6 +171,7 @@ static unsigned long t_src_class(enum register_file file)
        case PROGRAM_LOCAL_PARAM:
        case PROGRAM_ENV_PARAM:
        case PROGRAM_NAMED_PARAM:
+       case PROGRAM_CONSTANT:
        case PROGRAM_STATE_VAR:
                return PVS_SRC_REG_CONSTANT;
                /*
@@ -841,9 +842,10 @@ static GLuint *r300TranslateOpcodeSUB(struct r300_vertex_program *vp,
        inst[3] = 0;
 #else
        inst[0] =
-           PVS_OP_DST_OPERAND(VE_MULTIPLY_ADD, t_dst_index(vp, &vpi->DstReg),
+           PVS_OP_DST_OPERAND(VE_MULTIPLY_ADD,
                               GL_FALSE,
                               GL_FALSE,
+                              t_dst_index(vp, &vpi->DstReg),
                               t_dst_mask(vpi->DstReg.WriteMask),
                               t_dst_class(vpi->DstReg.File));
        inst[1] = t_src(vp, &src[0]);
@@ -1424,6 +1426,8 @@ void r300SelectVertexShader(r300ContextPtr r300)
        GLint wpos_idx;
 
        vpc = (struct r300_vertex_program_cont *)ctx->VertexProgram._Current;
+       wanted_key.InputsRead = vpc->mesa_program.Base.InputsRead;
+       wanted_key.OutputsWritten = vpc->mesa_program.Base.OutputsWritten;
        InputsRead = ctx->FragmentProgram._Current->Base.InputsRead;
 
        wpos_idx = -1;
@@ -1437,11 +1441,9 @@ void r300SelectVertexShader(r300ContextPtr r300)
                        _mesa_exit(-1);
                }
 
-               InputsRead |= (FRAG_BIT_TEX0 << i);
+               wanted_key.OutputsWritten |= 1 << (VERT_RESULT_TEX0 + i);
                wpos_idx = i;
        }
-       wanted_key.InputsRead = vpc->mesa_program.Base.InputsRead;
-       wanted_key.OutputsWritten = vpc->mesa_program.Base.OutputsWritten;
 
        add_outputs(&wanted_key, VERT_RESULT_HPOS);