[Piglit] [PATCH 3/4] glsl-1.10 / glsl-1.30: Verify that fragment shader can only write one kind of output

Ian Romanick idr at freedesktop.org
Wed Dec 14 11:37:14 PST 2011


On 12/14/2011 11:11 AM, Chad Versace wrote:
> On 11/16/2011 01:50 PM, Ian Romanick wrote:
>> From: Ian Romanick<ian.d.romanick at intel.com>
>>
>> Signed-off-by: Ian Romanick<ian.d.romanick at intel.com>
>> ---
>>   .../write-gl_FragColor-and-gl_FragData-dead.frag   |   22 +++++++++++++++++
>>   .../write-gl_FragColor-and-gl_FragData.frag        |   18 ++++++++++++++
>>   .../write-gl_FragColor-dead-and-gl_FragData.frag   |   22 +++++++++++++++++
>>   .../write-gl_FragColor-and-user-output-dead.frag   |   25 ++++++++++++++++++++
>>   .../write-gl_FragColor-and-user-output.frag        |   21 ++++++++++++++++
>>   .../write-gl_FragColor-dead-and-user-output.frag   |   25 ++++++++++++++++++++
>>   .../write-gl_FragData-and-user-output-dead.frag    |   25 ++++++++++++++++++++
>>   .../write-gl_FragData-and-user-output.frag         |   21 ++++++++++++++++
>>   .../write-gl_FragData-dead-and-user-output.frag    |   25 ++++++++++++++++++++
>>   9 files changed, 204 insertions(+), 0 deletions(-)
>>   create mode 100644 tests/spec/glsl-1.10/compiler/fragment-outputs/write-gl_FragColor-and-gl_FragData-dead.frag
>>   create mode 100644 tests/spec/glsl-1.10/compiler/fragment-outputs/write-gl_FragColor-and-gl_FragData.frag
>>   create mode 100644 tests/spec/glsl-1.10/compiler/fragment-outputs/write-gl_FragColor-dead-and-gl_FragData.frag
>>   create mode 100644 tests/spec/glsl-1.30/compiler/fragment-outputs/write-gl_FragColor-and-user-output-dead.frag
>>   create mode 100644 tests/spec/glsl-1.30/compiler/fragment-outputs/write-gl_FragColor-and-user-output.frag
>>   create mode 100644 tests/spec/glsl-1.30/compiler/fragment-outputs/write-gl_FragColor-dead-and-user-output.frag
>>   create mode 100644 tests/spec/glsl-1.30/compiler/fragment-outputs/write-gl_FragData-and-user-output-dead.frag
>>   create mode 100644 tests/spec/glsl-1.30/compiler/fragment-outputs/write-gl_FragData-and-user-output.frag
>>   create mode 100644 tests/spec/glsl-1.30/compiler/fragment-outputs/write-gl_FragData-dead-and-user-output.frag
>
> All these tests look good.
> Reviewed-by: Chad Versace<chad.versace at linux.intel.com>
>
> To be thoroughly blackbox, I think three additional tests are needed: write-X-dead-and-Y-dead for X != Y.
> But I think these tests beat the horse dead enough.

I'm not sure what that would accomplish.  Verify that something like the 
following also fails linking?  I think that would be beating a dead horse.

void main()
{
	if (false)
		gl_FragColor = vec4(1.0);
	if (false)
		gl_FragData[0] = vec4(1.0);
}


More information about the Piglit mailing list