Commit Graph

67023 Commits

Author SHA1 Message Date
Juha-Pekka Heikkila 4b342fbbb7 mapi: add glapi-test and shared-glapi-test to .gitignore
On the same go remove src/mapi/shared-glapi/tests/.gitignore
and src/mapi/glapi/tests/.gitignore as useless.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-12-16 13:51:09 +02:00
Juha-Pekka Heikkila ebbf0a250a util: add u_atomic_test to .gitignore
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-12-16 13:50:59 +02:00
Juha-Pekka Heikkila 5d431ffd61 glx: remove __glXstrdup()
I didn't find this being used anywhere

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-12-16 13:50:53 +02:00
Juha-Pekka Heikkila 096b48b3e1 i965: add test_vf_float_conversions to .gitignore
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-12-16 13:50:45 +02:00
Juha-Pekka Heikkila 430fbd8ad8 i965: Make validate_reg tables constant
Declare local tables constant.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2014-12-16 13:50:38 +02:00
Timothy Arceri 873d7351c5 glsl: remove commented out code
MaxGeometryOutputComponents is used as the value
for gl_MaxGeometryVaryingComponents

Acked-by: Matt Turner <mattst88@gmail.com>
2014-12-16 15:57:30 +11:00
Timothy Arceri 965cfbc85e i965: remove commented out code
Acked-by: Matt Turner <mattst88@gmail.com>
2014-12-16 15:57:25 +11:00
Ilia Mirkin 1402f689f1 nvc0: add missed PIPE_CAP_VERTEXID_NOBASE
Commit ade8b26bf missed adding this cap to nvc0.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-12-15 23:18:07 -05:00
Roland Scheidegger fef58979e1 st/mesa: use vertex id lowering according to pipe cap bit.
Tested with llvmpipe by setting the cap bit temporarily, seems to work,
though no driver requests it for now.
2014-12-16 04:23:00 +01:00
Roland Scheidegger 97dc3d826e draw: implement support for the VERTEXID_NOBASE and BASEVERTEX semantics.
This fixes 4 vertexid related piglit tests with llvmpipe due to switching
behavior of vertexid to the one gl expects.
(Won't fix non-llvm draw path since we don't get the basevertex currently.)
2014-12-16 04:23:00 +01:00
Roland Scheidegger ade8b26bf5 gallium: add TGSI_SEMANTIC_VERTEXID_NOBASE and TGSI_SEMANTIC_BASEVERTEX
Plus a new PIPE_CAP_VERTEXID_NOBASE query. The idea is that drivers not
supporting vertex ids with base vertex offset applied (so, only support
d3d10-style vertex ids) will get such a d3d10-style vertex id instead -
with the caveat they'll also need to handle the basevertex system value
too (this follows what core mesa already does).
Additionally, this is also useful for other state trackers (for instance
llvmpipe / draw right now implement the d3d10 behavior on purpose, but
with different semantics it can just do both).
Doesn't do anything yet.
And fix up the docs wrt similar values.

v2: incorporate feedback from Brian and others, better names, better docs.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2014-12-16 04:23:00 +01:00
Dave Airlie 3c8ef3a74b r600g/sb: implement r600 gpr index workaround. (v3.1)
r600, rv610 and rv630 all have a bug in their GPR indexing
and how the hw inserts access to PV.

If the base index for the src is the same as the dst gpr
in a previous group, then it will use PV instead of using
the indexed gpr correctly.

The workaround is to insert a NOP when you detect this.

v2: add second part of fix detecting DST rel writes followed
by same src base index reads.

v3: forget adding stuff to structs, just iterate over the
previous node group again, makes it more obvious.
v3.1: drop local_nop.

Fixes ~200 piglit regressions on rv635 since SB was introduced.

Reviewed-By: Glenn Kennard <glenn.kennard@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-12-16 12:44:45 +10:00
Vadim Girlin de0fd375f6 r600g/sb: fix issues with loops created for switch
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-12-16 12:43:31 +10:00
Dave Airlie 34e512d9ea Revert "r600g/sb: fix issues cause by GLSL switching to loops for switch"
This reverts commit 7b0067d23a.

