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

d3d12: fixes tri list primitive state change not ackd. after touch call #2951

Conversation

cigumo
Copy link
Contributor

@cigumo cigumo commented Oct 7, 2022

Suppose this is the draw call sequence in a frame:

  • triangle strip
  • touch (required to apply stencil changes for example)
  • triangle list

Touch masks the change (as it's triangle list by default) by setting changedFlags, but not primIndex. When the triangle list is processed, the STATE_PT is already set to triangle list, so the test for changedFlags is skipped and primIndex stays with triangle strip.

The fix detects the change in the STATE_PT and updates primIndex.

…ch call

Suppose this is the draw call sequence in a frame:
- triangle strip
- touch (required to apply stencil changes for example)
- triangle list

Touch masks the change (as it's triangle list by default) by setting
changedFlags, but not primIndex. When the triangle list is processed,
the STATE_PT is already set to triangle list, so the test for
changedFlags is skipped and primIndex stays with triangle strip.

The fix detects the change in the STATE_PT and updates primIndex.
@cigumo cigumo requested a review from bkaradzic as a code owner October 7, 2022 20:11
@bkaradzic bkaradzic merged commit bf411dd into bkaradzic:master Oct 8, 2022
mipek pushed a commit to mipek/bgfx that referenced this pull request Mar 2, 2024
…ch call (bkaradzic#2951)

Suppose this is the draw call sequence in a frame:
- triangle strip
- touch (required to apply stencil changes for example)
- triangle list

Touch masks the change (as it's triangle list by default) by setting
changedFlags, but not primIndex. When the triangle list is processed,
the STATE_PT is already set to triangle list, so the test for
changedFlags is skipped and primIndex stays with triangle strip.

The fix detects the change in the STATE_PT and updates primIndex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants