summaryrefslogtreecommitdiffstats
path: root/src/gallium/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/tests')
-rwxr-xr-xsrc/gallium/tests/python/retrace/interpreter.py42
-rw-r--r--src/gallium/tests/python/samples/tri.py8
-rw-r--r--src/gallium/tests/unit/u_format_test.c8
3 files changed, 34 insertions, 24 deletions
diff --git a/src/gallium/tests/python/retrace/interpreter.py b/src/gallium/tests/python/retrace/interpreter.py
index 37d7fd6..954a701 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:
@@ -617,6 +610,15 @@ class Context(Object):
_rgba[i] = rgba[i]
self.real.clear(buffers, _rgba, depth, stencil)
+ def clear_render_target(self, dst, rgba, dstx, dsty, width, height):
+ _rgba = gallium.FloatArray(4)
+ for i in range(4):
+ _rgba[i] = rgba[i]
+ self.real.clear_render_target(dst, _rgba, dstx, dsty, width, height)
+
+ def clear_depth_stencil(self, dst, clear_flags, depth, stencil, dstx, dsty, width, height):
+ self.real.clear_depth_stencil(dst, clear_flags, depth, stencil, dstx, dsty, width, height)
+
def _present(self):
self.real.flush()
diff --git a/src/gallium/tests/python/samples/tri.py b/src/gallium/tests/python/samples/tri.py
index fed929d..6d17c88 100644
--- a/src/gallium/tests/python/samples/tri.py
+++ b/src/gallium/tests/python/samples/tri.py
@@ -88,8 +88,8 @@ def test(dev):
# rasterizer
rasterizer = Rasterizer()
- rasterizer.front_winding = PIPE_WINDING_CW
- rasterizer.cull_mode = PIPE_WINDING_NONE
+ rasterizer.front_ccw = False
+ rasterizer.cull_face = PIPE_FACE_NONE
rasterizer.scissor = 1
ctx.set_rasterizer(rasterizer)
@@ -161,8 +161,8 @@ def test(dev):
# vertex shader
vs = Shader('''
VERT
- DCL IN[0], POSITION, CONSTANT
- DCL IN[1], COLOR, CONSTANT
+ DCL IN[0]
+ DCL IN[1]
DCL OUT[0], POSITION, CONSTANT
DCL OUT[1], COLOR, CONSTANT
0:MOV OUT[0], IN[0]
diff --git a/src/gallium/tests/unit/u_format_test.c b/src/gallium/tests/unit/u_format_test.c
index cfde6af..ba0dd17 100644
--- a/src/gallium/tests/unit/u_format_test.c
+++ b/src/gallium/tests/unit/u_format_test.c
@@ -67,6 +67,7 @@ print_packed(const struct util_format_description *format_desc,
sep = " ";
}
printf("%s", suffix);
+ fflush(stdout);
}
@@ -88,6 +89,7 @@ print_unpacked_rgba_doubl(const struct util_format_description *format_desc,
sep = ",\n";
}
printf("%s", suffix);
+ fflush(stdout);
}
@@ -109,6 +111,7 @@ print_unpacked_rgba_float(const struct util_format_description *format_desc,
sep = ",\n";
}
printf("%s", suffix);
+ fflush(stdout);
}
@@ -129,6 +132,7 @@ print_unpacked_rgba_8unorm(const struct util_format_description *format_desc,
}
}
printf("%s", suffix);
+ fflush(stdout);
}
@@ -150,6 +154,7 @@ print_unpacked_z_float(const struct util_format_description *format_desc,
sep = ",\n";
}
printf("%s", suffix);
+ fflush(stdout);
}
@@ -170,6 +175,7 @@ print_unpacked_z_32unorm(const struct util_format_description *format_desc,
}
}
printf("%s", suffix);
+ fflush(stdout);
}
@@ -190,6 +196,7 @@ print_unpacked_s_8uscaled(const struct util_format_description *format_desc,
}
}
printf("%s", suffix);
+ fflush(stdout);
}
@@ -635,6 +642,7 @@ test_one_func(const struct util_format_description *format_desc,
printf("Testing util_format_%s_%s ...\n",
format_desc->short_name, suffix);
+ fflush(stdout);
for (i = 0; i < util_format_nr_test_cases; ++i) {
const struct util_format_test_case *test = &util_format_test_cases[i];