mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
nvk: Fix viewport Z scale
Because Z needs to end up in [0, 1] and not [-1, 1], we don't want to divide by 2. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
9deab8f139
commit
c6a50c2745
1 changed files with 1 additions and 2 deletions
|
|
@ -693,8 +693,7 @@ nvk_flush_vp_state(struct nvk_cmd_buffer *cmd)
|
|||
P_MTHD(p, NV9097, SET_VIEWPORT_SCALE_X(i));
|
||||
P_NV9097_SET_VIEWPORT_SCALE_X(p, i, fui(0.5f * vp->width));
|
||||
P_NV9097_SET_VIEWPORT_SCALE_Y(p, i, fui(0.5f * vp->height));
|
||||
P_NV9097_SET_VIEWPORT_SCALE_Z(p, i,
|
||||
fui(0.5f * (vp->maxDepth - vp->minDepth)));
|
||||
P_NV9097_SET_VIEWPORT_SCALE_Z(p, i, fui(vp->maxDepth - vp->minDepth));
|
||||
|
||||
P_NV9097_SET_VIEWPORT_OFFSET_X(p, i, fui(vp->x + 0.5f * vp->width));
|
||||
P_NV9097_SET_VIEWPORT_OFFSET_Y(p, i, fui(vp->y + 0.5f * vp->height));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue