Reviewed-by: Marek Olšák <[email protected]> Marek
On Thu, Aug 7, 2014 at 4:51 AM, <[email protected]> wrote: > From: Roland Scheidegger <[email protected]> > > GL_REPEAT is not legal for the rectangle targets, and because the test uses > sampler objects the default GL_REPEAT value will be used even for rectangle > target because unlike texture objects they can't be initialized to the legal > CLAMP_TO_EDGE value. According to the spec the texture actually should be > treated as incomplete in this case which mesa does not do (and I don't know if > anyone bothers enough to fix this) but some drivers (like llvmpipe) might > not treat unnormalized coords correctly in this case. > --- > tests/texturing/tex-miplevel-selection.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/tests/texturing/tex-miplevel-selection.c > b/tests/texturing/tex-miplevel-selection.c > index 11e4292..ef9a066 100644 > --- a/tests/texturing/tex-miplevel-selection.c > +++ b/tests/texturing/tex-miplevel-selection.c > @@ -981,6 +981,10 @@ piglit_init(int argc, char **argv) > > set_sampler_parameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST); > set_sampler_parameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST); > + /* need to set this for rect targets, otherwise default GL_REPEAT > + * in sampler obj should trigger incomplete tex behavior */ > + set_sampler_parameter(GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); > + set_sampler_parameter(GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); > > if (IS_SHADOW(target)) { > glActiveTexture(GL_TEXTURE1); > -- > 1.9.1 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
