summaryrefslogtreecommitdiffstats
path: root/src/mesa/program
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-05-03 00:00:55 +0200
committerChristoph Bumiller <[email protected]>2011-05-03 00:00:55 +0200
commitf986a6560f3ee9a79b89e9409e3a9ac52b53315c (patch)
treee3afb5b3abbf7a7ee8d2fc0edadb70949d44395f /src/mesa/program
parent9cb800a97c0ddf87f7870b2a025ab5b8785a426d (diff)
mesa,st/mesa: fix WPOS adjustment
Tested-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/program')
-rw-r--r--src/mesa/program/prog_statevars.c4
-rw-r--r--src/mesa/program/prog_statevars.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c
index 1fd26f44d56..d94d7fe5dfb 100644
--- a/src/mesa/program/prog_statevars.c
+++ b/src/mesa/program/prog_statevars.c
@@ -602,11 +602,11 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index state[],
value[0] = 1.0F;
value[1] = 0.0F;
value[2] = -1.0F;
- value[3] = (GLfloat) (ctx->DrawBuffer->Height - 1);
+ value[3] = (GLfloat) ctx->DrawBuffer->Height;
} else {
/* Flipping Y upside down (XY) followed by identity (ZW). */
value[0] = -1.0F;
- value[1] = (GLfloat) (ctx->DrawBuffer->Height - 1);
+ value[1] = (GLfloat) ctx->DrawBuffer->Height;
value[2] = 1.0F;
value[3] = 0.0F;
}
diff --git a/src/mesa/program/prog_statevars.h b/src/mesa/program/prog_statevars.h
index 9fe8d81b3dd..04af3f4cf3a 100644
--- a/src/mesa/program/prog_statevars.h
+++ b/src/mesa/program/prog_statevars.h
@@ -120,7 +120,7 @@ typedef enum gl_state_index_ {
STATE_PT_BIAS, /**< Pixel transfer RGBA bias */
STATE_SHADOW_AMBIENT, /**< ARB_shadow_ambient fail value; token[2] is texture unit index */
STATE_FB_SIZE, /**< (width-1, height-1, 0, 0) */
- STATE_FB_WPOS_Y_TRANSFORM, /**< (1, 0, -1, height-1) if a FBO is bound, (-1, height-1, 1, 0) otherwise */
+ STATE_FB_WPOS_Y_TRANSFORM, /**< (1, 0, -1, height) if a FBO is bound, (-1, height, 1, 0) otherwise */
STATE_ROT_MATRIX_0, /**< ATI_envmap_bumpmap, rot matrix row 0 */
STATE_ROT_MATRIX_1, /**< ATI_envmap_bumpmap, rot matrix row 1 */
STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */