Sitelet https://github.com/gpuweb/gpuweb/issues/1085
Skip to content

Should clear values for integers lose precision, or be emulated on D3D12? #1085

Description

@kainino0x

Spinoff from #965 for a specific question.

From #965 (comment), D3D12 only allows float values for ClearRenderTargetView and D3D12_RENDER_PASS_BEGINNING_ACCESS_CLEAR_PARAMETERS. In order to make the behavior portable we have two options:

  • Round the clear value to float in all backends before passing the value in (makes it possible, e.g., to clear to 0xffff_ff00 but not any value greater than that).
  • Emulate the clear with a fullscreen quad in D3D12 (suggested here).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions