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

regression: Incompatible color attachments #5904

Closed
sagudev opened this issue Jul 3, 2024 · 2 comments · Fixed by #5933
Closed

regression: Incompatible color attachments #5904

sagudev opened this issue Jul 3, 2024 · 2 comments · Fixed by #5933
Labels
area: validation Issues related to validation, diagnostics, and error handling type: bug Something isn't working

Comments

@sagudev
Copy link
Contributor

sagudev commented Jul 3, 2024

While updating servo from 1e784c9 to f25e07b in servo/servo#32665, there was one unexpected FAIL result: webgpu:api,operation,texture_view,format_reinterpretation:render_and_resolve_attachment:* (src of the test: https://github.com/gpuweb/cts/blob/9c8e5ba09314be2cec8a5cbd69b7b2f0fec7f89f/src/webgpu/api/operation/texture_view/format_reinterpretation.spec.ts#L191C9-L191C38)

Description
On f25e07b there is unexpected validation error:

Validation { source: ContextError { string: "RenderPass::end", cause: RenderPassError { scope: SetPipelineRender, inner: RenderCommand(IncompatiblePipelineTargets(IncompatibleColorAttachment { indices: [0], expected: [Some(Rgba8Unorm)], actual: [Some(Rgba8UnormSrgb)], res: ResourceErrorIdent { type: "RenderPipeline", label: "" } })) }, label_key: "label", label: "" }, description: "Validation Error\n\nCaused by:\n    In RenderPass::end\n    In a set_pipeline command\n    Render pipeline targets are incompatible with render pass\n    Incompatible color attachments at indices [0]: the RenderPass uses textures with formats [Some(Rgba8Unorm)] but the RenderPipeline with '' label uses attachments with formats [Some(Rgba8UnormSrgb)]\n" }

but 1e784c9 worked fine.

Repro steps
I was able to reproduce what CTS does by tracing wgpu functions that are called by servo; repro is available here: https://github.com/sagudev/wgpu-problem/tree/render_and_resolve_attachment

EDIT: This is caused by 0a76c0f

@sagudev
Copy link
Contributor Author

sagudev commented Jul 3, 2024

This is caused by #5884, CC @Wumpf

@nical nical added type: bug Something isn't working area: validation Issues related to validation, diagnostics, and error handling labels Jul 8, 2024
@DCNick3
Copy link

DCNick3 commented Jul 10, 2024

I am hitting a similar problem when trying to render via an Rgba8Unorm view into a Rgba8UnormSrgb texture. It seems that the view is not respected and the validation check thinks that it's rendering into an Rgba8UnormSrgb attachment:

wgpu error: Validation Error

Caused by:
  In RenderPass::end
    In a set_pipeline command
      Render pipeline targets are incompatible with render pass
        Incompatible color attachments at indices [0]: the RenderPass uses textures with formats [Some(Rgba8UnormSrgb)] but the RenderPipeline with 'YuvSpritePipeline' label uses attachments with formats [Some(Rgba8Unorm)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: validation Issues related to validation, diagnostics, and error handling type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants