[Piglit] [PATCH] arb_gpu_shader_fp64: emit GS output for every vertex

Samuel Pitoiset samuel.pitoiset at gmail.com
Thu Jun 30 22:28:38 UTC 2016



On 06/14/2016 06:22 PM, Samuel Pitoiset wrote:
>
>
> On 06/14/2016 05:53 PM, Andres Gomez wrote:
>> Because EmitVertex() will invalidate all previous output writes, we
>> need to set the value of the output variables for every vertex
>>
>> Signed-off-by: Andres Gomez <agomez at igalia.com>
>> ---
>>  .../templates/gen_conversion_fp64/shader-zero-sign.geom.mako  |  2 +-
>>  .../arb_gpu_shader_fp64/execution/gs-isinf-dvec.shader_test   | 11
>> ++++++-----
>>  2 files changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git
>> a/generated_tests/templates/gen_conversion_fp64/shader-zero-sign.geom.mako
>> b/generated_tests/templates/gen_conversion_fp64/shader-zero-sign.geom.mako
>>
>> index a4f82ba..05a4cbb 100644
>> ---
>> a/generated_tests/templates/gen_conversion_fp64/shader-zero-sign.geom.mako
>>
>> +++
>> b/generated_tests/templates/gen_conversion_fp64/shader-zero-sign.geom.mako
>>
>> @@ -18,9 +18,9 @@ void main()
>>      ${to_type} pre_converted = ${converted_from};
>>      ${to_type} converted = ONE / pre_converted;
>>      bool match = converted == to;
>> -    fs_color = match ? GREEN : RED;
>>
>>      for (int i = 0; i < 3; i++) {
>> +        fs_color = match ? GREEN : RED;
>>          gl_Position = vertex_to_gs[i];
>>          EmitVertex();
>>      }
>
> Sorry, forgot to update this one.
>
>> diff --git
>> a/tests/spec/arb_gpu_shader_fp64/execution/gs-isinf-dvec.shader_test
>> b/tests/spec/arb_gpu_shader_fp64/execution/gs-isinf-dvec.shader_test
>> index c8552ea..b7a904c 100644
>> --- a/tests/spec/arb_gpu_shader_fp64/execution/gs-isinf-dvec.shader_test
>> +++ b/tests/spec/arb_gpu_shader_fp64/execution/gs-isinf-dvec.shader_test
>> @@ -38,29 +38,30 @@ out vec4 fs_color;
>>
>>  void main()
>>  {
>> -    fs_color = vec4(0.0);
>> +    vec4 gs_color = vec4(0.0);
>>
>>      dvec4 r4 = multiplier*exp(exponent);
>>      dvec4 bl4 = dvec4(isinf(r4));
>>      if (distance(bl4, expected) > tolerance)
>> -        fs_color.x = 1.0;
>> +        gs_color.x = 1.0;
>>
>>      dvec3 r3 = multiplier.xyz*exp(exponent.xyz);
>>      dvec3 bl3 = dvec3(isinf(r3));
>>      if (distance(bl3, expected.xyz) > tolerance)
>> -        fs_color.y = 1.0;
>> +        gs_color.y = 1.0;
>>
>>      dvec2 r2 = multiplier.zw*exp(exponent.zw);
>>      dvec2 bl2 = dvec2(isinf(r2));
>>      if (distance(bl2, expected.zw) > tolerance)
>> -        fs_color.z = 1.0;
>> +        gs_color.z = 1.0;
>>
>>      double r1 = multiplier.x*exp(exponent.x);
>>      double bl1 = double(isinf(r1));
>>      if (distance(bl1, expected.x) > tolerance)
>> -        fs_color.w = 1.0;
>> +        gs_color.w = 1.0;
>>
>>      for (int i = 0; i < 3; i++) {
>> +        fs_color = gs_color;
>
> I would suggest to rename gs_color to color because this seems
> confusing, but feel free to ignore my comment.
>
> Patch looks fine:
>
> Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

Andres, maybe you can push this one?

>
>>          gl_Position = vertex_to_gs[i];
>>          EmitVertex();
>>      }
>>


More information about the Piglit mailing list