1. 19 Jan, 2021 14 commits
  2. 18 Jan, 2021 13 commits
  3. 17 Jan, 2021 1 commit
    • Reland "Vulkan: Generate gl_Position pre-rotation in SPIR-V" · dfd9bdfd
      Shahbaz Youssefi authored
      This reverts commit 3d39b7c5.
      
      Reason for revert: Fixed interaction with the
      `forceDriverUniformOverSpecConst` workaround.
      
      Original change's description:
      > Revert "Vulkan: Generate gl_Position pre-rotation in SPIR-V"
      >
      > This reverts commit 0f86b196.
      >
      > Reason for revert:
      > Breaks pre-rotation for all apps, so they are displayed in portrait instead of landscape.
      >
      > Original change's description:
      > > Vulkan: Generate gl_Position pre-rotation in SPIR-V
      > >
      > > Instead of having the translator output pre-rotation code in the vertex
      > > stage based on a specialization constant, this change makes the SPIR-V
      > > transformer perform pre-rotation of gl_Position on the last geometry
      > > stage.
      > >
      > > An alternative solution would be to generate pre-rotation code in the
      > > translator in every geometry stage, each controlled by a separate
      > > specialization constant.  This change avoids unnecessary modifications
      > > to earlier stages.  The generated shaders are also smaller, as they
      > > don't contain a mat2[8] pre-rotation constant matrix.  The SPIR-V
      > > transformer knows the pre-rotation at transformation time, so it can
      > > simply use swizzles to achieve the same results.
      > >
      > > This also ties in with upcoming changes which move gl_Position.z
      > > correction to the last geometry shader stage, which is trivially done
      > > piggy-backing on the infrastructure in this change.
      > >
      > > Bug: angleproject:5478
      > > Change-Id: I9d5d9d19f3ccda665f5504368ce5ddfa5f383faf
      > > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2598584
      > > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
      > > Reviewed-by: Charlie Lao <cclao@google.com>
      > > Reviewed-by: Jamie Madill <jmadill@chromium.org>
      >
      > TBR=syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
      >
      > Change-Id: I81f237fa6b10c7d59831363bee8999e7ad2f09be
      > No-Presubmit: true
      > No-Tree-Checks: true
      > No-Try: true
      > Bug: angleproject:5478
      > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633694
      > Reviewed-by: Tim Van Patten <timvp@google.com>
      > Commit-Queue: Tim Van Patten <timvp@google.com>
      
      TBR=timvp@google.com,syoussefi@chromium.org,jmadill@chromium.org,cclao@google.com
      
      Bug: angleproject:5478
      Change-Id: I7c5eaeef03d9520abd36a1c4a766b6abbf4fdb45
      Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2633709Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
  4. 16 Jan, 2021 9 commits
  5. 15 Jan, 2021 3 commits
    • Vulkan: Support EXT_clip_cull_distance extension · cea86910
      Mohan Maiya authored
      EXT_clip_cull_distance extension is supported except for
      some features related to EXT_tessellation_shader and
      EXT_geometry_shader. Also added a few compiler tests to validate
      the transformation from ESSL to GLSL for Vulkan backend.
      
      Bug: angleproject:5458
      Tests: angle_end2end_tests --gtest_filter=Clip*DistanceTest*
             angle_unittests --gtest_filter=*Clip*Distance*
      Change-Id: Ie74e6b2b55112ad92ad111191d629b63506032ab
      Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2585987Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
      Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
    • Vulkan: Translator pass to monomorphize problematic functions · dc99fc40
      Shahbaz Youssefi authored
      With array of array of samplers and images, we currently require the
      shader*ArrayDynamicIndexing Vulkan features.  With atomic counters, we
      require the shaderStorageBufferArrayDynamicIndexing feature.
      
      The above features are required to enable passing opaque uniforms to
      functions.  This change introduces a translator pass that monomorphizes
      functions that receive atomic counters, or partially subscripted array
      of array of samplers or images, etc by removing those arguments and
      using the opaque uniform directly.
      
      Follow up changes will include:
      
      - Great simplification to RewriteStructSamplers, and removal of
        RewriteStructSamplersOld.  This will drop dependency to
        shaderSampledImageArrayDynamicIndexing and
        shaderStorageImageArrayDynamicIndexing.
      - Great simplification to RewriteAtomicCounters.  This will drop
        dependency to shaderStorageBufferArrayDynamicIndexing.
      - Emulation of imageAtomicExchange for r32f formats, but changing the
        qualifier to r32ui.
      
      Note that parts of RewriteStructSampler are obsolete with this change,
      but will be refactored as a follow up.
      
      Bug: angleproject:3881
      Bug: angleproject:4071
      Bug: angleproject:5535
      Change-Id: Ifd1435b2a31ebf364815046886aeded60297da79
      Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2628127
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarTim Van Patten <timvp@google.com>
    • Vulkan: Generate xfb support code in SPIR-V for extension path · d06feeac
      Shahbaz Youssefi authored
      The only piece of code that's needed to be generated for the extension
      path is the following, at the right spot (right before depth correction
      and pre-rotation):
      
          ANGLEXfbPosition = gl_Position;
      
      The SPIR-V transformer already has gl_Position loaded for depth
      correction and pre-rotation, so this change simply adds an OpStore to
      ANGLEXfbPosition.
      
      As a result of this change, @@ XFB-OUT @@ is no longer emitted if
      the transform feedback extension is supported.  With the above code now
      placed correctly for geometry shaders, transform feedback tests for
      geometry shaders are enabled.
      
      Bug: angleproject:3606
      Change-Id: I13a7956ab62a1a6b4196ff999442b99b50226c0f
      Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2617659
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
      Reviewed-by: 's avatarCharlie Lao <cclao@google.com>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>