Skip to content
  • Matt Turner's avatar
    ARB_shading_language_packing: Generate tests for builtin packing functions · 2f9badcf
    Matt Turner authored
    
    
    This uses the existing pack/unpack testing infrasturcture for GLSL ES
    3.0 and adds support for testing pack/unpack 4x8 operations.
    
    Generate the following test files:
    	{const,vs,fs}-{pack,unpack}{Snorm,Unorm}{2x16,4x8}.shader_test
    	{const,vs,fs}-{pack,unpack}Half2x16.shader_test
    
    Note that division is performed by multiplication by the reciprocal, and
    1/255 falls almost exactly in between two representable float32 values,
    leading to bad rounding errors. 1/127, 1/32767, and 1/65535 do not have
    this behavior.
    
    As a result, the {fs,vs}-unpackUnorm4x8 tests currently fail. the const-
    version passes, since the divisions are calculated by the CPU. A
    follow-on patch will allow some tolerance in precision.
    
    Reviewed-by: default avatarChad Versace <chad.versace@linux.intel.com>
    2f9badcf