diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2016-04-10 15:44:32 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-04-10 16:04:37 +0100 |
commit | 34d047c48c89aa5f7310e48f3ec326c3ff40598c (patch) | |
tree | 1b03a5452fe5cb254c0f6cb9627e63eaed732551 /wrappers/gltrace.py | |
parent | 200ad82015e1565ce7767300a092224b9b2b51da (diff) |
gltrace: Fix MAP_PERSISTENT_BIT warnings.
No need to warn about mappings without MAP_WRITE_BIT.
Also shorten the URLs.
Diffstat (limited to 'wrappers/gltrace.py')
-rw-r--r-- | wrappers/gltrace.py | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/wrappers/gltrace.py b/wrappers/gltrace.py index ae6f292f..38f1516a 100644 --- a/wrappers/gltrace.py +++ b/wrappers/gltrace.py @@ -680,24 +680,34 @@ class GlTracer(Tracer): # FIXME: We don't support coherent/pinned memory mappings if function.name in ('glBufferStorage', 'glNamedBufferStorage', 'glNamedBufferStorageEXT'): - print r' if (!(flags & GL_MAP_PERSISTENT_BIT)) {' - print r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/o MAP_PERSISTENT_BIT\n", __FUNCTION__);' + print r' if (flags & GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX) {' + print r' if (!(flags & GL_MAP_PERSISTENT_BIT)) {' + print r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/o MAP_PERSISTENT_BIT\n", __FUNCTION__);' + print r' }' + print r' if (!(flags & GL_MAP_WRITE_BIT)) {' + print r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/o MAP_WRITE_BIT\n", __FUNCTION__);' + print r' }' + print r' flags &= ~GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX;' print r' }' - print r' flags &= ~GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX;' if function.name in ('glMapBufferRange', 'glMapBufferRangeEXT', 'glMapNamedBufferRange', 'glMapNamedBufferRangeEXT'): print r' if (access & GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX) {' print r' if (!(access & GL_MAP_PERSISTENT_BIT)) {' print r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/o MAP_PERSISTENT_BIT\n", __FUNCTION__);' print r' }' + print r' if (!(access & GL_MAP_WRITE_BIT)) {' + print r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/o MAP_WRITE_BIT\n", __FUNCTION__);' + print r' }' print r' if (access & GL_MAP_FLUSH_EXPLICIT_BIT) {' print r' os::log("apitrace: warning: %s: MAP_NOTIFY_EXPLICIT_BIT_VMWX set w/ MAP_FLUSH_EXPLICIT_BIT\n", __FUNCTION__);' print r' }' print r' access &= ~GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX;' - print r' } else if (access & GL_MAP_COHERENT_BIT) {' - print r' os::log("apitrace: warning: %s: MAP_COHERENT_BIT unsupported (https://github.com/apitrace/apitrace/issues/232)\n", __FUNCTION__);' - print r' } else if ((access & GL_MAP_PERSISTENT_BIT) &&' - print r' !(access & GL_MAP_FLUSH_EXPLICIT_BIT)) {' - print r' os::log("apitrace: warning: %s: MAP_PERSISTENT_BIT w/o FLUSH_EXPLICIT_BIT unsupported (https://github.com/apitrace/apitrace/issues/232)\n", __FUNCTION__);' + print r' } else if (access & GL_MAP_WRITE_BIT) {' + print r' if (access & GL_MAP_COHERENT_BIT) {' + print r' os::log("apitrace: warning: %s: MAP_COHERENT_BIT|MAP_WRITE_BIT unsupported <https://git.io/vV9kM>\n", __FUNCTION__);' + print r' } else if ((access & GL_MAP_PERSISTENT_BIT) &&' + print r' !(access & GL_MAP_FLUSH_EXPLICIT_BIT)) {' + print r' os::log("apitrace: warning: %s: MAP_PERSISTENT_BIT|MAP_WRITE_BIT w/o MAP_FLUSH_EXPLICIT_BIT unsupported <https://git.io/vV9kM>\n", __FUNCTION__);' + print r' }' print r' }' if function.name in ('glBufferData', 'glBufferDataARB'): print r' if (target == GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD) {' |