summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-05-25 10:17:32 -0700
committerKenneth Graunke <[email protected]>2013-05-29 14:22:08 -0700
commit49aba27973d81e388bef49a79391d5fdef3f5f18 (patch)
tree6ed1c8ed7ff4d9084f093095b92cf44793a90b53 /src/mesa/state_tracker
parent7c87a3b5dac118697a9b67caa7b6d5cab60f316d (diff)
i965: Fix can_cut_index_handle_restart_index() for byte/short types.
Pre-Haswell hardware doesn't support an arbitrary restart index, and instead compares the index buffer value against 0xFF for byte-size buffers, 0xFFFF for short-size buffers, or 0xFFFFFFFF for unsigned integer buffers. OpenGL allows the restart index to be an arbitrary unsigned integer. When comparing against byte/short types, the index buffer value should be promoted to a full 32-bit integer before doing the comparison. The restart index is /not/ supposed to be masked to byte/short size. This means that with certain restart indexes, the comparison should always fail. For example, a restart index of 0xF000FFFF should never match any byte/short index buffer values due to the extra high bits. We must not enable hardware primitive restart in such a case. For now, fall back to software primitive restart as it's the simplest fix. In the future, we could detect restart indexes that will never match and skip both hardware and software primitive restart. NOTE: This is a candidate for stable branches. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
0 files changed, 0 insertions, 0 deletions