[Piglit] [PATCH] arb_gpu_shader_fp64: emit GS output for every vertex
Samuel Pitoiset
samuel.pitoiset at gmail.com
Mon Jun 13 17:50:59 UTC 2016
On 06/13/2016 06:04 PM, Andres Gomez wrote:
> On Tue, 2016-06-07 at 00:21 +0200, Samuel Pitoiset wrote:
>> Because EmitVertex() will invalidate all previous output writes, we
>> need to emit the output for every vertex. This fixes is similar to
>> the one in the GS tests generator.
>>
>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>> ---
>> .../execution/gs-isnan-dvec.shader_test | 36 +++++++++++-
>
>
> [snip]
>
>
>> diff --git a/tests/spec/arb_gpu_shader_fp64/execution/gs-isnan-
>> dvec.shader_test b/tests/spec/arb_gpu_shader_fp64/execution/gs-isnan-
>> dvec.shader_test
>> index 28f7505..314a87c 100644
>> --- a/tests/spec/arb_gpu_shader_fp64/execution/gs-isnan-
>> dvec.shader_test
>> +++ b/tests/spec/arb_gpu_shader_fp64/execution/gs-isnan-
>> dvec.shader_test
>> @@ -38,29 +38,29 @@ out vec4 fs_color;
>>
>> void main()
>> {
>> - fs_color = vec4(0.0);
>> + for (int i = 0; i < 3; i++) {
>> + fs_color = vec4(0.0);
>>
>> - dvec4 r4 = numerator/denominator;
>> - dvec4 bl4 = dvec4(isnan(r4));
>> - if (distance(bl4, expected) > tolerance)
>> - fs_color.x = 1.0;
>> + dvec4 r4 = numerator/denominator;
>> + dvec4 bl4 = dvec4(isnan(r4));
>> + if (distance(bl4, expected) > tolerance)
>> + fs_color.x = 1.0;
>>
>> - dvec3 r3 = numerator.xyz/denominator.xyz;
>> - dvec3 bl3 = dvec3(isnan(r3));
>> - if (distance(bl3, expected.xyz) > tolerance)
>> - fs_color.y = 1.0;
>> + dvec3 r3 = numerator.xyz/denominator.xyz;
>> + dvec3 bl3 = dvec3(isnan(r3));
>> + if (distance(bl3, expected.xyz) > tolerance)
>> + fs_color.y = 1.0;
>>
>> - dvec2 r2 = numerator.zw/denominator.zw;
>> - dvec2 bl2 = dvec2(isnan(r2));
>> - if (distance(bl2, expected.zw) > tolerance)
>> - fs_color.z = 1.0;
>> + dvec2 r2 = numerator.zw/denominator.zw;
>> + dvec2 bl2 = dvec2(isnan(r2));
>> + if (distance(bl2, expected.zw) > tolerance)
>> + fs_color.z = 1.0;
>>
>> - double r1 = numerator.x/denominator.x;
>> - double bl1 = double(isnan(r1));
>> - if (distance(bl1, expected.x) > tolerance)
>> - fs_color.w = 1.0;
>> + double r1 = numerator.x/denominator.x;
>> + double bl1 = double(isnan(r1));
>> + if (distance(bl1, expected.x) > tolerance)
>> + fs_color.w = 1.0;
>>
>> - for (int i = 0; i < 3; i++) {
>> gl_Position = vertex_to_gs[i];
>> EmitVertex();
>> }
>
> I'd rather have just the "if" parts that modify fs_color in the "for"
> loop and not the whole code.
>
> In any case, this is a minor thing so feel free to ignore.
>
> Other than that, this is:
>
> Reviewed-by: Andres Gomez <agomez at igalia.com>
Thanks for the reviews.
I don't have commit access for piglit, could you please push both
patches for me?
Feel free to amend this one before pushing.
>
More information about the Piglit
mailing list