nouveau: 3d textures are unsupported, limit 3d levels to 1
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 5 Oct 2014 16:35:51 +0000 (12:35 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 14 Oct 2014 16:33:38 +0000 (12:33 -0400)
Ideally there would be a swrast fallback, but the driver isn't ready for
that. This should avoid crashes if someone tries to use 3d textures
though.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Cc: mesa-stable@lists.freedesktop.org
src/mesa/drivers/dri/nouveau/nouveau_context.c

index 5be5ec5bc24aab1d9a22723b6bdaaeadd74bfdfe..e1bb7e8096e5f779817013f5ac0c0370084a23ea 100644 (file)
@@ -189,6 +189,9 @@ nouveau_context_init(struct gl_context *ctx, gl_api api,
        ctx->Extensions.NV_texture_env_combine4 = true;
        ctx->Const.MaxColorAttachments = 1;
 
+       /* This effectively disables 3D textures */
+       ctx->Const.Max3DTextureLevels = 1;
+
        return GL_TRUE;
 }