mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 09:10:12 +01:00
Cell: fix small sampling error in sample_texture_bilinear()
This commit is contained in:
parent
efa8e03a6f
commit
1a75464cdc
1 changed files with 2 additions and 0 deletions
|
|
@ -150,6 +150,8 @@ sample_texture_bilinear(vector float texcoord)
|
|||
static const vector unsigned int offset01 = {0, 1, 0, 0};
|
||||
|
||||
vector float tc = spu_mul(texcoord, spu.tex_size);
|
||||
tc = spu_add(tc, spu_splats(-0.5f)); /* half texel bias */
|
||||
|
||||
/* integer texcoords S,T: */
|
||||
vector unsigned int itc00 = spu_convtu(tc, 0); /* convert to int */
|
||||
vector unsigned int itc01 = spu_add(itc00, offset01);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue