gallium/swr: Fix depth values for blit scenario

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
Jan Zielinski 2019-10-29 19:29:27 +01:00
parent bb0c5c487e
commit 7baedc9162
1 changed files with 8 additions and 0 deletions

View File

@ -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];