Mesa (master): python: Set PIPE_TEXTURE_USAGE_RENDER_TARGET instead of DISPLAY_TARGET.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Mon Jan 11 06:01:12 PST 2010


Module: Mesa
Branch: master
Commit: 76185ecad6c220824b9f9fa96a3323ce38b17d52
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=76185ecad6c220824b9f9fa96a3323ce38b17d52

Author: José Fonseca <jfonseca at vmware.com>
Date:   Mon Jan 11 13:55:24 2010 +0000

python: Set PIPE_TEXTURE_USAGE_RENDER_TARGET instead of DISPLAY_TARGET.

As the python state tracker is not integrated with window system an
cannot present surfaces directly.

---

 src/gallium/state_trackers/python/samples/gs.py    |    2 +-
 src/gallium/state_trackers/python/samples/tri.py   |    2 +-
 .../regress/fragment-shader/fragment-shader.py     |    2 +-
 .../tests/regress/vertex-shader/vertex-shader.py   |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/state_trackers/python/samples/gs.py b/src/gallium/state_trackers/python/samples/gs.py
index 1ceead5..6cffe3f 100644
--- a/src/gallium/state_trackers/python/samples/gs.py
+++ b/src/gallium/state_trackers/python/samples/gs.py
@@ -136,7 +136,7 @@ def test(dev):
     cbuf = dev.texture_create(
         PIPE_FORMAT_X8R8G8B8_UNORM,
         width, height,
-        tex_usage=PIPE_TEXTURE_USAGE_DISPLAY_TARGET,
+        tex_usage=PIPE_TEXTURE_USAGE_RENDER_TARGET,
     ).get_surface()
     zbuf = dev.texture_create(
         PIPE_FORMAT_Z16_UNORM,
diff --git a/src/gallium/state_trackers/python/samples/tri.py b/src/gallium/state_trackers/python/samples/tri.py
index af80426..2042f70 100644
--- a/src/gallium/state_trackers/python/samples/tri.py
+++ b/src/gallium/state_trackers/python/samples/tri.py
@@ -136,7 +136,7 @@ def test(dev):
     cbuf = dev.texture_create(
         PIPE_FORMAT_X8R8G8B8_UNORM, 
         width, height,
-        tex_usage=PIPE_TEXTURE_USAGE_DISPLAY_TARGET,
+        tex_usage=PIPE_TEXTURE_USAGE_RENDER_TARGET,
     ).get_surface()
     zbuf = dev.texture_create(
         PIPE_FORMAT_Z16_UNORM, 
diff --git a/src/gallium/state_trackers/python/tests/regress/fragment-shader/fragment-shader.py b/src/gallium/state_trackers/python/tests/regress/fragment-shader/fragment-shader.py
index eed6cdd..8d3bf9d 100644
--- a/src/gallium/state_trackers/python/tests/regress/fragment-shader/fragment-shader.py
+++ b/src/gallium/state_trackers/python/tests/regress/fragment-shader/fragment-shader.py
@@ -114,7 +114,7 @@ def test(dev, name):
     cbuf = dev.texture_create(
         PIPE_FORMAT_X8R8G8B8_UNORM,
         width, height,
-        tex_usage=PIPE_TEXTURE_USAGE_DISPLAY_TARGET,
+        tex_usage=PIPE_TEXTURE_USAGE_RENDER_TARGET,
     ).get_surface()
     fb = Framebuffer()
     fb.width = width
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 41bebd0..01bf5a3 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
@@ -114,7 +114,7 @@ def test(dev, name):
     cbuf = dev.texture_create(
         PIPE_FORMAT_X8R8G8B8_UNORM,
         width, height,
-        tex_usage=PIPE_TEXTURE_USAGE_DISPLAY_TARGET,
+        tex_usage=PIPE_TEXTURE_USAGE_RENDER_TARGET,
     ).get_surface()
     fb = Framebuffer()
     fb.width = width



More information about the mesa-commit mailing list