This fixes the sw fallback for GL_SELECT picking modes.
Fixes object picking blender + depthpick test
http://bugs.freedesktop.org/show_bug.cgi?id=26419
Signed-off-by: Dave Airlie <airlied@redhat.com>
The array stack space wasn't allocated to the proper size. Fixes out of
bounds memory writes when the client/array stack depth exceeds one.
See fd.o bug 26768.
The rb->InternalFormat field will be set by the caller if the allocation
succeeds. Until then, this field's value can't be used. Fixes a failed
assertion with FlightGear.
(cherry picked from commit fe25476c04)
FRAG & TILE buffer are unused but still they need
to be associated with a valid relocation so that
userspace can't try to abuse them to overwritte
GART and then try to write anywhere in system
memory.
The kernel lets you clear depth without getting a depth offset
from userspace, mesa used to emit state before clear, but that got
lost in the refactoring, which made the kernel bug show up. Fix
mesa driver to emit the state properly now.
cherry-pick + squash master commits.
Signed-off-by: Dave Airlie <airlied@redhat.com>
This reverts commit 9d17ad2891.
Fun stuff so fixing exposes another bug which I'm having trouble
tracking down. So for now I'm just going to revert this untill
I can fix the real bug. Sorry about this.
This fixes a regression with Lightsmark, where more compact TGSI from Mesa
was causing a zero mask MOV to be emitted for shadow map compare, causing
problems in some backends.
Add a few more assertions to catch cases like this.
This avoids exposing the ms driver structure to the winsys,
and nicely encapsulates driver customizable stuff.
In the future more things might be customizable by the winsys, like
throttling, 3D readback etc.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
The optimized Z-test functions assumed that the array of incoming quads
are adjacent, but that's not always true. The fragment shader can cull
intermediate quads, for example.
Now these Z-test functions can cope with non-adjacent quads. A little bit
of performance is probably lost, but it's probably not worth worring about.
This fixes broken glBitmap() Z testing, among other things.
Fixes crash in Homeworld2 which tries to create a 14MB buffer, because we
now avoid creating GMR buffers larger than 8MB to ensure progress given
we have only a 16MB pool.
Since the execbuffer change actually changed size off the ioctl
struct and not just a reuse of padded bits, we can't support
old kernels as easily as the scanout change was.
It seems there are still some places where draw can happen with mapped
buffers... Remove the assertions since there is not much more than can
be done at this moment.
This partially reverts commit af2023e31c.
Remove const qualifier from _mesa_HashLookup() table parameter to
avoid LOCK/UNLOCK warnings in the function body.
Signed-off-by: Brian Paul <brianp@vmware.com>
Purpose is two fold:
- when doing user-space memory management mapping a buffer stored in the
graphics aperture effectively pins it there, increasing the likelyhood
of failure of validating other buffers when flushing
- certain hardware/platform combinations do not allow a buffer to be
simultaneously mapped and validated
This fixes assertion failures in HL Uplink with the svga driver, where
vbo was holding a map to a buffer which was also referred in the command
stream.
Note: this a non-invasive fix and shouldn't be just cherry-picked into
master as-is -- a cleaner fix for this problem should be searched.