Follow the spec when selecting the magnification filter (OpenGL 4.5,
section 8.14):
If λ(x, y) is less than or equal to the constant c (see section 8.15)
the texture is said to be magnified;
While we're here also silence a potential warning about implicit float
to double conversion.
v2: Update commit message to contain a reference to the spec as pointed
out by Eric.
Fixes a number of dEQP GLES2 and GLES3 test out of:
dEQP-GLES2.functional.texture.filtering.*
dEQP-GLES2.functional.texture.vertex.2d.filtering.*
dEQP-GLES3.functional.texture.vertex.*.filtering.*
dEQP-GLES3.functional.texture.filtering.*
dEQP-GLES3.functional.texture.shadow.2d.*
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
args.p = p[j];
args.face_id = filt_args->faces[j];
- if (lod[j] < 0.0) {
+ if (lod[j] <= 0.0) {
args.level = psview->u.tex.first_level;
mag_filter(sp_sview, sp_samp, &args, &rgba[0][j]);
}
args.p = p[j];
args.face_id = filt_args->faces[j];
- if (lod[j] < 0.0) {
+ if (lod[j] <= 0.0) {
args.level = psview->u.tex.first_level;
mag_filter(sp_sview, sp_samp, &args, &rgba[0][j]);
} else {
args.t = t[j];
args.p = p[j];
args.face_id = filt_args->faces[j];
- if (lod[j] < 0.0) {
+ if (lod[j] <= 0.0f) {
mag_filter(sp_sview, sp_samp, &args, &rgba[0][j]);
}
else {