summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/python/tests
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-04-04 19:01:51 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-04-04 19:01:51 +0200
commiteb168e26aa63f11a47d70c4555cae30691a2cd57 (patch)
tree8dcde608f562fc781027b4e0e21263f9f295e70e /src/gallium/state_trackers/python/tests
parentba14b043bc1ab87e8e5e46e6e909a8def9535028 (diff)
gallium: Clean up driver clear() interface.
Only allows clearing currently bound buffers, but colour and depth/stencil in a single call.
Diffstat (limited to 'src/gallium/state_trackers/python/tests')
-rw-r--r--src/gallium/state_trackers/python/tests/regress/vertex-shader/vertex-shader.py7
-rwxr-xr-xsrc/gallium/state_trackers/python/tests/texture_render.py7
-rwxr-xr-xsrc/gallium/state_trackers/python/tests/texture_sample.py7
3 files changed, 18 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/python/tests/regress/vertex-shader/vertex-shader.py b/src/gallium/state_trackers/python/tests/regress/vertex-shader/vertex-shader.py
index 434ac9b3fc..472769f259 100644
--- a/src/gallium/state_trackers/python/tests/regress/vertex-shader/vertex-shader.py
+++ b/src/gallium/state_trackers/python/tests/regress/vertex-shader/vertex-shader.py
@@ -122,7 +122,12 @@ def test(dev, name):
fb.nr_cbufs = 1
fb.set_cbuf(0, cbuf)
ctx.set_framebuffer(fb)
- ctx.surface_clear(cbuf, 0x80808080)
+ rgba = FloatArray(4);
+ rgba[0] = 0.5
+ rgba[1] = 0.5
+ rgba[2] = 0.5
+ rgba[3] = 0.5
+ ctx.clear(PIPE_CLEAR_COLOR, rgba, 0.0, 0)
# vertex shader
vs = Shader(file('vert-' + name + '.sh', 'rt').read())
diff --git a/src/gallium/state_trackers/python/tests/texture_render.py b/src/gallium/state_trackers/python/tests/texture_render.py
index 580bf65c13..0b76932b6e 100755
--- a/src/gallium/state_trackers/python/tests/texture_render.py
+++ b/src/gallium/state_trackers/python/tests/texture_render.py
@@ -161,7 +161,12 @@ class TextureTest(TestCase):
fb.nr_cbufs = 1
fb.set_cbuf(0, dst_surface)
ctx.set_framebuffer(fb)
- ctx.surface_clear(dst_surface, 0x00000000)
+ rgba = FloatArray(4);
+ rgba[0] = 0.0
+ rgba[1] = 0.0
+ rgba[2] = 0.0
+ rgba[3] = 0.0
+ ctx.clear(PIPE_CLEAR_COLOR, rgba, 0.0, 0)
del fb
# vertex shader
diff --git a/src/gallium/state_trackers/python/tests/texture_sample.py b/src/gallium/state_trackers/python/tests/texture_sample.py
index f5f49f6e51..a382424667 100755
--- a/src/gallium/state_trackers/python/tests/texture_sample.py
+++ b/src/gallium/state_trackers/python/tests/texture_sample.py
@@ -206,7 +206,12 @@ class TextureTest(TestCase):
fb.nr_cbufs = 1
fb.set_cbuf(0, cbuf)
ctx.set_framebuffer(fb)
- ctx.surface_clear(cbuf, 0x00000000)
+ rgba = FloatArray(4);
+ rgba[0] = 0.5
+ rgba[1] = 0.5
+ rgba[2] = 0.5
+ rgba[3] = 0.5
+ ctx.clear(PIPE_CLEAR_COLOR, rgba, 0.0, 0)
del fb
# vertex shader