aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJan Zielinski <[email protected]>2019-10-29 19:29:27 +0100
committerJan Zielinski <[email protected]>2019-10-31 07:25:54 +0000
commit7baedc9162754334977f4f4eaa0f8edef1b99826 (patch)
tree94e30f7af9ac080a30d6870467c824d4452cb4b5 /src/gallium
parentbb0c5c487e63e88acbb792f092dd8f392bad8540 (diff)
gallium/swr: Fix depth values for blit scenario
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index c6b19204b32..94507b2f2d9 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -1231,6 +1231,14 @@ swr_update_derived(struct pipe_context *pipe,
util_viewport_zmin_zmax(state, rasterizer->clip_halfz,
&vp->minZ, &vp->maxZ);
+ if (rasterizer->depth_clip_near) {
+ vp->minZ = 0.0f;
+ }
+
+ if (rasterizer->depth_clip_far) {
+ vp->maxZ = 1.0f;
+ }
+
vpm->m00[i] = state->scale[0];
vpm->m11[i] = state->scale[1];
vpm->m22[i] = state->scale[2];