summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-07-28 13:11:14 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2013-07-28 13:11:14 +0200
commit146a96147f98dfd272958af995b27f94fb37c878 (patch)
treea37811037173318691c990e9433f291369c61813 /tools
parent8fb32e9edf4f06246f0b1106c3440bd8de7d871f (diff)
driver: implement CMP instruction
New instruction works, but found an restriction in the ISA: - it is not allowed to use multiple uniforms in one instruction. If this is done the result is undefined, so need to work around this by using a temporary.
Diffstat (limited to 'tools')
-rw-r--r--tools/etnaviv_gdb.py25
1 files changed, 17 insertions, 8 deletions
diff --git a/tools/etnaviv_gdb.py b/tools/etnaviv_gdb.py
index 1c0dfda..1ac5730 100644
--- a/tools/etnaviv_gdb.py
+++ b/tools/etnaviv_gdb.py
@@ -90,17 +90,26 @@ def lookup_etna_state():
@returns a tuple (pipe, screen)
'''
glapi_context_sym,_ = gdb.lookup_symbol('_glapi_Context')
- gl_context_type = gdb.lookup_type('struct gl_context').pointer()
+ fbs_sym,_ = gdb.lookup_symbol('_fbs')
etna_pipe_context_type = gdb.lookup_type('struct etna_pipe_context').pointer()
etna_screen_type = gdb.lookup_type('struct etna_screen').pointer()
-
- glapi_context = glapi_context_sym.value()
- glapi_context = glapi_context.cast(gl_context_type)
- pipe = glapi_context['st']['cso_context']['pipe']
- screen = pipe['screen']
- # case to specific types
+ if glapi_context_sym is not None: # Mesa
+ gl_context_type = gdb.lookup_type('struct gl_context').pointer()
+
+ glapi_context = glapi_context_sym.value()
+ glapi_context = glapi_context.cast(gl_context_type)
+ pipe = glapi_context['st']['cso_context']['pipe']
+ screen = pipe['screen']
+ elif fbs_sym is not None: # fbs scaffold
+ fbs_sym = fbs_sym.value()
+ pipe = fbs_sym['pipe']
+ screen = fbs_sym['screen']
+ else:
+ print("Unable to find etna context")
+ return (None, None)
+ # cast to specific types
pipe = pipe.cast(etna_pipe_context_type)
- screen = pipe.cast(etna_screen_type)
+ screen = screen.cast(etna_screen_type)
return (pipe, screen)
### gpu-state ###