History log of /external/mesa3d/src/mesa/main/syncobj.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2d7e0f35c54f49c3280eea308a652253cb3bde46 07-Oct-2016 Tapani Pälli <tapani.palli@intel.com> mesa: throw error if bufSize negative in GetSynciv on OpenGL ES

Fixes following dEQP tests:

dEQP-GLES31.functional.debug.negative_coverage.callbacks.state.get_synciv
dEQP-GLES31.functional.debug.negative_coverage.get_error.state.get_synciv
dEQP-GLES31.functional.debug.negative_coverage.log.state.get_synciv

v2: drop _mesa_is_gles check (Kenneth)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98133
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/main/syncobj.c
feb53912f8d8c29594a9fdff914d78bb36d6d56b 02-Feb-2016 Steinar H. Gunderson <sesse@google.com> mesa: Fix locking of GLsync objects.

GLsync objects had a race condition when used from multiple threads
(which is the main point of the extension, really); it could be
validated as a sync object at the beginning of the function, and then
deleted by another thread before use, causing crashes. Fix this by
changing all casts from GLsync to struct gl_sync_object to a new
function _mesa_get_and_ref_sync() that validates and increases
the refcount.

In a similar vein, validation itself uses _mesa_set_search(), which
requires synchronization -- it was called without a mutex held, causing
spurious error returns and other issues. Since _mesa_get_and_ref_sync()
now takes the shared context mutex, this problem is also resolved.

Fixes bug #92757, found while developing Nageru, my live video mixer
(due for release at FOSDEM 2016).

v2: Marek: silence warnings, fix declaration after code

Signed-off-by: Steinar H. Gunderson <sesse@google.com>
Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/mesa/main/syncobj.c
153b8b35257fb5d68735b5e43e48b0cdb8b15170 15-Jan-2015 Jason Ekstrand <jason.ekstrand@intel.com> util/hash_set: Rework the API to know about hashing

Previously, the set 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 set 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_set_add(ht, _mesa_pointer_hash(key), key);

In the above case, there is no reason why the hash set 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 set will assert that your hash matches what it
expects out of the hashing function. This should make it harder to mess up
your hashing.

This is analygous to 94303a0750 where we did this for hash_table

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/main/syncobj.c
4c99e3ae78ed3524d188f00b558f803a943aaa00 15-Jan-2015 Jason Ekstrand <jason.ekstrand@intel.com> util: Move main/set to util/hash_set

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/main/syncobj.c
72e55bb6888ff4d6b69b10d9c58573e4c3d492ec 25-Feb-2014 Kenneth Graunke <kenneth@whitecape.org> util: Move the open-addressing linear-probing hash_table to src/util.

This hash table is used in core Mesa, the GLSL compiler, and the i965
driver, which makes it a good candidate for the new src/util module.

It's much faster than program/hash_table.[ch] (see commit 6991c2922f5
for data), and José's u_hash_table.c has a comment saying Gallium should
probably consider switching to a linear probing hash table at some point.
So this seems like the best candidate for a shared data structure.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>

v2 (Jason Ekstrand): Pick up another hash_table use and patch up scons

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
/external/mesa3d/src/mesa/main/syncobj.c
d129ea7fa2e57288f64cd247a0ac6d876e1717d2 01-Mar-2014 Brian Paul <brianp@vmware.com> mesa: switch to c11 mutex functions

Reviewed-by: José Fonseca <jfonseca@vmware.com>
/external/mesa3d/src/mesa/main/syncobj.c
6659131be3bde0505a85e3a7d27382b273822bee 14-Sep-2013 Brian Paul <brianp@vmware.com> mesa: check for bufSize > 0 in _mesa_GetSynciv()

The spec doesn't say GL_INVALID_VALUE should be raised for bufSize <= 0.
In any case, memcpy(len < 0) will lead to a crash, so don't allow it.

CC: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/main/syncobj.c
755602df12cab123b8927e8d71b199b73e48b71b 14-Sep-2013 Brian Paul <brianp@vmware.com> mesa: minor fix-ups for _mesa_validate_sync()

Return bool instead of int. Const-qualify the syncObj. Add some comments.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/main/syncobj.c
fd66a85f6bd974150e112c0f7275190c1f55bf8f 10-Sep-2013 Vinson Lee <vlee@freedesktop.org> mesa: Ensure gl_sync_object is fully initialized.

278372b47e4db8a022d57f60302eec74819e9341 added the uninitialized pointer
field gl_sync_object:Label. A free of this pointer, added in commit
6d8dd59cf53d2f47b817d79204a52bb3a46e8c77, resulted in a crash.

This patch fixes piglit ARB_sync regressions with swrast introduced by
6d8dd59cf53d2f47b817d79204a52bb3a46e8c77.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/syncobj.c
21b5bf712b47e03d21dfa2c93acb272b9b575fe7 26-Aug-2013 Timothy Arceri <t_arceri@yahoo.com.au> mesa: make _mesa_validate_sync() non-static

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/syncobj.c
6d8dd59cf53d2f47b817d79204a52bb3a46e8c77 26-Aug-2013 Timothy Arceri <t_arceri@yahoo.com.au> mesa: free object labels when deleting

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>

Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/syncobj.c
b76f6d9557ff27140e18cf8aa2b57db8876d5d4d 17-Apr-2013 Brian Paul <brianp@vmware.com> mesa: remove #include "mfeatures.h" from numerous source files

None of the remaining FEATURE_x symbols in mfeatures.h are used anymore.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
/external/mesa3d/src/mesa/main/syncobj.c
ab4c549378cc2e355e24b8cd3a4cbf28434fd6a8 18-Jan-2013 Eric Anholt <eric@anholt.net> mesa: Initially populate the display list with the exec list.

This cuts out a ton of code to make functions not set to a save_ variant
match.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/main/syncobj.c
a9754793dab4b24c09cae21c29f902ce0e53319a 17-Jan-2013 Eric Anholt <eric@anholt.net> mesa: Drop manual checks for outside begin/end.

We now have a separate dispatch table for begin/end that prevent these
functions from being entered during that time. The
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVALs are left because I don't want to
change any return values or introduce new error-only stubs at this
point.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
/external/mesa3d/src/mesa/main/syncobj.c
0151237457f47a43fa64111e462da851c4b8ab4c 08-Dec-2012 Jordan Justen <jordan.l.justen@intel.com> mesa syncobj: don't store a pointer to the set_entry

The set_entry pointer can become invalid if the set table
is re-hashed.

This likely will fix
https://bugs.freedesktop.org/show_bug.cgi?id=58012
(Regression since 56e95d3c)

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/main/syncobj.c
56e95d3ca231110188e5b910f4e17104f3176d52 04-Dec-2012 Jordan Justen <jordan.l.justen@intel.com> mesa: validate that sync objects were created by mesa

Previously, the user could send in a pointer that was not created
by mesa. When we dereferenced that pointer, there would be an
exception.

Now we keep a set of pointers and verify that the pointer
exists in that set before dereferencing it.

Note: This fixes several crashing gles3conform tests.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/syncobj.c
e12d9f0c6df9f309ade2aea708264c81038685b1 04-Dec-2012 Jordan Justen <jordan.l.justen@intel.com> main/syncobj: return GL_INVALID_VALUE for invalid sync objects

Note: The GL/GLES3 web man pages don't seem to properly
document glWaitSync's error when the sync object is invalid.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/syncobj.c
4d2f04cd6cb2fbaee54ab6e0f84cdb576ceeadcd 03-Dec-2012 Brian Paul <brianp@vmware.com> mesa: fix uint64 printing in syncobj.c

To silence printf format warnings.

v2: insert "0x" prefix

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
/external/mesa3d/src/mesa/main/syncobj.c
47d862517ea658e5f330a10fc7656c7cd67bfb16 13-Nov-2012 Matt Turner <mattst88@gmail.com> mesa: return INVALID_VALUE from WaitSync if timeout != GL_TIMEOUT_IGNORED

This was added in version 22 of the GL_ARB_sync spec.

Fixes gles3conform's sync_error_waitsync_timeout test.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/main/syncobj.c
32cc20d9f52ef48e6cbfb8e8b90a5f7660b73421 13-Nov-2012 Matt Turner <mattst88@gmail.com> mesa: return INVALID_VALUE from WaitSync if flags != 0

Fixes gles3conform's sync_error_waitsync_flags test.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/main/syncobj.c
5b0012f5c27b05d3caa8081165dbaebddefc414f 13-Nov-2012 Matt Turner <mattst88@gmail.com> mesa: return INVALID_VALUE from ClientWaitSync if flags contains an unsupported flag

Fixes gles3conform's sync_error_clientwaitsync_flags test.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
/external/mesa3d/src/mesa/main/syncobj.c
d05d5d9a919f429b9d03c76d779b5b9a102cc11d 11-Sep-2012 Oliver McFadden <oliver.mcfadden@linux.intel.com> mesa: remove FEATURE_ARB_sync define.

Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
/external/mesa3d/src/mesa/main/syncobj.c
b05a1fc156c4776d97d6ff3dcce71e6e34bac21d 31-Aug-2012 Vadim Girlin <vadimgirlin@gmail.com> mesa: don't wait in _mesa_ClientWaitSync if timeout is 0

From ARB_sync spec:

If the value of <timeout> is zero, then ClientWaitSync does not
block, but simply tests the current state of <sync>. TIMEOUT_EXPIRED
will be returned in this case if <sync> is not signaled, even though
no actual wait was performed.

Fixes random fails of the arb_sync-timeout-zero piglit test on r600g.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
/external/mesa3d/src/mesa/main/syncobj.c
db61b9ce39bccc43140357652ceb78baaf2aea44 07-Jan-2011 Vinson Lee <vlee@vmware.com> mesa: Directly include mfeatures.h in files that perform feature tests.
/external/mesa3d/src/mesa/main/syncobj.c
0117da40cd7edd3d165bb28569c289b37eca12b9 06-Jan-2011 Vinson Lee <vlee@vmware.com> mesa: Include mtypes.h in files that use gl_context struct.

Directly include mtypes.h if a file uses a gl_context struct. This
allows future removal of headers that are not strictly necessary but
indirectly include mtypes.h for a file.
/external/mesa3d/src/mesa/main/syncobj.c
f9995b30756140724f41daf963fa06167912be7f 12-Oct-2010 Kristian Høgsberg <krh@bitplanet.net> Drop GLcontext typedef and use struct gl_context instead
/external/mesa3d/src/mesa/main/syncobj.c
10ff2646a443ca3c54d66443b346eb7063973b5e 13-Sep-2010 Chia-I Wu <olv@lunarg.com> mesa: Less FEATURE_ARB_sync tests.

Add dummy static inline definitions to syncobj.h when FEATURE_ARB_sync
is 0, and remove most FEATURE_ARB_sync tests.
/external/mesa3d/src/mesa/main/syncobj.c
32f2fd1c5d6088692551c80352b7d6fa35b0cd09 19-Feb-2010 Kristian Høgsberg <krh@bitplanet.net> Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions
/external/mesa3d/src/mesa/main/syncobj.c
c7ac486261ad30ef654f6d0b1608da4e8483cd40 19-Feb-2010 Kenneth Graunke <kenneth@whitecape.org> Remove _mesa_memcpy in favor of plain memcpy.

This may break the SUNOS4 build, but it's no longer relevant.
/external/mesa3d/src/mesa/main/syncobj.c
826d441cdfa16a16d165297beb3013f4ff8b4816 07-Sep-2009 Michal Krol <michal@vmware.com> mesa: Fix calling conventions of sync object api callbacks.
/external/mesa3d/src/mesa/main/syncobj.c
e059885ce357dee8b847f10e8e8c515a4a20042e 03-Sep-2009 Brian Paul <brianp@vmware.com> mesa: rename gl_sync_object::Status to StatusFlag

There's a symbol collision with X11/Xlib.h #define Status int
in the Mesa xlib code. This seems the simpliest way to work around this.
/external/mesa3d/src/mesa/main/syncobj.c
0342dce226fe79d7a6c0e7cd735c596fad3e8aac 01-Sep-2009 Ian Romanick <ian.d.romanick@intel.com> Don't dereference function pointers in calls.

I'm apparently alone in prefering this calling convention, so I'll be
a team player. :p Based on review comments by Brian Paul and Eric
Anholt.
/external/mesa3d/src/mesa/main/syncobj.c
6af24b6b03a2ce8300c7ae78fd06c6b1edd02017 01-Sep-2009 Ian Romanick <ian.d.romanick@intel.com> Whitespace and include file clean-up.

Based on review comments by Brian Paul.
/external/mesa3d/src/mesa/main/syncobj.c
0f8fdd81989de5026c8e415f1525931b74dd8647 01-Sep-2009 Ian Romanick <ian.d.romanick@intel.com> Use MIN2 instead of open-coded version

Based on review comments by Brian Paul.
/external/mesa3d/src/mesa/main/syncobj.c
16b393d05990b6e917e144f9de87d0103b4c3e6d 31-Aug-2009 Ian Romanick <ian.d.romanick@intel.com> ARB sync: Fix delete behavior and context destruction behavior

I believe this resolves the outstanding issues WRT sync object
deletetion. I have also added a large comment at the top of syncobj.c
describing the expected memory management behavior. I'm still a
little uncertain about the locking on ctx->Shared.
/external/mesa3d/src/mesa/main/syncobj.c
f37070bab6af350caec905ea7658e9241042b6cc 29-Aug-2009 Ian Romanick <ian.d.romanick@intel.com> ARB sync: Add support for GL_ARB_sync to swrast

This isn't quite right yet. The delete behavior and the context
clean-up needs some work.
/external/mesa3d/src/mesa/main/syncobj.c