Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pixel Format mismatch error with URP + Linear with Unity iOS #441

Open
1 of 4 tasks
nbxrconnect opened this issue Nov 3, 2023 · 2 comments
Open
1 of 4 tasks

Pixel Format mismatch error with URP + Linear with Unity iOS #441

nbxrconnect opened this issue Nov 3, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@nbxrconnect
Copy link

SPECIFIC ISSUE ENCOUNTERED

On iOS with unity plugin when URP is with Linear color space initialisation fails with pixel format mismatch error
For color attachment 0, the render pipeline's pixelFormat (MTLPixelFormatBGRA8Unorm) does not match the framebuffer's pixelFormat (MTLPixelFormatBGRA8Unorm_sRGB).

SMARTPHONE (please complete the following information):

  • Device: iPhone XR
  • OS
    • Android
    • [ X] iOS
  • OS version 16.6.1

STEPS TO REPRODUCE THE ISSUE

I dont have sample app. Assuming will occur with URP+Linear for any app.

EXPECTED BEHAVIOR

Should be able to see the VR view.

VERSIONS USED

What version of Google Cardboard are you using?
Cardboard XR Plugin 1.21.0

If you are using Cardboard XR Plugin:

  • What version of Unity are you using?
    2022.3.8f1

  • Select in which graphics API you can reproduce the bug.

    • OpenGL ES2
    • OpenGL ES3
    • Metal

LINK TO A REPOSITORY WITH CODE TO REPRODUCE THE BUG

(This is not mandatory but it allows us to faster reproduce, prioritize, debug and fix the reported issue)
[e.g. https://github.com/googlevr/cardboard]

SCREENSHOTS

If applicable, add screenshots to help depict your problem.

ADDITIONAL CONTEXT

Following is from logs
Cardboard Setup
Initializing XR...
2023-11-03 14:46:39.190066+0530 vrgallery[39897:5256811] [/Users/jballoffet/Documents/cardboard/sdk/unity/xr_unity_plugin/cardboard_display_api.cc : 415] Configured Metal as Graphics API.
2023-11-03 14:46:39.190428+0530 vrgallery[39897:5256811] [/Users/jballoffet/Documents/cardboard/sdk/unity/xr_unity_plugin/cardboard_input_api.cc : 144] Configured viewport orientation as landscape left.
[Subsystems] Loading plugin GfxPluginCardboard for subsystem CardboardDisplay...
[Subsystems] Cardboard successfully registered Provider for CardboardDisplay
[XR] [CardboardXrMain]: Display subsystem successfully loaded.
[Subsystems] Cardboard successfully registered Provider for CardboardInput
[Subsystems] Cardboard successfully registered Provider for CardboardDisplay
[XR] [CardboardXrMain]: Input subsystem successfully loaded.
[Subsystems] Loading plugin GfxPluginCardboard for subsystem CardboardInput...
[XR] [CardboardXrInputProvider]: Lifecycle initialized
[CardboardApi] Device params found.
XR initialized.
Starting XR...
[XR] [CardboardXrInputProvider]: Lifecycle started
XR started.
[XR] [CardboardXrDisplayProvider]: Initializes Cardboard API.
RequestCreateTexture
RequestCreateTexture
SetupRenderTextureFromXRRequest (id: 1 col: 0x283de6300 d: 0x0 sr: 0x0)
RenderTexture::Create (id: 1)
IVRDeviceCallback_CreateEyeTextureResources 0x283de6300
SetupRenderTextureFromXRRequest (id: 2 col: 0x283de5c70 d: 0x0 sr: 0x0)
RenderTexture::Create (id: 2)
IVRDeviceCallback_CreateEyeTextureResources 0x283de5c70
-[MTLDebugRenderCommandEncoder setRenderPipelineState:]:1604: failed assertion `Set Render Pipeline State Validation
For color attachment 0, the render pipeline's pixelFormat (MTLPixelFormatBGRA8Unorm) does not match the framebuffer's pixelFormat (MTLPixelFormatBGRA8Unorm_sRGB).

@nbxrconnect nbxrconnect added the bug Something isn't working label Nov 3, 2023
@lneumarkt
Copy link

@nbxrconnect Thank you for reaching out and reporting the issue you encountered.

I confirm that I’m able to reproduce the issue. An internal ticket has been added to our backlog and will be prioritized along with other issues.

We'll update this issue once we have some updates about it.

Thanks!

@julien-tamade
Copy link

I'm also running into something similar.

[/Users/jballoffet/Documents/cardboard/sdk/unity/xr_unity_plugin/cardboard_display_api.cc : 415] Configured Metal as Graphics API.
[/Users/jballoffet/Documents/cardboard/sdk/unity/xr_unity_plugin/cardboard_input_api.cc : 154] Configured viewport orientation as portrait.
[Subsystems] Loading plugin GfxPluginCardboard for subsystem CardboardDisplay...
[Subsystems] Cardboard successfully registered Provider for CardboardDisplay
[XR] [CardboardXrMain]: Display subsystem successfully loaded.
[Subsystems] Cardboard successfully registered Provider for CardboardInput
[Subsystems] Cardboard successfully registered Provider for CardboardDisplay
[XR] [CardboardXrMain]: Input subsystem successfully loaded.
[Subsystems] Loading plugin GfxPluginCardboard for subsystem CardboardInput...
[XR] [CardboardXrInputProvider]: Lifecycle initialized
Starting XR...
Stacktrace is not supported on this platform.

[XR] [CardboardXrInputProvider]: Lifecycle started
[XR] [CardboardXrDisplayProvider]: Initializes Cardboard API.
No device parameters currently saved.
RequestCreateTexture
RequestCreateTexture
SetupRenderTextureFromXRRequest (id: 1 col: 0x28245c070 d: 0x0 sr: 0x0)
RenderTexture::Create (id: 1)
IVRDeviceCallback_CreateEyeTextureResources 0x28245c070
SetupRenderTextureFromXRRequest (id: 2 col: 0x2824504f0 d: 0x0 sr: 0x0)
RenderTexture::Create (id: 2)
IVRDeviceCallback_CreateEyeTextureResources 0x2824504f0
-[MTLTextureDescriptorInternal validateWithDevice:], line 1357: error 'Texture Descriptor Validation
MTLTextureDescriptor has invalid pixelFormat (0).
'
-[MTLTextureDescriptorInternal validateWithDevice:]:1357: failed assertion `Texture Descriptor Validation
MTLTextureDescriptor has invalid pixelFormat (0).
'

It's causing my application to crash when entering VR. Please help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants