Commit Graph

66990 Commits

Author SHA1 Message Date
Eric Anholt 6c3115af85 hash_table: Fix compiler warnings from the renaming.
Not sure how we both missed this.  None of the callers were using the
return value, though.
2014-12-14 20:22:07 -08:00
Jason Ekstrand 94303a0750 util/hash_table: Rework the API to know about hashing
Previously, the hash_table API required the user to do all of the hashing
of keys as it passed them in.  Since the hashing function is intrinsically
tied to the comparison function, it makes sense for the hash table to know
about it.  Also, it makes for a somewhat clumsy API as the user is
constantly calling hashing functions many of which have long names.  This
is especially bad when the standard call looks something like

_mesa_hash_table_insert(ht, _mesa_pointer_hash(key), key, data);

In the above case, there is no reason why the hash table shouldn't do the
hashing for you.  We leave the option for you to do your own hashing if
it's more efficient, but it's no longer needed.  Also, if you do do your
own hashing, the hash table will assert that your hash matches what it
expects out of the hashing function.  This should make it harder to mess up
your hashing.

v2: change to call the old entrypoint "pre_hashed" rather than
    "with_hash", like cworth's equivalent change upstream (change by
    anholt, acked-in-general by Jason).

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-12-14 19:32:53 -08:00
Mario Kleiner 0d7f4c8658 glx/dri3: Don't fail on glXSwapBuffersMscOML(dpy, window, 0, 0, 0) (v2)
glXSwapBuffersMscOML() with target_msc=divisor=remainder=0 gets
translated into target_msc=divisor=0 but remainder=1 by the mesa
api. This is done for server DRI2 where there needs to be a way
to tell the server-side DRI2ScheduleSwap implementation if a call
to glXSwapBuffers() or glXSwapBuffersMscOML(dpy,window,0,0,0) was
done. remainder = 1 was (ab)used as a flag to tell the server to
select proper semantic. The DRI3/Present backend ignored this
signalling, treated any target_msc=0 as glXSwapBuffers() request,
and called xcb_present_pixmap with invalid divisor=0, remainder=1
combo. The present extension responded kindly to this with a
BadValue error and dropped the request, but mesa's DRI3/Present
backend doesn't check for error codes. From there on stuff went
downhill quickly for the calling OpenGL client...

This patch fixes the problem.

v2: Change comments to be more clear, with reference to
relevant spec, as suggested by Eric Anholt.

Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-12-14 15:09:49 +00:00
Mario Kleiner 455d3036fa glx/dri3: Request non-vsynced Present for swapinterval zero. (v3)
Restores proper immediate tearing swap behaviour for
OpenGL bufferswap under DRI3/Present.

Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>

v2: Add Frank Binns signed off by for his original earlier
patch from April 2014, which is identical to this one, and
Chris Wilsons reviewed tag from May 2014 for that patch, ergo
also for this one.

v3: Incorporate comment about triple buffering as suggested
by Axel Davy, and reference to relevant spec provided by
Eric Anholt.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-12-14 15:09:49 +00:00
Mario Kleiner ad8b0e8bf6 glx/dri3: Track separate (ust, msc) for PresentPixmap vs. PresentNotifyMsc (v2)
Prevent calls to glXGetSyncValuesOML() and glXWaitForMscOML()
from overwriting the (ust,msc) values of the last successfull
swapbuffers call (PresentPixmapCompleteNotify event), as
glXWaitForSbcOML() relies on those values corresponding to
the most recent completed swap, not to whatever was last
returned from the server.

Problematic call sequence without this patch would have been, e.g.,

glXSwapBuffers()
... wait ...
swap completes -> PresentPixmapComplete event -> (ust,msc)
updated to reflect swap completion time and count.
... wait for at least 1 video refresh cycle/vblank increment.

glXGetSyncValuesOML()
-> PresentNotifyMsc event overwrites (ust,msc) of swap
completion with (ust,msc) of most recent vblank

glXWaitForSbcOML()
-> Returns sbc of last completed swap but (ust,msc) of last
completed vblank, not of last completed swap.
-> Client is confused.

Do this by tracking a separate set of (ust, msc) for the
dri3_wait_for_msc() call than for the dri3_wait_for_sbc()
call.

This makes the glXWaitForSbcOML() call robust again and restores
consistent behaviour with the DRI2 implementation.

Fixes applications originally written and tested against
DRI2 which also rely on this not regressing under DRI3/Present,
e.g., Neuro-Science software like Psychtoolbox-3.

This patch fixes the problem.

v2: Rename vblank_msc/ust to notify_msc/ust as suggested by
Axel Davy for better clarity.

Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
2014-12-14 15:09:49 +00:00
Mario Kleiner 8cab54de16 glx/dri3: Fix glXWaitForSbcOML() to handle targetSBC==0 correctly. (v2)
targetSBC == 0 is a special case, which asks the function
to block until all pending OpenGL bufferswap requests have
completed.

Currently the function just falls through for targetSBC == 0,
returning bogus results.

This breaks applications originally written and tested against
DRI2 which also rely on this not regressing under DRI3/Present,
e.g., Neuro-Science software like Psychtoolbox-3.

This patch fixes the problem.

v2: Simplify as suggested by Axel Davy. Add comments proposed
by Eric Anholt.

Cc: "10.3 10.4" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-12-14 15:09:49 +00:00
Emil Velikov ac0940224b docs: Add 10.4 sha256 sums, news item and link release notes
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit af0c82099b955f10471c15cb7a4dc8db29b84963)

Conflicts:
	docs/index.html
	docs/relnotes.html
2014-12-14 14:10:34 +00:00
Emil Velikov 1faac11778 docs: Update 10.4.0 release notes
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 5fe79b0b1272d530371a5d7248ed378cff4f6d21)
2014-12-14 14:10:34 +00:00
Rob Clark 0ebd623f60 freedreno/a4xx: mipmaps
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-12-13 15:09:37 -05:00
Rob Clark cf80694df5 freedreno: update generated headers
Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-12-13 15:09:37 -05:00
Rob Clark f24e910da4 freedreno: add is_a3xx()/is_a4xx() helpers
A bunch of open-coded 'gpu_id > 300's seems like it will eventually
cause problems with future generations.  There were already a few minor
problems with caps for features that still need additional work on a4xx.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-12-13 15:09:37 -05:00
Rob Clark 7474de2235 freedreno: helper to calc layer/level offset
Rather than duplicating this everywhere.  Especially as on a4xx the
layout of layers and levels differs based on texture type.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-12-13 15:09:37 -05:00
Kenneth Graunke 23caba862a i965/vec4: Drop writemasks on scratch reads.
This code is complete nonsense and has apparently existed since I first
implemented register spilling in the VS two years ago.

Scratch reads are SEND messages, which ignore the destination writemask.

