d3d12: fixes triangle list primitive state change not ackd. after touch call (#2951)
d3d12: fixes triangle list primitive state change not ackd. after touch call (#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.
bkaradzic/bgfx,bkaradzic/bgfx,bkaradzic/bgfx,bkaradzic/bgfx