On 21/10/17 14:54, Marek Olšák wrote: > From: Marek Olšák <marek.ol...@amd.com> > > --- > src/mesa/main/formatquery.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c > index 77c7faa..05b7810 100644 > --- a/src/mesa/main/formatquery.c > +++ b/src/mesa/main/formatquery.c > @@ -895,20 +895,25 @@ _mesa_GetInternalformativ(GLenum target, GLenum > internalformat, GLenum pname, > if (pname == GL_NUM_SAMPLE_COUNTS && ctx->API == API_OPENGLES2 && > ctx->Version == 30 && > _mesa_is_enum_format_integer(internalformat)) { > goto end; > } > > ctx->Driver.QueryInternalFormat(ctx, target, internalformat, pname, > buffer); > break; > > case GL_INTERNALFORMAT_SUPPORTED: > + /* Reject invalid texture buffer formats. */ > + if (target == GL_TEXTURE_BUFFER && > + _mesa_validate_texbuffer_format(ctx, internalformat) == > MESA_FORMAT_NONE) > + break; > +
_mesa_validate_texbuffer_format with that internalformat if target is GL_TEXTURE_BUFFER is already called on _is_resource_supported, on line 864. Why it is needed a second call here? > /* Having a supported <internalformat> is implemented as a prerequisite > * for all the <pnames>. Thus, if we reach this point, the > internalformat is > * supported. > */ > buffer[0] = GL_TRUE; > break; > > case GL_INTERNALFORMAT_PREFERRED: > /* The ARB_internalformat_query2 spec says: > * _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev