summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2019-08-19 17:41:46 +0200
committerGert Wollny <[email protected]>2019-08-20 10:04:24 +0200
commit6a09405368a18fb494b92de5f9783b9a625a7235 (patch)
treea3042aa9c7944f0b866d2dd3fa79ba36aac64ff5 /src/mesa
parentfe0e9db797eee739f9705bd833acc35bf2cf96a6 (diff)
mesa/program: Take ARB_framebuffers_no_attachments into account in wpos correction
If a drawbuffer is an fbo without an attachment then its 'Height' will be zero, and we have to take its 'DefaultGeometry.Height' into account. Fixes on softpipe (with the exception of tests that use multisample): dEQP-GLES31.functional.fbo.no_attachments.* Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/program/prog_statevars.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/program/prog_statevars.c b/src/mesa/program/prog_statevars.c
index 3bbe451399f..5178b61ec4a 100644
--- a/src/mesa/program/prog_statevars.c
+++ b/src/mesa/program/prog_statevars.c
@@ -576,11 +576,11 @@ _mesa_fetch_state(struct gl_context *ctx, const gl_state_index16 state[],
value[0] = 1.0F;
value[1] = 0.0F;
value[2] = -1.0F;
- value[3] = (GLfloat) ctx->DrawBuffer->Height;
+ value[3] = _mesa_geometric_height(ctx->DrawBuffer);
} else {
/* Flipping Y upside down (XY) followed by identity (ZW). */
value[0] = -1.0F;
- value[1] = (GLfloat) ctx->DrawBuffer->Height;
+ value[1] = _mesa_geometric_height(ctx->DrawBuffer);
value[2] = 1.0F;
value[3] = 0.0F;
}