Skip to content

OSR RGBAF16 textures and ARGB textures have different properties on Windows #49752

@storycraft

Description

@storycraft

Preflight Checklist

Electron Version

40.2.1

What operating system(s) are you using?

Windows

Operating System Version

Windows 11 25H2

What arch are you using?

x64

Last Known Working Electron version

No response

Does the issue also appear in Chromium / Google Chrome?

I don't know how to test

Expected Behavior

If useSharedTexture is enabled, shared texture should be created with same directx texture flags for any pixelFormat in OffscreenSharedTexture object.

Actual Behavior

Shared textures are created with different directx texture flags.

To be specific

  • Shared texture with pixelFormat: bgra is created only with D3D11_RESOURCE_MISC_SHARED_NTHANDLE flag as stated documentation.
  • Shared texture with pixelFormat: rgbaf16 is created with D3D11_RESOURCE_MISC_SHARED_NTHANDLE and D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX flags. So IDXGIKeyedMutex must be acquired and locked with key 0. Without this, all GPU operations, such as copying and drawing, will perform as if the texture were transparent, without any error.

Testcase Gist URL

No response

Additional Information

Shared textures should be created using same flags, or at least the differences should be clearly stated in the documentation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions