JDK-8302166 : Move a call added for text rendering in MetalContext.drawIndexedQuads to a correct place
  • Type: Sub-task
  • Component: javafx
  • Sub-Component: graphics
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic
  • Submitted: 2023-02-09
  • Updated: 2024-07-06
  • Resolved: 2023-03-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
internalFixed
Description
Currently following code block is added in MetalContext.drawIndexedQuads()
```
   if (tex0 != nil) {
        id<MTLTexture> tex = [tex0 getTexture];
        [renderEncoder useResource:tex usage:MTLResourceUsageRead];
    }
```
This call is required for text rendering but has side effect that it will be applied to any texture from any shader that was set last.
This call should be moved to better place where it's execution scope is limited to it's need.
Comments
Changeset: 8b78f5ca Author: Ambarish Rapte <arapte@openjdk.org> Date: 2023-03-02 16:54:30 +0530 URL: https://github.com/openjdk/jfx-sandbox/commit/8b78f5caec05490e61f3d77c7a2c8e3b2d420419
02-03-2023

a TODO is added here : https://github.com/openjdk/jfx-sandbox/commit/37606f06ea1e45f56233edf1f02decd98dd3ec99
09-02-2023