[Piglit] [PATCH V3 4/6] ARB_sample_shading: Add test to verify the functionality of gl_SampleMask[]
Anuj Phogat
anuj.phogat at gmail.com
Mon Dec 9 18:51:37 PST 2013
On Mon, Dec 9, 2013 at 6:47 PM, Paul Berry <stereotype441 at gmail.com> wrote:
> On 9 December 2013 18:42, Anuj Phogat <anuj.phogat at gmail.com> wrote:
>>
>>
>>
>>
>> On Mon, Dec 9, 2013 at 10:02 AM, Paul Berry <stereotype441 at gmail.com>
>> wrote:
>>>
>>> On 6 November 2013 17:24, Anuj Phogat <anuj.phogat at gmail.com> wrote:
>>>>
>>>> + static const char *frag_template =
>>>> + "#version 130\n"
>>>> + "%s\n"
>>>> + "uniform %s tex;\n"
>>>> + "uniform int samples;\n"
>>>> + "out vec4 out_color;\n"
>>>> + "void main()\n"
>>>> + "{\n"
>>>> + " int i = 0;\n"
>>>> + " bool pass = true;\n"
>>>> + " int mask = (int(gl_FragCoord.x) * 0x10204081) ^\n"
>>>> + " (int(gl_FragCoord.y) * 0x01010101);\n"
>>>> + " vec4 green = vec4(0.0, 1.0, 0.0, 1.0);\n"
>>>> + " vec4 black = vec4(0.0, 0.0, 0.0, 0.0);\n"
>>>> + " do {\n"
>>>
>>>
>>> Any particular reason not to use a for loop here? (i.e. for (int i = 0;
>>> i < samples; i++))
>>
>>
>> I used do-while to include testing of 'samples == 0' case.
>
>
> Oh, ok. Would you mind putting a comment just above the loop to explain
> that? With the comment added I'm ok with the loop as is.
I'll add the comment. Thanks.
More information about the Piglit
mailing list