On Wed, 29 Jul 2026 08:01:26 GMT, Jayathirth D V <[email protected]> wrote:

> 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 no 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).

This pull request has now been integrated.

Changeset: 63808b08
Author:    Jayathirth D V <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/63808b08e156592458f759cbd2aa6ae9108735ae
Stats:     2 lines in 1 file changed: 0 ins; 0 del; 2 mod

8388755: Use floating point argument for fillVertex in MTLRenderer

Reviewed-by: azvegint, avu, serb

-------------

PR: https://git.openjdk.org/jdk/pull/32083

Reply via email to