diff options
author | Roland Scheidegger <[email protected]> | 2016-11-13 17:17:25 +0100 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2016-11-21 20:02:53 +0100 |
commit | 78a997f72841310620d18daa9015633343d04db1 (patch) | |
tree | 8e5eeddc4f749ac58e69b529d51637869b35298f /include/GLES | |
parent | 7a55c436c64a8bb031c8823522cde8f3adc67d89 (diff) |
draw: drop unnecessary index overflow handling from vsplit code
This was kind of strange, since it replaced indices which were only
overflowing due to bias with MAX_UINT. This would cause an overflow later
in the shader, except if stride was 0, however the vertex id would be
essentially random then (-1 + eltBias). No test cared about it, though.
So, drop this and just use ordinary int arithmetic wraparound as usual.
This is much simpler to understand and the results are "more correct" or
at least more consistent (vertex id as well as actual fetch results just
correspond to wrapped around arithmetic).
There's only one catch, it is now possible to hit the cache initialization
value also with ushort and ubyte elts path (this wouldn't be an issue if
we'd simply handle the eltBias itself later in the shader). Hence, we need
to make sure the cache logic doesn't think this element has already been
emitted when it has not (I believe some seriously bad things could happen
otherwise). So, borrow the logic which handled this from the uint case, but
not before fixing it up...
Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'include/GLES')
0 files changed, 0 insertions, 0 deletions