summaryrefslogtreecommitdiffstats
path: root/src/gallium/tests
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-09-25 14:55:23 +0100
committerJosé Fonseca <[email protected]>2010-09-29 22:29:22 +0100
commit21f392c9717608873724c121e4aa1b5d6da7566f (patch)
treebf2da42b041531a81c3bd77b7a6cd1def67b2212 /src/gallium/tests
parentc7f33624f93fb08264e762e1a6a82b1c99afa58e (diff)
python/retrace: Handle set_index_buffer and draw_vbo.
Diffstat (limited to 'src/gallium/tests')
-rwxr-xr-xsrc/gallium/tests/python/retrace/interpreter.py33
1 files changed, 13 insertions, 20 deletions
diff --git a/src/gallium/tests/python/retrace/interpreter.py b/src/gallium/tests/python/retrace/interpreter.py
index 37d7fd64156..16132abb06d 100755
--- a/src/gallium/tests/python/retrace/interpreter.py
+++ b/src/gallium/tests/python/retrace/interpreter.py
@@ -111,6 +111,7 @@ struct_factories = {
#"pipe_texture": gallium.Texture,
'pipe_subresource': gallium.pipe_subresource,
'pipe_box': gallium.pipe_box,
+ 'pipe_draw_info': gallium.pipe_draw_info,
}
@@ -533,30 +534,22 @@ class Context(Object):
return minindex + ibias, maxindex + ibias
- def draw_arrays(self, mode, start, count):
- self.dump_vertices(start, count)
-
- self.real.draw_arrays(mode, start, count)
- self._set_dirty()
-
- def draw_elements(self, indexBuffer, indexSize, indexBias, mode, start, count):
- if self.interpreter.verbosity(2):
- minindex, maxindex = self.dump_indices(indexBuffer, indexSize, indexBias, start, count)
- self.dump_vertices(minindex, maxindex - minindex)
+ def set_index_buffer(self, ib):
+ if ib:
+ self.real.set_index_buffer(ib.index_size, ib.offset, ib.buffer)
+ else:
+ self.real.set_index_buffer(0, 0, None)
- self.real.draw_elements(indexBuffer, indexSize, indexBias, mode, start, count)
- self._set_dirty()
-
- def draw_range_elements(self, indexBuffer, indexSize, indexBias, minIndex, maxIndex, mode, start, count):
+ def draw_vbo(self, info):
if self.interpreter.verbosity(2):
- minindex, maxindex = self.dump_indices(indexBuffer, indexSize, indexBias, start, count)
- minindex = min(minindex, minIndex)
- maxindex = min(maxindex, maxIndex)
- self.dump_vertices(minindex, maxindex - minindex)
+ if 0:
+ minindex, maxindex = self.dump_indices(indexBuffer, indexSize, indexBias, start, count)
+
+ self.dump_vertices(info.minindex, info.maxindex + 1 - info.minindex)
- self.real.draw_range_elements(indexBuffer, indexSize, indexBias, minIndex, maxIndex, mode, start, count)
+ self.real.draw_vbo(info)
self._set_dirty()
-
+
def resource_copy_region(self, dst, subdst, dstx, dsty, dstz, src, subsrc, srcx, srcy, srcz, width, height):
if dst is not None and src is not None:
if self.interpreter.options.all: