1. 02 Mar, 2019 1 commit
  2. 01 Mar, 2019 4 commits
  3. 28 Feb, 2019 13 commits
  4. 27 Feb, 2019 16 commits
  5. 26 Feb, 2019 6 commits
    • Add Print helpers to reactor · 1bc7ee95
      Ben Clayton authored
      New tools for debugging JITed code.
      
      rr::Print() is a new function that emits a call to printf() using the provided message and optional values. There is also an overload that accepts additional file, line, and function parameters to help identify the call site.
      
      Format values passed to rr::Print() are implicity cast to a new rr::PrintValues type which does the work of dispatching the value type to the correct printf() format specifier(s) and argument value(s). A single rr::Print() format value can automatically be expanded into multiple printf values - for example an rr::Float4 will expand to "%f %f %f %f" and four scalar float values.
      
      rr::Print() format values can be any of the following types:
        * Reactor LValues, RValues, Pointers.
        * Standard Plain-Old-Value types (int, float, bool, etc)
        * Custom types that specialize the PrintValue::Ty template struct.
        * Static arrays in the form T[N] where T can be any of the above.
      
      The sw::Vector4f and sw::Vector4s types have already had custom formatters written.
      
      These new functions and types described above are typically not called directly. Instead there are two helper macros which simplifies usage:
      
      RR_LOG() is a new macro that wraps rr::Print(), automatically populating the function, file and line parameters and appending a newline to the string.
      
      RR_WATCH() is a new helper macro that prints the name and value of all the supplied arguments. For example, if you had the Int and bool variables 'foo' and 'bar' that you want to print, you can simply write:
      
          RR_WATCH(foo, bar)
      
      When this JIT compiled code is executed, it will print:
          "foo: 1, bar: true"
      
      All of this code is disabled in non-debug builds, or if the reactor backend is not LLVM 7+.
      
      Change-Id: Ia39b1e507b6afaa3bb1d33e40b1333017f4b4f21
      Reviewed-on: https://swiftshader-review.googlesource.com/c/24768Tested-by: 's avatarChris Forbes <chrisforbes@google.com>
      Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
    • VS build fix · 7f6f8912
      Alexis Hetu authored
      Change-Id: I7e6589870b539e775371e8941a07a48ca9e0cad7
      Reviewed-on: https://swiftshader-review.googlesource.com/c/25628Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
    • Fix point rendering · 54c4772e
      Chris Forbes authored
      - Point size limits were left at [0,0], forcing all points to zero coverage.
        Introduce a config value for the maximum, and plumb this through to drive
        physical device limits query.
      
      - Fix all interpolants being replaced with pointcoord
      
      Bug: b/124177079
      
      Change-Id: I281dd3214537f15858afbd3890cf70f8850fa4aa
      Reviewed-on: https://swiftshader-review.googlesource.com/c/25489Tested-by: 's avatarChris Forbes <chrisforbes@google.com>
      Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
    • OpAccessChain: Remove pointer walking inside loop · 8adf1fcd
      Chris Forbes authored
      This cannot occur. The initial stripping of <base>'s pointer type is
      already handled outside the loop.
      
      Bug: b/124388146
      
      Change-Id: I55ea64e868308bfbab72aaefca0fd367916f6e69
      Reviewed-on: https://swiftshader-review.googlesource.com/c/25488Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
      Tested-by: 's avatarChris Forbes <chrisforbes@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
    • Replace uses of sw::Surface with vk::ImageView in the Renderer · 6159a856
      Alexis Hetu authored
      sw::Surface contains a locking mechanism which is no longer required
      in Vulkan. The app is now responsible for making sure the lifetime of
      the objects is long enough for the driver to be able to use them in
      any operation where they are required.
      
      A few shortcuts were taken here:
      - ImageView::getSampleCount() currently always returns the largest
        available sample count.
      - ImageView::subresourceRange.levelCount is not taken into account
      - Context::getMultiSampleCount() still uses attachment 0 to get
        the samples count, which may be incorrect.
      
      Bug b/118619338
      
      Change-Id: I8cd49926a1537c0f2bc20e6516f12d7de67d6c65
      Reviewed-on: https://swiftshader-review.googlesource.com/c/25588Tested-by: 's avatarAlexis Hétu <sugoi@google.com>
      Reviewed-by: 's avatarChris Forbes <chrisforbes@google.com>
    • Fix various issues in vertex fetch setup · fe3d4978
      Chris Forbes authored
      There are still some minor sins in here -- we should really unfuse
      attributes from buffers completely -- but this is enough to have vertex
      fetch work for all per-vertex attribute scenarios.
      
      Bug: b/124177079
      
      Change-Id: I2a7a1a6f049aa80c1a527e9fa9643bb33701d165
      Reviewed-on: https://swiftshader-review.googlesource.com/c/25448Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
      Tested-by: 's avatarChris Forbes <chrisforbes@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>