We only need this when the server may have swapped the buffers or
when we receive an invalidate event from the server. The default
behaviour is still that the DRI driver will invalidate its own buffers
when glViewport is called.
https://bugs.freedesktop.org/show_bug.cgi?id=27277
Seeing very weird crashes during std::cout initialization.
The fault probably lies in the way I build LLVM on MSVC, but disable for
now to allow more time to investigate.
When internal_format and tex->format differ, st_finailize_texture will
surface_copy between surfaces with different formats. This commit works
around the issue by ignoring internal_format. A sane fix is needed
here.
In particular, don't use the clamped lod to compute level + 1, or
lod in [-1, 0] range will actually interpolate with level 1.
This makes Mipfilter DCT pass 100%.
Also start axing the code duplication for scalar case. The olution is to
treat the scalar case specially in a few innermost functions, and leave
outer functions untouched.
It's quite a pain to remember the details after a while, and it is quite
likely we'll want to use this again, either for different polynomial
orders or different functions, so commit it here.
The advantage of range[-0.5, 0.5] is that it doesn't require floor (for
which intrinsics are only available in SSE4.1).
But the EXP opcode pretty much forces us to use floor, and there is a
good floor approximation around truncation available anyway.
This fixes EXP failures in VShader DCT.
This reduces redundant code by moving:
- CS space reservation
- buffer validation
- dirty state emission
- index bias emission
- AOS emission
into r300_prepare_for_rendering.
The cont_mask must be restored and exec mask recomputed in order to decide
whether to repeat the loop or not.
Unlike the continue mask, the break_mask must be preserved across loop
iterations.
Fixes several VShader DCT cases, and no regressions with glean.