[Mesa-dev] [PATCH 1/3] mesa: return 0 for GL_INTERNALFORMAT_SUPPORTED for unsupported TBO formats
Marek Olšák
maraeo at gmail.com
Tue Oct 24 09:53:28 UTC 2017
On Tue, Oct 24, 2017 at 11:47 AM, Alejandro Piñeiro
<apinheiro at igalia.com> wrote:
> On 21/10/17 14:54, Marek Olšák wrote:
>> From: Marek Olšák <marek.olsak at 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?
>
See the beginning of _is_resource_supported.
Marek
More information about the mesa-dev
mailing list