1. 02 Nov, 2011 6 commits
  2. 01 Nov, 2011 27 commits
  3. 31 Oct, 2011 7 commits
    • Jose Fonseca's avatar
      e33447aa
    • Jose Fonseca's avatar
      llvmpipe: Remove unsed variables. · 0f26c6ae
      Jose Fonseca authored
      0f26c6ae
    • Jose Fonseca's avatar
      util: Add missing initializer. · 7ff24771
      Jose Fonseca authored
      7ff24771
    • Paul Berry's avatar
      i965: Fix flat integral varyings. · 9734bd05
      Paul Berry authored
      
      
      Previously, the vertex and fragment shader back-ends assumed that all
      varyings were floats.  In GLSL 1.30 this is no longer true--they can
      also be of integral types provided that they have an interpolation
      qualifier of "flat".
      
      This required two changes in each back-end: assigning the correct type
      to the register that holds the varying value during shader execution,
      and assigning the correct type to the register that ties the varying
      value to the rest of the graphics pipeline (the message register in
      the case of VS, and the payload register in the case of FS).
      
      Fixes piglit tests fs-int-interpolation and fs-uint-interpolation.
      Acked-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      9734bd05
    • Paul Berry's avatar
      mesa: Add glsl_type::get_scalar_type() function. · fa0066ae
      Paul Berry authored
      
      
      This function is similar to get_base_type(), but when called on
      arrays, it returns the scalar type composing the array.  For example,
      glsl_type(vec4[]) => float_type.
      Acked-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      fa0066ae
    • Paul Berry's avatar
      i965/gen6+: Switch GLSL from ALT to IEEE floating point mode · f40c6b2a
      Paul Berry authored
      i965 graphics hardware has two floating point modes: ALT and IEEE.  In
      ALT mode, floating-point operations never generate infinities or NaNs,
      and MOV instructions translate infinities and NaNs to finite values.
      In IEEE mode, infinities and NaNs behave as specified in the IEEE 754
      spec.
      
      Previously, we used ALT mode for all vertex and fragment programs,
      whether they were GLSL programs or ARB programs.  The GLSL spec is
      sufficiently vague about how infs and nans are to be handled that it
      was unclear whether this mode was compliant with the GLSL 1.30 spec or
      not, and it made it very difficult to test the isinf() and isnan()
      functions.
      
      This patch changes i965 GLSL programs to use IEEE floating-point mode,
      which is clearly compliant with GLSL 1.30's inf/nan requirements.  In
      addition to making the Piglit isinf and isnan tests pass, this paves
      the way for future support of the ARB_shader_precision extension.
      
      Unfortunately we still have to use ALT floating-point mode when
      executing ARB programs, because those programs require 0^0 == 1, and
      i965 hardware generates 0^0 == NaN in IEEE mode.
      
      Fixes piglit tests "isinf-and-isnan fs_fbo", "isinf-and-isnan vs_fbo",
      and {fs,vs}-{isinf,isnan}-{vec2,vec3,vec4}.
      f40c6b2a
    • Paul Berry's avatar
      glsl: Add isinf() and isnan() builtins. · ede60bc4
      Paul Berry authored
      The implementations are as follows:
      
      isinf(x) = (abs(x) == +infinity)
      isnan(x) = (x != x)
      
      Note: the latter formula is not necessarily obvious.  It works because
      NaN is the only floating point number that does not equal itself.
      
      Fixes piglit tests "isinf-and-isnan fs_basic" and "isinf-and-isnan
      vs_basic".
      ede60bc4