We are doing float->int conversion while populating vertex data for drawPoly and drawParallelogram in MTLRenderer.fillVertex(). The final Vertex position which is passed to shader also supports storing float data, so we should not be doing this intermediate float to int conversion. This was noticed while reviewing another PR: https://github.com/openjdk/jdk/pull/31981#issuecomment-5045302871
This also deviates from what we do in OpenGL, where we directly store these float values. We also add 0.5f values to these vertex position to hit pixel centers for drawPoly, doing float->int conversion overrides this logic. Fix is to use float arguments for fillVertex. There are regressions seen in clientlibs testing. Its is very difficult to write a reliable pass & fail regression test for this fix. So i have added noreg-hard label in the bug. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8388755: Use floating point argument for fillVertex in MTLRenderer Changes: https://git.openjdk.org/jdk/pull/32083/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=32083&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8388755 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/32083.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/32083/head:pull/32083 PR: https://git.openjdk.org/jdk/pull/32083
