summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-04-09 10:09:24 -0600
committerBrian Paul <[email protected]>2010-04-09 10:09:24 -0600
commit75b8c4a8f869f63991c774caa7e1cec7e988c5ec (patch)
tree141f8eb5754404818d6d46a4bb6cca0ecdd01494 /src/mesa
parent4ae2bdcb150aa87557c8f1648445e84bfb926986 (diff)
parentb22a00bff4aadd390dd8af6b5b05bd2833ec7f85 (diff)
Merge branch '7.8'
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/shader/program.c4
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c41
2 files changed, 22 insertions, 23 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index f4f701b5461..f77a7737530 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -625,7 +625,7 @@ replace_registers(struct prog_instruction *inst, GLuint numInst,
GLuint i, j;
for (i = 0; i < numInst; i++) {
/* src regs */
- for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) {
+ for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) {
if (inst[i].SrcReg[j].File == oldFile &&
inst[i].SrcReg[j].Index == oldIndex) {
inst[i].SrcReg[j].File = newFile;
@@ -652,7 +652,7 @@ adjust_param_indexes(struct prog_instruction *inst, GLuint numInst,
{
GLuint i, j;
for (i = 0; i < numInst; i++) {
- for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) {
+ for (j = 0; j < _mesa_num_inst_src_regs(inst[i].Opcode); j++) {
GLuint f = inst[i].SrcReg[j].File;
if (f == PROGRAM_CONSTANT ||
f == PROGRAM_UNIFORM ||
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 85570541ef0..93b95a534c7 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -249,13 +249,13 @@ make_passthrough_vertex_shader(struct st_context *st,
ureg_DECL_output( ureg, TGSI_SEMANTIC_POSITION, 0 ),
ureg_DECL_vs_input( ureg, 0 ));
- /* MOV result.texcoord0, vertex.texcoord0; */
+ /* MOV result.texcoord0, vertex.attr[1]; */
ureg_MOV(ureg,
ureg_DECL_output( ureg, TGSI_SEMANTIC_GENERIC, 0 ),
ureg_DECL_vs_input( ureg, 1 ));
if (passColor) {
- /* MOV result.color0, vertex.color0; */
+ /* MOV result.color0, vertex.attr[2]; */
ureg_MOV(ureg,
ureg_DECL_output( ureg, TGSI_SEMANTIC_COLOR, 0 ),
ureg_DECL_vs_input( ureg, 2 ));
@@ -451,7 +451,7 @@ draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
const GLfloat sLeft = 0.0f, sRight = maxXcoord;
const GLfloat tTop = invertTex ? maxYcoord : 0.0f;
const GLfloat tBot = invertTex ? 0.0f : maxYcoord;
- GLuint tex, i;
+ GLuint i;
/* upper-left */
verts[0][0][0] = clip_x0; /* v[0].attr[0].x */
@@ -469,32 +469,31 @@ draw_quad(GLcontext *ctx, GLfloat x0, GLfloat y0, GLfloat z,
verts[3][0][0] = clip_x0;
verts[3][0][1] = clip_y1;
- tex = color ? 2 : 1;
- verts[0][tex][0] = sLeft; /* v[0].attr[tex].s */
- verts[0][tex][1] = tTop; /* v[0].attr[tex].t */
- verts[1][tex][0] = sRight;
- verts[1][tex][1] = tTop;
- verts[2][tex][0] = sRight;
- verts[2][tex][1] = tBot;
- verts[3][tex][0] = sLeft;
- verts[3][tex][1] = tBot;
+ verts[0][1][0] = sLeft; /* v[0].attr[1].S */
+ verts[0][1][1] = tTop; /* v[0].attr[1].T */
+ verts[1][1][0] = sRight;
+ verts[1][1][1] = tTop;
+ verts[2][1][0] = sRight;
+ verts[2][1][1] = tBot;
+ verts[3][1][0] = sLeft;
+ verts[3][1][1] = tBot;
/* same for all verts: */
if (color) {
for (i = 0; i < 4; i++) {
- verts[i][0][2] = z; /*Z*/
- verts[i][0][3] = 1.0f; /*W*/
- verts[i][1][0] = color[0];
- verts[i][1][1] = color[1];
- verts[i][1][2] = color[2];
- verts[i][1][3] = color[3];
- verts[i][2][2] = 0.0f; /*R*/
- verts[i][2][3] = 1.0f; /*Q*/
+ verts[i][0][2] = z; /* v[i].attr[0].z */
+ verts[i][0][3] = 1.0f; /* v[i].attr[0].w */
+ verts[i][2][0] = color[0]; /* v[i].attr[2].r */
+ verts[i][2][1] = color[1]; /* v[i].attr[2].g */
+ verts[i][2][2] = color[2]; /* v[i].attr[2].b */
+ verts[i][2][3] = color[3]; /* v[i].attr[2].a */
+ verts[i][1][2] = 0.0f; /* v[i].attr[1].R */
+ verts[i][1][3] = 1.0f; /* v[i].attr[1].Q */
}
}
else {
for (i = 0; i < 4; i++) {
- verts[i][0][2] = z; /*Z*/
+ verts[i][0][2] = z; /*Z*/
verts[i][0][3] = 1.0f; /*W*/
verts[i][1][2] = 0.0f; /*R*/
verts[i][1][3] = 1.0f; /*Q*/