summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-04-08 21:13:57 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-05-24 18:12:14 -0700
commitbdbf74130ad4e64c7654e8c7a3189bf129b7643f (patch)
tree7b7042881acab8ccd4d39d5a806c169860fbcc55 /src
parent172b323b0e87d5bef06ff8d0274a31657f1261e1 (diff)
python/retrace: Try to cope with failures creating textures.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/gallium/state_trackers/python/retrace/interpreter.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/python/retrace/interpreter.py b/src/gallium/state_trackers/python/retrace/interpreter.py
index c2bfacc68f7..88abca99b5f 100755
--- a/src/gallium/state_trackers/python/retrace/interpreter.py
+++ b/src/gallium/state_trackers/python/retrace/interpreter.py
@@ -272,6 +272,8 @@ class Screen(Object):
pass
def get_tex_surface(self, texture, face, level, zslice, usage):
+ if texture is None:
+ return None
return texture.get_surface(face, level, zslice, usage)
def tex_surface_destroy(self, surface):
@@ -281,6 +283,8 @@ class Screen(Object):
pass
def surface_write(self, surface, data, stride, size):
+ if surface is None:
+ return
assert surface.nblocksy * stride == size
surface.put_tile_raw(0, 0, surface.width, surface.height, data, stride)
@@ -595,6 +599,8 @@ class Interpreter(parser.TraceDumper):
ret = method(*args)
if call.ret and isinstance(call.ret, model.Pointer):
+ if ret is None:
+ sys.stderr.write('warning: NULL returned\n')
self.register_object(call.ret.address, ret)
self.call_no = None