1. 30 Dec, 2020 1 commit
    • Add support for Vulkan12Properties · ff29e249
      Sean Risser authored
      VkPhysicalDeviceVulkan12Properties was added to the core spec by Vulkan
      1.2. It allows users to query the following properties simultaneously:
          * VkPhysicalDeviceDriverProperties
          * VkPhysicalDeviceFloatControlsProperties
          * VkPhysicalDeviceDescriptorIndexingProperties
          * VkPhysicalDeviceDepthStencilResolveProperties
          * VkPhysicalDeviceSamplerFilterMinmaxProperties
          * VkPhysicalDeviceTimelineSemaphoreProperties
          * and framebufferIntegerColorSampleCounts
      
      All these structs are a part of the core spec and must be supported.
      
      Bug: b/176498010
      Change-Id: I82b06f219d2ee091139964ee8b19f05e1c64e3a8
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51408
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarSean Risser <srisser@google.com>
      Commit-Queue: Sean Risser <srisser@google.com>
  2. 17 Dec, 2020 2 commits
    • Optimize reciprocal sqrt operation · 1cc5b335
      Antonio Maiorano authored
      This change deprecates rr::RcpSqrt_pp with rr::RcpSqrt. As with Rcp,
      RcpSqrt computes the result using Newton-Rhapson if it's faster and the
      initial approximation intrinsic is available on the current target.
      Currently, only LLVM on Intel will use NR for RelaxedPrecision. Note
      that passing in Precision::Relaxed will produce a faster, but less
      precise reciprocal sqrt.
      
      Also made it so that SprivShader instruction GLSLstd450InverseSqrt now
      invokes RcpSqrt(x, Precision::Full) instead of performing 1/sqrt(x).
      Note that the Vulkan spec states that inversesqrt()'s precision is 2
      ULP, and sqrt()'s precision is inherited from 1.0 / inversesqrt();
      however, our rr::Sqrt is implemented in terms of x86's sqrt intrinsic on
      x86, or as calls to sqrt from Math.h.
      
      Bug: b/169760262
      Change-Id: I65ba9a64d1db934c523dda11c1a2c186059d220b
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51268
      Commit-Queue: Antonio Maiorano <amaiorano@google.com>
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
    • Optimize reciprocal operation · d1561871
      Antonio Maiorano authored
      This change deprecates rr::Rcp_pp with rr::Rcp, which makes sure to
      correctly compute the reciprocal using the Newton-Rhapson refinement
      only if the current target supports the required instrinsic, otherwise
      using 1 / x. Currently, only LLVM on Intel will use NR. Note that
      passing in Precision::Relaxed will produce a faster, but less precise
      reciprocal.
      
      Also removed PixelProgram::linearToSRGB as it's unused.
      
      Bug: b/169760262
      Bug: b/149574741
      Change-Id: I4a2f943aa60116c4397d7a8ae18583a260824788
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50648Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Commit-Queue: Antonio Maiorano <amaiorano@google.com>
  3. 15 Dec, 2020 1 commit
  4. 14 Dec, 2020 5 commits
  5. 12 Dec, 2020 1 commit
  6. 11 Dec, 2020 7 commits
  7. 10 Dec, 2020 4 commits
  8. 09 Dec, 2020 8 commits
  9. 07 Dec, 2020 2 commits
  10. 05 Dec, 2020 1 commit
  11. 04 Dec, 2020 7 commits
  12. 02 Dec, 2020 1 commit
    • Reactor: add Type* member to Value and remove vtable · bae138de
      Antonio Maiorano authored
      This change removes the virtual getType() function, and instead stores
      the Type* as a member in Variable. This change is important for when
      materialize() gets called from Variable constructors, such as in LValue,
      so that we do not call a virtual function from the constructor. Note
      that this is exactly what would happen when LValue's ctor calls
      materialize(), but it so happened that the most overridden getType() is
      in LValue, so it calls the correct version. However, if we ever override
      getType() in a class derived from LValue, this would fail to work
      properly.
      
      As getType was the only virtual function in Variable, note that the
      sizeof(Variable) does not change as we swapped the one vtable pointer
      for a Type pointer.
      
      Bug: b/174160049
      Change-Id: I8688fb9e9bd604e9839d3bac60761761bc969ae2
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/50848
      Kokoro-Result: kokoro <noreply+kokoro@google.com>
      Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
      Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>