summaryrefslogtreecommitdiff
path: root/src/gallium/tests
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-10-17 19:03:42 -0700
committerKeith Whitwell <keithw@vmware.com>2010-10-17 19:09:42 -0700
commit0072acd447dc6be652e63752e50215c3105322c8 (patch)
tree847d1763b54772d336a04e606f8248291c3092b7 /src/gallium/tests
parent543fb77ddece7e1806e8eaa0d65bb2a945ef9a75 (diff)
parentca2b2ac131933b4171b519813df1aaa3a81621cd (diff)
Merge remote branch 'origin/master' into lp-setup-llvm
Conflicts: src/gallium/drivers/llvmpipe/lp_setup_coef.c src/gallium/drivers/llvmpipe/lp_setup_coef.h src/gallium/drivers/llvmpipe/lp_setup_coef_intrin.c src/gallium/drivers/llvmpipe/lp_setup_point.c src/gallium/drivers/llvmpipe/lp_setup_tri.c src/gallium/drivers/llvmpipe/lp_state_derived.c src/gallium/drivers/llvmpipe/lp_state_fs.h
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 37d7fd6415..954a701a53 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 fed929d420..6d17c88c05 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 cfde6af75e..ba0dd17957 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];