fbo-3d was assuming npot texture support which caused
glTexImage3D to fail with r200 driver.

Signed-off-by: Pauli Nieminen <suok...@gmail.com>
---
 tests/fbo/fbo-3d.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tests/fbo/fbo-3d.c b/tests/fbo/fbo-3d.c
index 0b2210c..946eef0 100644
--- a/tests/fbo/fbo-3d.c
+++ b/tests/fbo/fbo-3d.c
@@ -40,6 +40,7 @@ int piglit_height = 100;
 int piglit_window_mode = GLUT_DOUBLE | GLUT_RGB;
 
 #define NUM_DEPTHS     6
+#define POT_DEPTHS     8
 float depth_color[NUM_DEPTHS][4] = {
        {1.0, 0.0, 0.0, 0.0},
        {0.0, 1.0, 0.0, 0.0},
@@ -55,12 +56,14 @@ create_3d_fbo(void)
        GLuint tex, fb;
        GLenum status;
        int depth;
+       int pot_depth = 
glutExtensionSupported("GL_ARB_texture_non_power_of_two") ?
+               NUM_DEPTHS: POT_DEPTHS;
 
        glGenTextures(1, &tex);
        glBindTexture(GL_TEXTURE_3D, tex);
 
        glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA,
-                    BUF_WIDTH, BUF_HEIGHT, NUM_DEPTHS,
+                    BUF_WIDTH, BUF_HEIGHT, pot_depth,
                     0,
                     GL_RGBA, GL_UNSIGNED_BYTE, NULL);
        assert(glGetError() == 0);
-- 
1.6.3.3


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to