[Piglit] [PATCH] glsl-1.30: Reproduce a bug in the i965 backend optimizer

Ian Romanick idr at freedesktop.org
Mon Sep 17 07:28:44 UTC 2018


On 09/14/2018 03:16 PM, Dylan Baker wrote:
> Quoting Ian Romanick (2018-09-12 16:29:55)
>> From: Ian Romanick <ian.d.romanick at intel.com>
>>
>> The optimizer recently added the ability to replace a compare with a
>> subtraction under certain circumstances.  This can fail for integers.
>> For inputs a = 0x80000000, b = 4, int(0x80000000) < 4, but
>> int(0x80000000) - 4 overflows and results in 0x7ffffffc.  That's not
>> less than zero, so the flags get set differently than for (a < b).
>>
>> This really only affected the signed comparisons because the subtract
>> would always have a signed source types, so it wouldn't be seen as a
>> match for the compare with unsigned source types.
>>
>> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
>> Cc: Matt Turner <mattst88 at gmail.com>
>> ---
>>  tests/spec/CMakeLists.txt                          |  1 +
>>  .../fs-absoluteDifference-int.shader_test          | 85 +++++++++++++++++++
>>  .../fs-absoluteDifference-uint.shader_test         | 85 +++++++++++++++++++
>>  .../vs-absoluteDifference-int.shader_test          | 96 ++++++++++++++++++++++
>>  .../vs-absoluteDifference-uint.shader_test         | 96 ++++++++++++++++++++++
>>  5 files changed, 363 insertions(+)
>>  create mode 100644 tests/spec/glsl-1.30/execution/fs-absoluteDifference-int.shader_test
>>  create mode 100644 tests/spec/glsl-1.30/execution/fs-absoluteDifference-uint.shader_test
>>  create mode 100644 tests/spec/glsl-1.30/execution/vs-absoluteDifference-int.shader_test
>>  create mode 100644 tests/spec/glsl-1.30/execution/vs-absoluteDifference-uint.shader_test
>>
>> diff --git a/tests/spec/CMakeLists.txt b/tests/spec/CMakeLists.txt
>> index 4df9d331d..28abf3634 100644
>> --- a/tests/spec/CMakeLists.txt
>> +++ b/tests/spec/CMakeLists.txt
>> @@ -2,6 +2,7 @@ add_subdirectory (amd_framebuffer_multisample_advanced)
>>  add_subdirectory (amd_depth_clamp_separate)
>>  add_subdirectory (amd_performance_monitor)
>>  add_subdirectory (amd_pinned_memory)
>> +add_subdirectory (amd_transform_feedback3_lines_triangles)
> 
> This seems like an unrelated change.

Yeah, Ilia noticed that too.  I've fixed it locally.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20180917/e1d80ae4/attachment.sig>


More information about the Piglit mailing list