1. 07 Jan, 2020 3 commits
    • Vulkan: Reorder descriptor sets · 806d812e
      Shahbaz Youssefi authored
      This change moves driver uniforms to a set with a lower id than the one
      that includes (emulation) transform feedback buffers.  Imagine the
      following:
      
      - Program 1 with xfb: UniformsSet: 1 VS uniforms buffer, 1 FS uniforms
        buffer, 1 xfb buffer
      - Program 2 without xfb: UniformsSet: 1 VS uniforms bufer, 1 FS uniforms
        buffer.
      
      Previously, UniformsSet was index 0, and DriverUniformsSet was index 3.
      When switching from Program 1 to Program 2, the layout of UniformsSet
      changes, which means every subsequent set needs to be rebound.  This is
      a Vulkan pipeline layout compatibility rule.  This is done with
      invalidateCurrentTextures() and invalidateCurrentShaderResources()
      already when handling gl::State::DIRTY_BIT_PROGRAM_EXECUTABLE.  The bug
      is that the driver uniforms are not invalidated.
      
      This is normally not an issue, because usually when switching from
      Program 1 to Program 2, transform feedback is paused, and this state
      change does invalidate driver uniforms.  However, the following scenario
      doesn't do this:
      
      - Begin Xfb
      - Pause Xfb
      - Use Program 1
      - Draw
      - Use Program 2
      - Draw
      - End Xfb
      
      There is no driver state change between the two draw calls, which means
      the second draw will attempt to draw using the driver uniforms bound for
      the first draw call.  There is a Vulkan validation error here due to the
      above pipeline layout validation rule.
      
      The issue manifests itself only when the second draw call actually uses
      driver uniforms, as otherwise that set is inactive and not validated;
      i.e. when line raster emulation is used.
      
      In summary, the validation error manifests itself when:
      
      - Transform feedback and line raster both use emulation
      - Transform feedback is paused
      - A draw with an xfb program is followed by a non-xfb program
      - The second draw is a line draw
      
      A test is added for this.
      
      The solution is to reorder the sets so that DriverUniformsSet is placed
      before UniformsSet.  This way, changes to the layout of UniformsSet
      don't invalidate DriverUniformsSet.
      
      In fact, based on the above, any change in the layout of the program
      should have required an invalidation of the driver uniforms.  This bug
      is probably masked by the fact that
      ContextVk::handleDirtyDescriptorSetsImpl() always rebinds the graphics
      driver every time any descriptor set needs rebinding.  That should be
      removed in a follow up change.
      
      Bug: angleproject:4261
      Change-Id: I21ad4152b454a1fe70554be02e18a9c94fb3e7a8
      Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1986927Reviewed-by: 's avatarTobin Ehlis <tobine@google.com>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    • Suppress flaky failure with MacOS/NVIDIA/OPENGL · 51e653f0
      shrekshao authored
      Seeing intermittent failure on this test only on MacOS/NVIDIA/OPENGL.
      Suppress for now.
      
      Bug: angleproject:4258
      Change-Id: Ibda30954019410e3b6d069986b2cd0ad26533c00
      Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1984850Reviewed-by: 's avatarShrek Shao <shrekshao@google.com>
      Commit-Queue: Shrek Shao <shrekshao@google.com>
    • EGL: Implement EGL_ANDROID_framebuffer_target · 8c0bbfbb
      Jeff Vigil authored
      Add attribute to configs.
      Add attribute matching logic.
      Does not set attribute in Vulkan configs, need solution to
      query Android for which formats are valid. anglebug.com/4208
      New end2end test.
      
      Bug: angleproject:3961
      Test: angle_end2end_tests --gtest_filter=EGLAndroidFramebufferTargetTest*
      Change-Id: I7e14c47b39e9539f6181c3c1d75c76fe63ca0f8c
      Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1960508Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
      Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
  2. 06 Jan, 2020 8 commits
  3. 04 Jan, 2020 1 commit
  4. 03 Jan, 2020 4 commits
  5. 02 Jan, 2020 1 commit
  6. 31 Dec, 2019 1 commit
  7. 30 Dec, 2019 5 commits
  8. 27 Dec, 2019 2 commits
  9. 25 Dec, 2019 4 commits
  10. 24 Dec, 2019 4 commits
    • Use TSpan for TType's array sizes · 86d9c93a
      Shahbaz Youssefi authored
      Until C++20, std::vector doesn't have a constexpr constructor, which
      means TType cannot use a `TVector` for `mArraySizes` if an arrayed type
      needs to be created constexpr.  This is needed for the upcoming
      textureGatherOffsets implementation.
      
      A new TSpan class is introduced, based on std::span (from C++20) that
      holds the pointer/size allocated from a TVector without owning it.
      Since TVector's allocation are made from a pool, the allocated memory
      will live beyond the vector's destruction.  `TType::mArraySizes` is
      changed to this type.
      
      This change will allow a new constexpr constructor to be added to TType
      that takes a TSpan as array directly, a value which is constexpr
      initialized from a static array (instead of TVector).
      
      Bug: angleproject:3569
      Change-Id: I78793b0f4c64519e0ebe30cf6e0de995ba70035d
      Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1968260Reviewed-by: 's avatarJiajia Qin <jiajia.qin@intel.com>
      Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    • Vulkan:Transform/feedback instanced draw support · c713abfd
      Tobin Ehlis authored
      These fixes allow dEQP 3.1 KHR-GLES31.core.vertex_attrib_binding.basic-input*
      test cases to pass.
      
      This fixes a bug in instanced drawing with transform feedback buffers
      where we were overwriting the initial transform feedback output as new
      instances were drawn. To fix this, the vertices in each draw are passed
      into a uniform value and the output is offset based on the current instance
      and the number of vertices in the draw.
      
      It also fixes a validation error where transform feedback descriptor
      was sometimes setting a buffer range of 0. This is not allowed, so in
      the 0 case we pull the actual buffer size from the bufferHelper object.
      
      Bug: angleproject:4236
      Change-Id: Ib72898a0e6caab96c446c1e996a6124d2c001193
      Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1979600
      Commit-Queue: Tobin Ehlis <tobine@google.com>
      Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
      Reviewed-by: 's avatarTobin Ehlis <tobine@google.com>
    • Vulkan:Update Vulkan Vertex Attribute Offsets · 67d8b63a
      Tobin Ehlis authored
      This fixes most of the test for
      dEQP 3.1 KHR-GLES31.core.vertex_attrib_binding.basic-input*
      
      The bug fixes is that we were not correctly setting the vertex attribute
      offset for vertex attribs that were converted into their own buffer.
      We kept the attrib offset from the frontend as if the converted attribs
      were in the original buffer, but converted vtx attrib buffers in the VK
      backend are tightly packed from the start of the buffer so when converting
      the actual offset should be 0.
      
      Also, in order to avoid a VK validation error, this change includes a tmp
      workaround to make sure transform feedback output buffer range is never 0,
      but sets VK_WHOLE_SIZE in that case. A follow-on fix that focuses on
      transform feedback fixes will address this validation error more fully.
      
      Bug: angleproject:4145
      Bug: angleproject:4236
      Change-Id: I8c218954725945414a8f18beb4f964b90da7062a
      Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1980906
      Commit-Queue: Tobin Ehlis <tobine@google.com>
      Reviewed-by: 's avatarCourtney Goeltzenleuchter <courtneygo@google.com>
      Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
    • Disable flaky test on Metal · 87607526
      Shahbaz Youssefi authored
      Bug: chromium:1037665
      Bug: angleproject:4177
      Change-Id: I38f05f1567803e7ac0c631d94056f26dc122a4f2
      Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1980278Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
  11. 23 Dec, 2019 7 commits