No subject
Mon Dec 5 14:13:29 PST 2011
"The LOD value lod passed in as an argument to the texture size
functions is added to the levelbase of the texture to determine
a texture image level. The dimensions of that image level, excluding a
possible border, are then returned. If the computed texture image
level is outside the range [level_base, level_max], the results are
undefined."
So there's nothing to test, really.
>> +void
>> +select_sampler(char *name)
>> +{
>> + int i;
>> + static const struct sampler_info samplers[] =
>> + {
>> + { "sampler1D", 1, GL_TEXTURE_1D, false },
>> + { "sampler2D", 2, GL_TEXTURE_2D, false },
>> + { "sampler3D", 3, GL_TEXTURE_3D, false },
>> + { "samplerCube", 2, GL_TEXTURE_CUBE_MAP, false },
>> + { "sampler1DShadow", 1, GL_TEXTURE_1D, true },
>> + { "sampler2DShadow", 2, GL_TEXTURE_2D, true },
>> + { "samplerCubeShadow", 2, GL_TEXTURE_CUBE_MAP, true },
>
> samplerCubeShadow's glTexImage setup should require GL 3.0 as opposed to
> just GLSL 1.30.
Right. Thanks.
>> +void
>> +piglit_init(int argc, char **argv)
>> +{
>> + int prog;
>> + int tex_location;
>> + int i;
>> + enum shader_target test_stage = UNKNOWN;
>> + bool integer_format = false;
>> + piglit_require_GLSL_version(130);
>
>> + if (sampler == NULL) {
>> + /* Maybe it's the sampler type? */
>> + if (argv[i][0] == 'i' || argv[i][0] == 'u') {
>> + integer_format = true;
>> + select_sampler(argv[i] + 1);
>
> This should probably test for EXT_texture_integer presence.
Yes it should.
> I note that we don't specify an integer internalformat for teximage when
> using integer samplers. It seems like it would be hard to break
> textureSize from having mismatched texture format versus sampler type,
> though.
Yeah...but you're right, it's probably wise.
Thanks for the review, Eric.
More information about the Piglit
mailing list