1. 23 Jan, 2014 11 commits
  2. 22 Jan, 2014 19 commits
  3. 21 Jan, 2014 10 commits
    • Ian Romanick's avatar
      mesa: Generate GL_INVALID_OPERATION for unsupported DSA TexStorage functions · 178c1bf1
      Ian Romanick authored
      We have to make the functions available to work around a GLEW bug (see
      comments already in the code), but if an application calls one of these
      functions we should still generate GL_INVALID_OPERATION.
      Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
      178c1bf1
    • Ian Romanick's avatar
      mesa: Silence many unused parameter warnings · 17594dcc
      Ian Romanick authored
      main/texstorage.c: In function '_mesa_alloc_texture_storage':
      main/texstorage.c:240:53: warning: unused parameter 'width' [-Wunused-parameter]
      main/texstorage.c:241:37: warning: unused parameter 'height' [-Wunused-parameter]
      main/texstorage.c:241:53: warning: unused parameter 'depth' [-Wunused-parameter]
      main/texstorage.c: In function '_mesa_TextureStorage1DEXT':
      main/texstorage.c:464:34: warning: unused parameter 'texture' [-Wunused-parameter]
      main/texstorage.c:464:50: warning: unused parameter 'target' [-Wunused-parameter]
      main/texstorage.c:464:66: warning: unused parameter 'levels' [-Wunused-parameter]
      main/texstorage.c:465:34: warning: unused parameter 'internalformat' [-Wunused-parameter]
      main/texstorage.c:466:35: warning: unused parameter 'width' [-Wunused-parameter]
      main/texstorage.c: In function '_mesa_TextureStorage2DEXT':
      main/texstorage.c:473:34: warning: unused parameter 'texture' [-Wunused-parameter]
      main/texstorage.c:473:50: warning: unused parameter 'target' [-Wunused-parameter]
      main/texstorage.c:473:66: warning: unused parameter 'levels' [-Wunused-parameter]
      main/texstorage.c:474:34: warning: unused parameter 'internalformat' [-Wunused-parameter]
      main/texstorage.c:475:35: warning: unused parameter 'width' [-Wunused-parameter]
      main/texstorage.c:475:50: warning: unused parameter 'height' [-Wunused-parameter]
      main/texstorage.c: In function '_mesa_TextureStorage3DEXT':
      main/texstorage.c:483:34: warning: unused parameter 'texture' [-Wunused-parameter]
      main/texstorage.c:483:50: warning: unused parameter 'target' [-Wunused-parameter]
      main/texstorage.c:483:66: warning: unused parameter 'levels' [-Wunused-parameter]
      main/texstorage.c:484:34: warning: unused parameter 'internalformat' [-Wunused-parameter]
      main/texstorage.c:485:35: warning: unused parameter 'width' [-Wunused-parameter]
      main/texstorage.c:485:50: warning: unused parameter 'height' [-Wunused-parameter]
      main/texstorage.c:485:66: warning: unused parameter 'depth' [-Wunused-parameter]
      Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
      17594dcc
    • Anuj Phogat's avatar
      i965: Ignore 'centroid' interpolation qualifier in case of persample shading · f5cfb4ae
      Anuj Phogat authored
      This patch handles the use of 'centroid' qualifier with 'in' variables
      in a fragment shader when persample shading is enabled. Per sample
      shading for the whole fragment shader can be enabled by:
      glEnable(GL_SAMPLE_SHADING) or using {gl_SamplePosition, gl_SampleID}
      builtin variables in fragment shader. Explaining it below in more
      detail.
      
      /* Enable sample shading using OpenGL API */
      glEnable(GL_SAMPLE_SHADING);
      glMinSampleShading(1.0);
      
      Example fragment shader:
      in vec4 a;
      centroid in vec4 b;
      main()
      {
        ...
      }
      
      Variable 'a' will be interpolated at sample location. But, what
      interpolation should we use for variable 'b' ?
      
      ARB_sample_shading recommends interpolation at sample position for
      all the variables. GLSL 400 (and earlier) spec says that:
      
      "When an interpolation qualifier is used, it overrides settings
      established through the OpenGL API."
      But, this text got deleted in later versions of GLSL.
      
      NVIDIA's and AMD's proprietary linux drivers (at OpenGL 4.3)
      interpolates at sample position. This convinces me to use
      the similar approach on intel hardware.
      
      Cc: mesa-stable@lists.freedesktop.org
      Signed-off-by: Anuj Phogat's avatarAnuj Phogat <anuj.phogat@gmail.com>
      Reviewed-by: Chris Forbes's avatarChris Forbes <chrisf@ijw.co.nz>
      f5cfb4ae
    • Anuj Phogat's avatar
      i965: Use sample barycentric coordinates with per sample shading · a92e5f7c
      Anuj Phogat authored
      Current implementation of arb_sample_shading doesn't set 'Barycentric
      Interpolation Mode' correctly. We use pixel barycentric coordinates
      for per sample shading. Instead we should select perspective sample
      or non-perspective sample barycentric coordinates.
      
      It also enables using sample barycentric coordinates in case of a
      fragment shader variable declared with 'sample' qualifier.
      e.g. sample in vec4 pos;
      
      A piglit test to verify the implementation has been posted on piglit
      mailing list for review.
      
      V2: Do not interpolate all the 'in' variables at sample position
          if fragment shader uses 'sample' qualifier with one of them.
          For example we have a fragment shader:
          #version 330
          #extension ARB_gpu_shader5: require
          sample in vec4 a;
          in vec4 b;
          main()
          {
            ...
          }
      
          Only 'a' should be sampled at sample location, not 'b'.
      
      Cc: mesa-stable@lists.freedesktop.org
      Signed-off-by: Anuj Phogat's avatarAnuj Phogat <anuj.phogat@gmail.com>
      Reviewed-by: Chris Forbes's avatarChris Forbes <chrisf@ijw.co.nz>
      a92e5f7c
    • Anuj Phogat's avatar
      i965: Add an option to ignore sample qualifier · 3313cc26
      Anuj Phogat authored
      This will be useful in my next patch which depends on a functionality
      of _mesa_get_min_invocations_per_fragment() to ignore the sample
      qualifier (prog->IsSample) based on a flag passed to it.
      
      Cc: mesa-stable@lists.freedesktop.org
      Signed-off-by: Anuj Phogat's avatarAnuj Phogat <anuj.phogat@gmail.com>
      Reviewed-by: Chris Forbes's avatarChris Forbes <chrisf@ijw.co.nz>
      3313cc26
    • Matt Turner's avatar
      mesa/x86: Remove dead read_rgba_span_x86.h. · 78d65476
      Matt Turner authored
      Dead since 304f7a13.
      78d65476
    • Matt Turner's avatar
      i965/fs: Optimize LRP with x == y into a MOV. · bf0773ae
      Matt Turner authored
      total instructions in shared programs: 1487331 -> 1485988 (-0.09%)
      instructions in affected programs:     45638 -> 44295 (-2.94%)
      GAINED:                                7
      LOST:                                  0
      Reviewed-by: Jordan Justen's avatarJordan Justen <jordan.l.justen@intel.com>
      bf0773ae
    • Jordan Justen's avatar
      glsl: Optimize open-coded lrp into lrp. · 8d37e991
      Jordan Justen authored
      total instructions in shared programs: 1498191 -> 1487051 (-0.74%)
      instructions in affected programs:     669388 -> 658248 (-1.66%)
      GAINED:                                1
      LOST:                                  0
      Reviewed-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
      Signed-off-by: Jordan Justen's avatarJordan Justen <jordan.l.justen@intel.com>
      8d37e991
    • Matt Turner's avatar
    • Matt Turner's avatar
      glsl: Vectorize multiple scalar assignments · 4bd6e0d7
      Matt Turner authored
      Reduces vertex shader instruction counts in DOTA2 by 6.42%, L4D2 by
      4.61%, and CS:GO by 5.71%.
      
      total instructions in shared programs: 1500153 -> 1498191 (-0.13%)
      instructions in affected programs:     59919 -> 57957 (-3.27%)
      Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      4bd6e0d7