[Mesa-dev] [PATCH] glsl: Allow token pasting in ESSL

Ian Romanick idr at freedesktop.org
Wed Aug 5 08:06:22 PDT 2015


On 08/04/2015 11:39 AM, Ian Romanick wrote:
> On 07/22/2015 07:52 PM, Ryan Houdek wrote:
>> All vendors I've tested allow token pasting in their ESSL shaders.
>> At least one application expects this to be supported
>> even though it is against spec.
> 
> I'm not very excited about deviating from the spec.  Do you know if the
> Khronos reference compiler allows this behavior for ESSL shaders?  I
> have submitted a spec bug report to Khronos.  We've discussed this
> specific issue quite a few time in the past, and, IIRC, none of the
> mobile vendors wanted to change the spec... to match what their
> compilers seem to actually do.  I'll try again. :(  I should have some
> information this week.
> 
> When we have deviated from the spec in the past, it has been under the
> control of a driconf option.  If the option is enabled, we emit a
> warning.  If the option is not enabled (default) we continue to generate
> the error.  Before I suggest you write more code, let me talk to the
> other vendors in Khronos.
> 
>> This would be the Dolphin GameCube/Wii emulator that requires this.
> 
> Have you contacted the Dolphin authors to see if they'd change their
> code to follow the spec?  I know they've been very receptive to such
> requests in the past.  degasus hangs out on #dri-devel quite a lot.
> 
>> The vendors I've tested that is known to support this is:
>> ARM Mali
>> Qualcomm Adreno
>> IMGTec PowerVR
>> Nvidia Tegra K1/X1

How do you arrive at this list?  On the call, at least ARM and Broadcom
(not on your list) verified that their implementations do generate the
same error as Mesa for ES SL shaders.

>> The vendors that I don't have access to testing:
>> Intel Android
>> Vivante
>> ---
>>  src/glsl/glcpp/glcpp-lex.l | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l
>> index fa9aa50..3e2ad23 100644
>> --- a/src/glsl/glcpp/glcpp-lex.l
>> +++ b/src/glsl/glcpp/glcpp-lex.l
>> @@ -494,8 +494,6 @@ HEXADECIMAL_INTEGER	0[xX][0-9a-fA-F]+[uU]?
>>  
>>  "##" {
>>  	if (! parser->skipping) {
>> -		if (parser->is_gles)
>> -			glcpp_error(yylloc, yyextra, "Token pasting (##) is illegal in GLES");
>>  		RETURN_TOKEN (PASTE);
>>  	}
>>  }
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list