mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 22:20:27 +01:00
pvr: fix calculation for textures z position fractional part
The fractional part of the z position will only be used with linear or bi-linear
filtering. Otherwise it is safe to discard the original fractional value and
reset it to 0.5.
Fixes: 480bdff4b5 ("pvr: Add support to process transfer and blit cmds")
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31679>
This commit is contained in:
parent
c1bd0deb97
commit
1b67637fa0
1 changed files with 1 additions and 1 deletions
|
|
@ -3128,7 +3128,7 @@ pvr_isp_prim_block_tsp_vertex_block(const struct pvr_device_info *dev_info,
|
|||
[Z] = z_present ? 1.0f / (float)src->surface.depth : 0.0f,
|
||||
};
|
||||
float z_pos = (src->filter < PVR_FILTER_LINEAR)
|
||||
? floor(src->surface.z_position + 0.5f)
|
||||
? floor(src->surface.z_position) + 0.5f
|
||||
: src->surface.z_position;
|
||||
|
||||
pvr_tsp_floats(dev_info,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue