Comments (2)
I can reproduce this on Linux too.
This has something to do with the memory shadowing apitrace does to track writes to coherent memory
#623 from @werman
Because if I disable the shadowing like this the sample renders fine while tracing (of course this still produces broken traces, so not a fix):
diff --git a/wrappers/gltrace.py b/wrappers/gltrace.py
index a7ff39f3..6e58e81a 100644
--- a/wrappers/gltrace.py
+++ b/wrappers/gltrace.py
@@ -557,7 +557,7 @@ class GlTracer(Tracer):
print(' _glGetBufferParameteriv%s(target, GL_BUFFER_ACCESS, &access);' % suffix)
print(' flush = access != GL_READ_ONLY;')
print(' }')
- print(' if ((access_flags & GL_MAP_COHERENT_BIT) && (access_flags & GL_MAP_WRITE_BIT)) {')
+ print(' if ((access_flags & 0x40000000) && (access_flags & GL_MAP_WRITE_BIT)) {')
print(' gltrace::Context *_ctx = gltrace::getContext();')
print(' GLint buffer = getBufferName(target);')
print(' auto it = _ctx->sharedRes->bufferToShadowMemory.find(buffer);')
@@ -630,7 +630,7 @@ class GlTracer(Tracer):
if function.name == 'glUnmapNamedBuffer':
print(' GLint access_flags = 0;')
print(' _glGetNamedBufferParameteriv(buffer, GL_BUFFER_ACCESS_FLAGS, &access_flags);')
- print(' if ((access_flags & GL_MAP_COHERENT_BIT) && (access_flags & GL_MAP_WRITE_BIT)) {')
+ print(' if ((access_flags & 0x40000000) && (access_flags & GL_MAP_WRITE_BIT)) {')
print(' gltrace::Context *_ctx = gltrace::getContext();')
print(' auto it = _ctx->sharedRes->bufferToShadowMemory.find(buffer);')
print(' if (it != _ctx->sharedRes->bufferToShadowMemory.end()) {')
@@ -651,7 +651,7 @@ class GlTracer(Tracer):
if function.name == 'glUnmapNamedBufferEXT':
print(' GLint access_flags = 0;')
print(' _glGetNamedBufferParameterivEXT(buffer, GL_BUFFER_ACCESS_FLAGS, &access_flags);')
- print(' if ((access_flags & GL_MAP_COHERENT_BIT) && (access_flags & GL_MAP_WRITE_BIT)) {')
+ print(' if ((access_flags & 0x40000000) && (access_flags & GL_MAP_WRITE_BIT)) {')
print(' gltrace::Context *_ctx = gltrace::getContext();')
print(' auto it = _ctx->sharedRes->bufferToShadowMemory.find(buffer);')
print(' if (it != _ctx->sharedRes->bufferToShadowMemory.end()) {')
@@ -712,7 +712,7 @@ class GlTracer(Tracer):
print(r' flags &= ~GL_MAP_NOTIFY_EXPLICIT_BIT_VMWX;')
print(r' }')
print(r'')
- print(r' if ((flags & GL_MAP_COHERENT_BIT) && (flags & GL_MAP_WRITE_BIT)) {')
+ print(r' if ((flags & 0x40000000) && (flags & GL_MAP_WRITE_BIT)) {')
print(r' gltrace::Context *_ctx = gltrace::getContext();')
if function.name in ('glBufferStorage', 'glBufferStorageEXT'):
print(r' GLint buffer = getBufferName(target);')
@@ -913,7 +913,7 @@ class GlTracer(Tracer):
Tracer.doInvokeFunction(self, function)
if function.name in ('glMapBufferRange', 'glMapBufferRangeEXT', 'glMapNamedBufferRange', 'glMapNamedBufferRangeEXT'):
- print(r' if ((access & GL_MAP_COHERENT_BIT) && (access & GL_MAP_WRITE_BIT)) {')
+ print(r' if ((access & 0x40000000) && (access & GL_MAP_WRITE_BIT)) {')
print(r' gltrace::Context *_ctx = gltrace::getContext();')
if function.name in ('glMapBufferRange', 'glMapBufferRangeEXT'):
print(r' GLint buffer = getBufferName(target);')
from apitrace.
Not sure what's special about this sample. shadow memory works fine for persistent maps for other samples/apps.
from apitrace.
Related Issues (20)
- eglretrace crashes on rayman2_gl trace
- Can Apitrace support retrace through EGL on Windows HOT 2
- loop option doesn't work for specific trace HOT 1
- retrace --loop crashes when VAO is created in setup frame and deleted in loop frame HOT 1
- Tellusim Upscaler (Star Wars) 20230513 trace doesn't work properly
- Failed to capture trace of wgf11filter HOT 1
- Build system complains about uncloned submodules for bundled dependencies even when using dependencies from system HOT 4
- Bug recording instanced draw calls with user arrays HOT 18
- [enhancement] replace zlib HOT 1
- Feature Request: Attach apitrace to Already Running Processes HOT 4
- Wolfenstein: The Old Blood tracing broken due to abuse of GL_MAP_PERSISTENT_BIT mappings HOT 19
- trimming broken for some traces HOT 7
- capture/replay broken for indirect draws HOT 15
- Commit cff22f0 Introduces Segfault HOT 3
- eglQueryDevicesEXT egl spec definition wrong HOT 1
- undefined symbol: __libc_dlopen_mode, version GLIBC_PRIVATE HOT 5
- [OpenGL] Replay issue with glUniformHandleui64ARB HOT 2
- Possibility for a new stable release?
- [Master and Fedora40 Repo] Fails to write a .trace file. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apitrace.