Vadim's patch fixes this a lot better.
2014-12-16 12:43:23 +10:00
Eric Anholt 1b486b52ac vc4: Add support for 32-bit signed norm/scaled vertex attrs.
32-bit unsigned would require some adjustments to handle values >=
0x80000000.
2014-12-15 14:33:05 -08:00
Eric Anholt 48a2154520 vc4: Add support for 16-bit signed/unsigned norm/scaled vertex attrs. 2014-12-15 14:33:01 -08:00
Eric Anholt 9ca32d6c19 vc4: Rename the 16-bit unpack #define.
It's only an f16 conversion if you're doing a float operation, otherwise
it's 16 bit signed to 32-bit signed.
2014-12-15 14:33:01 -08:00
Eric Anholt 2142fd1f6f vc4: Add support for 8-bit unnormalized vertex attrs. 2014-12-15 14:33:00 -08:00
Eric Anholt 214a169b32 vc4: Refactor vertex attribute conversions a bit.
There was just way too much indentation.
2014-12-15 14:28:23 -08:00
Eric Anholt 1fa1ee56a0 vc4: Fix use of r3 as a temp in 8-bit unpacking.
We're actually allocating out of r3 now, and I missed it because I'd typed
this one as qpu_rn(3) instead of qpu_r3().
2014-12-15 14:28:23 -08:00
Eric Anholt 8e678de761 vc4: Rename UNPACK_8* to UNPACK_8*_F.
There is an equivalent unpack function without conversion to float if you
use an integer operation instead.
2014-12-15 14:28:23 -08:00
Eric Anholt ade7704685 vc4: Add support for UMAD. 2014-12-15 14:28:23 -08:00
Eric Anholt 440075fb50 vc4: 0-initialize the screen again.
I typoed this when rebasing the memory leak fixes.
2014-12-15 14:28:22 -08:00
Maxence Le Doré 19e05d6898 glsl: Add gl_MaxViewports to available builtin constants
It seems to have been forgotten during viewports array implementation time.

Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-12-15 12:20:00 -08:00
Andres Gomez 8517e665bc i965/brw_reg: struct constructor now needs explicit negate and abs values.
We were assuming, when constructing a new brw_reg struct, that the
negate and abs register modifiers would not be present by default in
the new register.

Now, we force explicitly setting these values when constructing a new
register.

This will avoid problems like forgetting to properly set them when we
are using a previous register to generate this new register, as it was
happening in the dFdx and dFdy generation functions.

Fixes piglit test shaders/glsl-deriv-varyings

Cc: "10.4 10.3" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82991
Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-12-15 11:40:22 -08:00
Eric Anholt e108442bb1 vc4: Fix leaks of the compiled shaders' keys. 2014-12-14 23:12:11 -08:00
Eric Anholt 667719fcb2 vc4: Fix leaks of the CL contents. 2014-12-14 23:12:11 -08:00
Eric Anholt 1f1ca8b2ea vc4: Fix leak of vc4_bos stashed in the context. 2014-12-14 23:12:11 -08:00
Eric Anholt 80ed075e60 vc4: Fix leak of the compiled shader programs in the cache. 2014-12-14 23:12:11 -08:00
Eric Anholt 4da9e3d805 vc4: Fix leak of a copy of the scheduled QPU instructions.
They're copied into a vc4_bo after compiling is done.
2014-12-14 23:12:11 -08:00
Eric Anholt 5c9b8eace2 vc4: Switch to using the util/ hash table.
No performance difference on a microbenchmark with norast that should hit it
enough to have mattered, n=220.
2014-12-14 23:12:11 -08:00
Eric Anholt c84306fdc2 vc4: Fix leak of simulator memory on screen cleanup. 2014-12-14 23:11:59 -08:00
Eric Anholt f519c3bff1 vc4: Fix a leak of the simulator's exec BO's actual vc4_bo. 2014-12-14 23:10:35 -08:00
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