radv: use float instead of double for viewport zscale/ztranslate

The float precision should be largely enough.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29215>
This commit is contained in:
Samuel Pitoiset 2024-05-16 16:49:47 +02:00 committed by Marge Bot
parent 50ef8600bc
commit 73e1ff6b54
1 changed files with 1 additions and 1 deletions

View File

@ -2873,7 +2873,7 @@ radv_emit_viewport(struct radv_cmd_buffer *cmd_buffer)
radeon_emit(cmd_buffer->cs, fui(d->hw_vp.xform[i].scale[1]));
radeon_emit(cmd_buffer->cs, fui(d->hw_vp.xform[i].translate[1]));
double scale_z, translate_z;
float scale_z, translate_z;
if (d->vk.vp.depth_clip_negative_one_to_one) {
scale_z = d->hw_vp.xform[i].scale[2] * 0.5f;
translate_z = (d->hw_vp.xform[i].translate[2] + d->vk.vp.viewports[i].maxDepth) * 0.5f;