[Piglit] [PATCH] Allow testing of generic compressed texture formats with 1D/3D textures

Anuj Phogat anuj.phogat at gmail.com
Tue Aug 21 15:11:13 PDT 2012


On Tue, Aug 21, 2012 at 12:26 PM, Brian Paul <brianp at vmware.com> wrote:
>
> On 08/21/2012 01:12 PM, Anuj Phogat wrote:
>>
>> The generic texture formats are allowed in the<internalformat>
>> parameter of TexImage1D, TexImage2D, TexImage3D, CopyTexImage1D,
>> and CopyTexImage2D functions.
>>
>> Signed-off-by: Anuj Phogat<anuj.phogat at gmail.com>
>> ---
>>   tests/texturing/copyteximage.c |    8 --------
>>   1 files changed, 0 insertions(+), 8 deletions(-)
>>
>> diff --git a/tests/texturing/copyteximage.c b/tests/texturing/copyteximage.c
>> index a0bf228..c8a8492 100644
>> --- a/tests/texturing/copyteximage.c
>> +++ b/tests/texturing/copyteximage.c
>> @@ -328,14 +328,6 @@ supported_format(GLenum format)
>>   static bool
>>   supported_target_format(GLenum target, GLenum format)
>>   {
>> -       /* all the compressed formats we test (so far) are 2D only */
>> -       if (is_compressed_format(format)&&
>> -           (target == GL_TEXTURE_1D ||
>> -            target == GL_TEXTURE_1D_ARRAY ||
>> -            target == GL_TEXTURE_3D ||
>> -            target == GL_TEXTURE_RECTANGLE)) {
>> -               return false;
>> -       }
>>         if (is_depth_format(format)&&  target == GL_TEXTURE_3D) {
>>                 return false;
>>         }
>
>
> I guess this is what we want to do, but with NVIDIA's driver I'm seeing
> a ton of failures both with and without this patch.  I don't have time right
> now to dig into it but it looks like some combinations of texture targets
> and internal formats are generating errors.
>
> Is that something you can investigate?
Following cases are failing on NVIDIA proprietary drivers (OpenGL
3.3.0 NVIDIA 295.53 ):
- GL_TEXTURE_1D with all internal formats. No GL error is generated.
  All these cases pass on i965 drivers. Output color is:
  0.000000 0.000000 0.000000 1.000000 with all formats.
  Seems like 1D textures are completely broken on NVIDIA in
  glCopyTexImage1D().

- GL_TEXTURE_{1D, 2D}_ARRAY with all internal formats.
  GL_INVALID_ENUM is generated in glCopyTexSubImage{2D, 3D}
  respectively. As per OpenGL spec, this error is generated only in
  case of invalid texture target in glCopyTexSubImage{2D, 3D}.
  But, GL_TEXTURE_{1D, 2D}_ARRAY are allowed texture
  targets. So, it seems like array textures are not handled correctly
  by NVIDIA in glCopyTexSubImage{2D, 3D}.

HTH
Anuj


More information about the Piglit mailing list