The comment about "data that may not have been written to scratch" is
also confusing - we always spill whole 4x2 registers, so such data
simply does not exist.  We can safely ignore the writemask.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-12-12 23:21:27 -08:00
Timothy Arceri a3218e65d1 mesa: remove long dead 3Dnow optimisation
This code has been turned off for the last
decade. Considering 3Dnow is obsolete it
seems the bug will never be fixed so just
remove it.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-12-13 12:15:25 +11:00
Brian Paul 64bd1ac2b1 ir_to_mesa: remove unused 'target' variable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-12-12 16:45:33 -07:00
Brian Paul 7dccc1a57a util: add missing closing brace for __cplusplus 2014-12-12 16:45:33 -07:00
Brian Paul 0dcc7de205 mesa: remove obsolete comment on _mesa_ClearColor() 2014-12-12 16:45:33 -07:00
Brian Paul caa13c59ef mesa: whitespace fixes, 80-column wrapping in texobj.c 2014-12-12 16:45:33 -07:00
Brian Paul e725dc0a74 mesa: whitespace, line wrap fixes in clear.c 2014-12-12 16:45:33 -07:00
Matt Turner 3f3aeb5333 mapi: Move rules for generating glapi_mapi_tmp.h out of the conditional.
Allows distcheck to succeed, regardless of how Mesa has been configured.
2014-12-12 12:11:50 -08:00
Matt Turner 5ea4b25fba glsl: Add dist-hook to delete glcpp test *.out files. 2014-12-12 12:11:50 -08:00
Matt Turner a29ae0b3dd glcpp: Make tests write .out files to builddir. 2014-12-12 12:11:50 -08:00
Matt Turner 75c7a7114f gallium: Remove Android files from distribution.
Android builds Mesa from git, so there don't need to be in the tarball.
2014-12-12 12:11:50 -08:00
Matt Turner 00eadb77e6 osmesa: Add osmesa.def to distribution. 2014-12-12 12:11:50 -08:00
Matt Turner 92f89f0c0c x86-64: Remove calling_convention.txt.
It just details the x86-64 calling convention. No need for this in Mesa.
2014-12-12 12:11:50 -08:00
Matt Turner 9e191e8829 drivers/x11: Add headers to distribution. 2014-12-12 12:11:50 -08:00
Matt Turner dd6a43f07c drivers/windows: Add to distribution. 2014-12-12 12:11:50 -08:00
Matt Turner d51150a98a mesa: Add autogen.sh to distribution. 2014-12-12 12:11:50 -08:00
Matt Turner 4401e2b219 mapi: Add ABI-check tests to distribution. 2014-12-12 12:11:50 -08:00
Matt Turner 43ac31dff0 mesa: Add notes/readme files to distribution. 2014-12-12 12:11:50 -08:00
Matt Turner a208e9b520 util: Wire up u_atomic_test. 2014-12-12 12:11:50 -08:00
Matt Turner 952b324b23 mesa: Add scons files to distribution. 2014-12-12 12:11:50 -08:00
Matt Turner f6502aaa58 haiku: Add files to distribution. 2014-12-12 12:11:50 -08:00
Matt Turner fe2c72e6ec egl: Add files to distribution. 2014-12-12 12:11:49 -08:00
Matt Turner feb741dc7c egl+gbm: Add symbols-check tests to distribution. 2014-12-12 12:11:49 -08:00
Matt Turner 0ac98e7296 docs: Add to distribution. 2014-12-12 12:11:49 -08:00
Matt Turner 55983a1eaa glapi/gen: Add gl_and_glX_API.xml to distribution. 2014-12-12 12:11:49 -08:00
Matt Turner 7a26c82489 glx/apple: Add headers to distribution. 2014-12-12 12:11:49 -08:00
Matt Turner a267212a4d mesa: Add a dist hook to remove .gitignore files from distribution. 2014-12-12 12:11:49 -08:00
Matt Turner b662d5282f mesa: Add clean-local rule to remove .lib links. 2014-12-12 12:11:49 -08:00
Matt Turner 8e2577f2a9 glsl: Add clean-local rule to delete glcpp test output. 2014-12-12 12:11:49 -08:00
Matt Turner e643fd3b4a util: List hash_table tests as check_PROGRAMS.
EXTRA_PROGRAMS is not what you want for binaries listed in TEST.
2014-12-12 12:11:49 -08:00
Matt Turner 216248730a xmlpool: Add $(MOS) and options.h to CLEANFILES. 2014-12-12 12:11:49 -08:00
Matt Turner 3b7bcb5d04 dri: Add uninstall hooks to handle megadriver hardlinks. 2014-12-12 12:11:49 -08:00
Matt Turner 65155c208d targets/dri: Remove unnecessary variables in install-data-hook. 2014-12-12 12:11:49 -08:00
Matt Turner d27379d016 glx/tests: Add headers to distribution. 2014-12-12 12:11:49 -08:00
Matt Turner 3d357d030f gallium/targets: Add *.sym files to distribution.
And add d3dadapter9's extra dependency.
2014-12-12 12:11:49 -08:00
Matt Turner 00ab151ad1 egl/dri2: Add headers to distribution. 2014-12-12 12:11:49 -08:00
Matt Turner 7a08a1e61b egl: Drop unnecessary Makefile.am. 2014-12-12 12:11:48 -08:00
Matt Turner d1c1d6d9b6 glx: Add headers to distribution. 2014-12-12 12:11:48 -08:00