Skip to content
  • Kenneth Graunke's avatar
    Add a new comprehensive test for textureSize(). · 7a33793c
    Kenneth Graunke authored
    
    
    This exhaustively tests all of GLSL 1.30's textureSize variants, both in
    the vertex and fragment shaders.  It covers:
    - Sampler data type (floating point, signed integer, unsigned integer)
    - Dimensionality (1D, 2D, 3D, Cube, 1DArray, 2DArray)
    - Color and shadow samplers
    - Mipmapped textures
    - Non-power-of-two textures
    
    It doesn't cover texture format variations.  In fact, the test never
    actually provides any content for the textures, because it should be
    irrelevant for textureSize(), is easier to program, and also extra mean.
    
    The new "textureSize" binary takes two arguments: shader stage and
    sampler type.  For example:
    
    ./bin/textureSize fs sampler1DArrayShadow
    ./bin/textureSize vs usamplerCube
    
    Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: default avatarEric Anholt <eric@anholt.net>
    7a33793c