1. 09 Feb, 2013 15 commits
  2. 08 Feb, 2013 10 commits
    • Kristian H. Kristensen's avatar
      egl-wayland: Make sure we allocate a back buffer even if nothing was rendered · 1fe00739
      Kristian H. Kristensen authored
      At eglSwapBuffer time, we blindly assume we have a back buffer, but the
      back buffer only gets allocated when somebody tries to render something.
      
      NOTE: This is a candidate for the 9.0 and 9.1 branches.
      
      https://bugs.freedesktop.org/show_bug.cgi?id=60086
      1fe00739
    • Paul Berry's avatar
      Consolidate some redundant definitions of ARRAY_SIZE() macro. · a4b9678a
      Paul Berry authored
      Previous to this patch, there were 13 identical definitions of this
      macro in Mesa source.  That's ridiculous.  This patch consolidates 6
      of them to a single definition in src/mesa/main/macros.h.
      
      Unfortunately, I wasn't able to eliminate the remaining definitions,
      since they occur in places that don't include src/mesa/main/macros.h:
      
      - include/pci_ids/pci_id_driver_map.h
      - src/egl/drivers/dri2/egl_dri2.h
      - src/egl/main/egldefines.h
      - src/gbm/main/backend.c
      - src/gbm/main/gbm.c
      - src/glx/glxclient.h
      - src/mapi/mapi/stub.c
      
      I'm open to suggestions as to how to deal with the remaining redundancy.
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      a4b9678a
    • Paul Berry's avatar
      intel/pre-gen6: Disable EXT_framebuffer_multisample. · dc92b2d1
      Paul Berry authored
      Previously, the i965 driver enabled EXT_framebuffer_multisample even
      on pre-gen6 chipsets.  However, since we don't support multisampling
      on these chips, we set GL_MAX_SAMPLES=1 (the minimum allowed by
      EXT_framebuffer_multisample), and if the client ever requested a
      multisample buffer, we quietly supplied them with a single-sampled
      buffer instead.
      
      After some discussion on the mailing list (see thread
      "ext_framebuffer_multisample: check for num_samples<=1"), it's clear
      that this was the wrong approach.  The correct approach is to only
      expose EXT_framebuffer_multisample when we truly support
      multisampling; that frees us to set a sensible value of
      GL_MAX_SAMPLES=0 on other chipsets, so that we never have to deal with
      a client requesting a multisample buffer when multisampling isn't
      supported.
      
      This change causes the following piglit tests to be skipped on
      chipsets prior to Gen6:
      
      - "ARB_framebuffer_sRGB/blit {renderbuffer,texture}
        {linear,linear_to_srgb,srgb,srgb_to_linear}
        {downsample,msaa,upsample} {disabled,enabled}"
      - EXT_framebuffer_multisample/blit-mismatched-formats
      - EXT_framebuffer_multisample/blit-mismatched-sizes
      - EXT_framebuffer_multisample/dlist
      - EXT_framebuffer_multisample/interpolation 0 *
      - EXT_framebuffer_multisample/minmax
      - EXT_framebuffer_multisample/negative-copypixels
      - EXT_framebuffer_multisample/negative-copyteximage
      - EXT_framebuffer_multisample/negative-max-samples
      - EXT_framebuffer_multisample/negative-mismatched-samples
      - EXT_framebuffer_multisample/negative-readpixels
      - EXT_framebuffer_multisample/renderbuffer-samples
      - EXT_framebuffer_multisample/renderbufferstorage-samples
      - EXT_framebuffer_multisample/samples
      
      This is expected, since the above tests exercise MSAA functionality,
      and shouldn't be run on systems prior to Gen6.
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
      dc92b2d1
    • Vinson Lee's avatar
      glsl: Initialize all tfeedback_candidate_generator member variables. · b681ed6a
      Vinson Lee authored
      Fixes uninitialized pointer field defect reported by Coverity.
      Signed-off-by: Vinson Lee's avatarVinson Lee <vlee@freedesktop.org>
      Reviewed-by: Paul Berry's avatarPaul Berry <stereotype441@gmail.com>
      b681ed6a
    • Vinson Lee's avatar
      nv30: Fix memory leak. · 7c544e55
      Vinson Lee authored
      Fixes resource leak defect reported by Coverity.
      Signed-off-by: Vinson Lee's avatarVinson Lee <vlee@freedesktop.org>
      Reviewed-by: Brian Paul's avatarBrian Paul <brianp@vmware.com>
      7c544e55
    • Ian Romanick's avatar
      glsl: Change loop_analysis to not look like a resource leak · 82691f12
      Ian Romanick authored
      Previously the loop_state was allocated in the loop_analysis
      constructor, but not freed in the (nonexistent) destructor.  Moving
      the allocation of the loop_state makes this code appear less sketchy.
      
      Either way, there is no actual leak.  The loop_state is freed by the
      single caller of analyze_loop_variables.
      Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      Cc: Dave Airlie <airlied@freedesktop.org>
      Reviewed-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57753
      82691f12
    • Paul Berry's avatar
      mesa: Don't check (offset + size <= bufObj->Size) in BindBufferRange. · 04f0d6cc
      Paul Berry authored
      In the documentation for BindBufferRange, OpenGL specs from 3.0
      through 4.1 contain this language:
      
          "The error INVALID_VALUE is generated if size is less than or
          equal to zero or if offset + size is greater than the value of
          BUFFER_SIZE."
      
      This text was dropped from OpenGL 4.2, and it does not appear in the
      GLES 3.0 spec.
      
      Presumably the reason for the change is because come clients change
      the size of the buffer after calling BindBufferRange.  We don't want
      to generate an error at the time of the BindBufferRange call just
      because the old size of the buffer was too small, when the buffer is
      about to be resized.
      
      Since this is a deliberate relaxation of error conditions in order to
      allow clients to work, it seems sensible to apply it to all versions
      of GL, not just GL 4.2 and above.
      
      (Note that there is no danger of this change allowing a client to
      access data beyond the end of a buffer.  We already have code to
      ensure that that doesn't happen in the case where the client shrinks
      the buffer after calling BindBufferRange).
      
      Eliminates a spurious error message in the gles3 conformance test
      "transform_feedback_offset_size".
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
      Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      04f0d6cc
    • Ian Romanick's avatar
      i965: Set UniformBufferOffsetAlignment to sizeof(vec4) · f29ab4ec
      Ian Romanick authored
      This matches the behavior of the Windows driver, but a bspec reference
      should would be nice.
      
      NOTE: This is a candidate for the 9.0 and 9.1 branches.
      
      Signed-off-by: Ian Romanick <ian.d.romanick@intel.com
      Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      f29ab4ec
    • Matt Turner's avatar
      mesa: Allow glGet* queries of MAX_VARYING_COMPONENTS in ES 3 · 3ee60231
      Matt Turner authored
      Should have been done in d9948e49 but I missed it because
      MAX_VARYING_FLOATS doesn't appear in the ES 3 spec, but is the same
      value as MAX_VARYING_COMPONENTS.
      
      NOTE: Candidate for the 9.1 branch
      Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      3ee60231
    • Daniel van Vugt's avatar
  3. 07 Feb, 2013 8 commits
  4. 06 Feb, 2013 7 commits