﻿id,summary,reporter,owner,description,type,status,component,version,resolution,keywords,cc,guest,host
7669,"S3TC reported in OpenGL extensions, but not working",wolf42,,"VirtualBox's OpenGL driver reports that it supports both GL_ARB_texture_compression and GL_EXT_texture_compression_s3tc, but attempt to load compressed texture results in OpenGL error 1282 (invalid operation).

Testcase:
{{{
/* gcc dupa.c `sdl-config --libs --cflags` -lGL */
#include <stdio.h>
#include <SDL.h>
#include <GL/gl.h>
#include <GL/glext.h>

int main()
{
        int tex;
        char* buf = malloc( 64 * 64 / 2);
        memset( buf, 0, 64 * 64 / 2);

        SDL_Init( SDL_INIT_VIDEO );
        SDL_SetVideoMode( 64, 64, 24, SDL_OPENGL );

        glGenTextures( 1, &tex );
        glBindTexture( GL_TEXTURE_2D, tex );

        printf( ""before: %i\n"", glGetError() );
        /* glCompressedTexImage2D <- GL_ARB_texture_compression
         * GL_COMPRESSED_RGB_S3TC_DXT1_EXT <- GL_EXT_texture_compression_s3tc
         */
        glCompressedTexImage2D( GL_TEXTURE_2D, 0, GL_COMPRESSED_RGB_S3TC_DXT1_EXT, 64, 64, 0, 64 * 64 / 2, buf );
        printf( ""after: %i\n"", glGetError() );

        return 0;
}
}}}

Results when run using VirtualBox video driver:
{{{
before: 0
after: 1282
}}}

Results when run with an external X server:
{{{
before: 0
after: 0
}}}

VirtualBox video driver:
{{{
OpenGL vendor string: Humper
OpenGL renderer string: Chromium
OpenGL version string: 2.1 Chromium 1.9
OpenGL shading language version string: 3.30 NVIDIA via Cg compiler

% glxinfo|grep compress
    GL_EXT_texture_compression_s3tc, GL_EXT_draw_range_elements,
    GL_ARB_texture_compression, GL_ARB_texture_cube_map,
}}}

External X server (indirect rendering on win32 host):
{{{
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce 9800 GTX/9800 GTX+/PCI/SSE2
OpenGL version string: 1.4 (3.3.0)

% LIBGL_ALWAYS_INDIRECT=1 DISPLAY=192.168.1.2:0 glxinfo | grep compress
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression,
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_edge_clamp,
}}}",defect,closed,3D support,VirtualBox 3.2.10,fixed,,,Linux,Windows
