[Piglit] [PATCH v2] built-in-constants: check required GLSL versions for #extensions

Samuel Iglesias Gonsálvez siglesias at igalia.com
Tue Jan 9 07:39:58 UTC 2018


Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>


On 08/01/18 13:58, Juan A. Suarez Romero wrote:
> Please, could someone review this patch? Thank you in advance
>
>
> 	J.A.
>
> On Tue, 2017-11-14 at 20:31 +0100, Juan A. Suarez Romero wrote:
>> GL_OES_geometry_shader and GL_OES_tessellation_shader specifications
>> require OpenGL ES Shading Language 3.10.
>>
>> So do not declare those extensions in shaders using older GLSL versions.
>> ---
>>  tests/shaders/built-in-constants.c | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/shaders/built-in-constants.c b/tests/shaders/built-in-constants.c
>> index d470fe1bf..32cd2638f 100644
>> --- a/tests/shaders/built-in-constants.c
>> +++ b/tests/shaders/built-in-constants.c
>> @@ -462,6 +462,7 @@ piglit_init(int argc, char **argv)
>>  	 * before version 3.20.
>>  	 */
>>  	if (es_shader && required_glsl_version < 320 &&
>> +	    required_glsl_version >= 310 &&
>>  	    piglit_is_extension_supported("GL_OES_geometry_shader")) {
>>  		assert(num_required_extensions < ARRAY_SIZE(required_extensions));
>>  		required_extensions[num_required_extensions] =
>> @@ -473,7 +474,9 @@ piglit_init(int argc, char **argv)
>>  	const char *const tess_ext_name = es_shader
>>  		? "GL_OES_tessellation_shader"
>>  		: "GL_ARB_tessellation_shader";
>> -	if (piglit_is_extension_supported(tess_ext_name)) {
>> +	if (((es_shader && required_glsl_version >= 310) ||
>> +	    !es_shader) &&
>> +	    piglit_is_extension_supported(tess_ext_name)) {
>>  		assert(num_required_extensions < ARRAY_SIZE(required_extensions));
>>  		required_extensions[num_required_extensions] =
>>  			strdup(tess_ext_name);
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20180109/9153e7ca/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20180109/9153e7ca/attachment.sig>


More information about the Piglit mailing list