summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-06-16 18:25:52 -0600
committerBrian Paul <[email protected]>2009-06-16 18:25:52 -0600
commit8d482227915552c414e13743652e6794c4313ae2 (patch)
tree27bb35b40ec242836320180370d7fd5fa3820f41 /src/gallium/state_trackers
parent4ef1f8e3b52a06fcf58f78c9c36738531b91dbac (diff)
parent6b917d0b1787280f976c2f0d1ead0e5d7587a3e9 (diff)
Merge branch 'mesa_7_5_branch'
Conflicts: src/mesa/main/api_validate.c
Diffstat (limited to 'src/gallium/state_trackers')
-rwxr-xr-xsrc/gallium/state_trackers/python/tests/base.py8
-rwxr-xr-xsrc/gallium/state_trackers/python/tests/texture_sample.py50
2 files changed, 40 insertions, 18 deletions
diff --git a/src/gallium/state_trackers/python/tests/base.py b/src/gallium/state_trackers/python/tests/base.py
index 1fa7fe6f3b3..202ccfc3509 100755
--- a/src/gallium/state_trackers/python/tests/base.py
+++ b/src/gallium/state_trackers/python/tests/base.py
@@ -46,6 +46,14 @@ for name, value in globals().items():
if name.startswith("PIPE_FORMAT_") and isinstance(value, int):
formats[value] = name
+def is_depth_stencil_format(format):
+ # FIXME: make and use binding to pf_is_depth_stencil
+ return format in (
+ PIPE_FORMAT_Z32_UNORM,
+ PIPE_FORMAT_Z24S8_UNORM,
+ PIPE_FORMAT_Z24X8_UNORM,
+ PIPE_FORMAT_Z16_UNORM,
+ )
def make_image(width, height, rgba):
import Image
diff --git a/src/gallium/state_trackers/python/tests/texture_sample.py b/src/gallium/state_trackers/python/tests/texture_sample.py
index 06130ea1c9c..c7b78abbbec 100755
--- a/src/gallium/state_trackers/python/tests/texture_sample.py
+++ b/src/gallium/state_trackers/python/tests/texture_sample.py
@@ -497,17 +497,13 @@ def main():
PIPE_TEXTURE_3D,
]
- formats = [
+ color_formats = [
PIPE_FORMAT_A8R8G8B8_UNORM,
PIPE_FORMAT_X8R8G8B8_UNORM,
#PIPE_FORMAT_A8R8G8B8_SRGB,
PIPE_FORMAT_R5G6B5_UNORM,
PIPE_FORMAT_A1R5G5B5_UNORM,
PIPE_FORMAT_A4R4G4B4_UNORM,
- PIPE_FORMAT_Z32_UNORM,
- PIPE_FORMAT_Z24S8_UNORM,
- PIPE_FORMAT_Z24X8_UNORM,
- PIPE_FORMAT_Z16_UNORM,
PIPE_FORMAT_A8_UNORM,
PIPE_FORMAT_L8_UNORM,
PIPE_FORMAT_YCBCR,
@@ -517,6 +513,13 @@ def main():
#PIPE_FORMAT_DXT5_RGBA,
]
+ depth_formats = [
+ PIPE_FORMAT_Z32_UNORM,
+ PIPE_FORMAT_Z24S8_UNORM,
+ PIPE_FORMAT_Z24X8_UNORM,
+ PIPE_FORMAT_Z16_UNORM,
+ ]
+
sizes = [64, 32, 16, 8, 4, 2, 1]
#sizes = [1020, 508, 252, 62, 30, 14, 6, 3]
#sizes = [64]
@@ -531,8 +534,8 @@ def main():
PIPE_TEX_FACE_NEG_Z,
]
- for target in targets:
- for format in formats:
+ for format in color_formats:
+ for target in targets:
for size in sizes:
if target == PIPE_TEXTURE_3D:
depth = size
@@ -546,17 +549,7 @@ def main():
for level in range(0, last_level + 1):
zslice = 0
while zslice < depth >> level:
- if format in (
- PIPE_FORMAT_Z32_UNORM,
- PIPE_FORMAT_Z24S8_UNORM,
- PIPE_FORMAT_Z24X8_UNORM,
- PIPE_FORMAT_Z16_UNORM,
- ):
- klass = TextureDepthSampleTest
- else:
- klass = TextureColorSampleTest
-
- test = klass(
+ test = TextureColorSampleTest(
dev = dev,
target = target,
format = format,
@@ -570,6 +563,27 @@ def main():
)
suite.add_test(test)
zslice = (zslice + 1)*2 - 1
+ for format in depth_formats:
+ target = PIPE_TEXTURE_2D
+ depth = 1
+ face = 0
+ last_level = 0
+ level = 0
+ zslice = 0
+ for size in sizes:
+ test = TextureDepthSampleTest(
+ dev = dev,
+ target = target,
+ format = format,
+ width = size,
+ height = size,
+ depth = depth,
+ last_level = last_level,
+ face = face,
+ level = level,
+ zslice = zslice,
+ )
+ suite.add_test(test)
suite.run()