1. 26 Oct, 2018 1 commit
  2. 25 Oct, 2018 7 commits
    • Revert "Add compiler printf attribute to relevant functions" · e9503ae9
      Jamie Madill authored
      This reverts commit 27a472c6.
      
      Reason for revert: Causing failures on 32-bit Linux configs:
      
      https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8931673733828416640/+/steps/compile/0/stdout
      
      ../../third_party/angle/src/libGLESv2/entry_points_egl.cpp:257:11: error: reinterpret_cast from 'EGLNativeWindowType' (aka 'unsigned long') to 'uintptr_t' (aka 'unsigned int') is not allowed
                reinterpret_cast<uintptr_t>(win), reinterpret_cast<uintptr_t>(attrib_list));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ../../third_party/angle/src/common/debug.h:230:112: note: expanded from macro 'EVENT'
      #define EVENT(message, ...) gl::ScopedPerfEventHelper scopedPerfEventHelper("%s" message "\n", __FUNCTION__, ##__VA_ARGS__);
                                                                                                                     ^~~~~~~~~~~
      ../../third_party/angle/src/libGLESv2/entry_points_egl.cpp:314:11: error: reinterpret_cast from 'EGLNativePixmapType' (aka 'unsigned long') to 'uintptr_t' (aka 'unsigned int') is not allowed
                reinterpret_cast<uintptr_t>(pixmap), reinterpret_cast<uintptr_t>(attrib_list));
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      Original change's description:
      > Add compiler printf attribute to relevant functions
      > 
      > This commit includes fixes to undefined behavior caught by this
      > attribute.  The following changes have been made:
      > 
      > - 0x%0.8p is changed to %016 PRIxPTR. Both 0 and . have undefined behavior with
      >   p.  Additionally, %p already prints 0x with both gcc and clang.  This
      >   results in a small output change:
      > 
      >     void *x = (void *)0x1234;
      >     void *y = (void *)0x1234567890abcdef;
      > 
      >     printf("|%0.8p|\n", x);
      >     printf("|%0.8p|\n", y);
      > 
      >     printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(x));
      >     printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(y));
      > 
      >   prints:
      > 
      >     |0x00001234|
      >     |0x1234567890abcdef|
      >     |0x0000000000001234|
      >     |0x1234567890abcdef|
      > 
      > - %d used for GLintptr, GLsizeiptr, EGLTime and EGLnsecsANDROID is
      >   changed to %llu and the relevant argument is cast to unsigned long
      >   long.  This is due to these types being typedefs to unknown types (on
      >   Linux for example, these are unsigned long, and my guess would be
      >   unsigned long long on Windows where long is 32 bits).
      > - %llu is used for GLuint64, which could be unsigned long (as is on
      >   Linux).  Those arguments are cast to unsigned long long.
      > - %p is used for some EGLNative types, but those types may not be a
      >   pointer.  Those arguments are cast to uintptr_t and printed as above.
      > 
      > Bug: angleproject:2928
      > Change-Id: I63e9e998c72701ce8582f1ebf25d6374be9090e4
      > Reviewed-on: https://chromium-review.googlesource.com/c/1289232
      > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
      > Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
      
      TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org
      
      Change-Id: I4f3cea64977bee9f889db6c995371bd2bbc6d81b
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: angleproject:2928
      Reviewed-on: https://chromium-review.googlesource.com/c/1299480
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    • Get absolute time from timers · 479918de
      Shahbaz Youssefi authored
      Independent of start()/stop()/getElapsedTime() functionality,
      getAbsoluteTime() is added to return the time regardless of whether the
      timer is running.
      
      Bug: angleproject:2908
      Change-Id: I056aeb6eddfba8757a139934c1cf68e00e860de6
      Reviewed-on: https://chromium-review.googlesource.com/c/1296952
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
      Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
    • Vulkan: Throttle CPU to avoid excessive frame queuing · 6165602f
      Shahbaz Youssefi authored
      Unthrottled, the CPU can generate and queue an increasingly large number
      of frames with the GPU lagging behind, especially with vsync enabled.
      
      Assuming N swapchain images, this commit adds a wait on fence for the
      Nth previous frame before submitting new work, that is the CPU is
      always at most N frames ahead of the GPU.
      
      Bug: angleproject:2908
      Change-Id: Ieb2bf20168bfe9bc9d8e2219f682b01347c21dec
      Reviewed-on: https://chromium-review.googlesource.com/c/1296953
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
      Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
    • Vulkan: add wrapper for vkEvent · 79927344
      Shahbaz Youssefi authored
      Bug: angleproject:2908
      Change-Id: Id6c9326f85f9ff17b963078f82bcf486bae66a83
      Reviewed-on: https://chromium-review.googlesource.com/c/1296951
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    • Add compiler printf attribute to relevant functions · 27a472c6
      Shahbaz Youssefi authored
      This commit includes fixes to undefined behavior caught by this
      attribute.  The following changes have been made:
      
      - 0x%0.8p is changed to %016 PRIxPTR. Both 0 and . have undefined behavior with
        p.  Additionally, %p already prints 0x with both gcc and clang.  This
        results in a small output change:
      
          void *x = (void *)0x1234;
          void *y = (void *)0x1234567890abcdef;
      
          printf("|%0.8p|\n", x);
          printf("|%0.8p|\n", y);
      
          printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(x));
          printf("|%016" PRIxPTR "|\n", reinterpret_cast<uintptr_t>(y));
      
        prints:
      
          |0x00001234|
          |0x1234567890abcdef|
          |0x0000000000001234|
          |0x1234567890abcdef|
      
      - %d used for GLintptr, GLsizeiptr, EGLTime and EGLnsecsANDROID is
        changed to %llu and the relevant argument is cast to unsigned long
        long.  This is due to these types being typedefs to unknown types (on
        Linux for example, these are unsigned long, and my guess would be
        unsigned long long on Windows where long is 32 bits).
      - %llu is used for GLuint64, which could be unsigned long (as is on
        Linux).  Those arguments are cast to unsigned long long.
      - %p is used for some EGLNative types, but those types may not be a
        pointer.  Those arguments are cast to uintptr_t and printed as above.
      
      Bug: angleproject:2928
      Change-Id: I63e9e998c72701ce8582f1ebf25d6374be9090e4
      Reviewed-on: https://chromium-review.googlesource.com/c/1289232
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
      Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
    • Roll Vulkan-Tools · 683bb013
      Shahbaz Youssefi authored
      Includes a fix to mock-icd where vkGetEventStatus returned VK_SUCCESS
      which is not a valid return value.
      
      Bug: angleproject:2908
      Change-Id: I65a6e30099b9168408a874b8632c4c46e8ef7f57
      Reviewed-on: https://chromium-review.googlesource.com/c/1296950Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    • ES31: Fix that asuint can't accept bool value · 672267fc
      Qin Jiajia authored
      This change fixes below errors:
      error X3013: 'asuint': no matching 1 parameter intrinsic function
      error X3013: Possible intrinsic functions are:
      error X3013:     asuint(double, out uint x, out uint y)
      error X3013:     asuint(float|half|int|uint)
      
      When we store a boolean value, we should cast it to uint firstly. Then do the
      store.
      
      Bug: angleproject:1951
      
      Change-Id: I8931e540d701ef72bb82846496c698acef1ba1fb
      Reviewed-on: https://chromium-review.googlesource.com/c/1295831
      Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
  3. 24 Oct, 2018 2 commits
  4. 23 Oct, 2018 1 commit
  5. 22 Oct, 2018 3 commits
  6. 20 Oct, 2018 2 commits
  7. 19 Oct, 2018 10 commits
  8. 18 Oct, 2018 8 commits
  9. 17 Oct, 2018 6 commits
    • perftests: Record trace events to JSON file. · 4024e217
      Jamie Madill authored
      This allows us to view the timeline of events in the trace event
      browser. We can extend this to do GPU timestamp queries and analyze
      when work is actually in flight.
      
      The trace is enabled in standalone ANGLE only using the flag
      --enable-trace with angle_perftests. You can also optionally specify
      the trace output file with --trace-file <blah>. The default file is
      ANGLETrace.json.
      
      Bug: angleproject:2781
      Change-Id: I871f28545d9bf18220b55aaf69e9554dcb4c834d
      Reviewed-on: https://chromium-review.googlesource.com/c/1259763
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
    • Vulkan: Implement glFlush · 3a482179
      Shahbaz Youssefi authored
      A semaphore pool is implemented to allow dynamic allocation of
      semaphores as needed when breaking up a frame with flushes.  The pool is
      used both for acquiring the next image and for chaining mid-frame
      submissions.
      
      RendererVk::flush() is changed so that instead of taking the wait/signal
      semaphores as parameters, it would use the last known signaled semaphore
      as wait semaphore and allocates a semaphore for signaling.  It would
      additionally wait for any extra semaphore provided externally (i.e. the
      surface's image acquire semaphore).
      
      Bug: angleproject:2504
      Change-Id: Iecd2d5535230c48b26a6b7d078710af8730121da
      Reviewed-on: https://chromium-review.googlesource.com/c/1276805
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    • Vulkan: Use a specialized macro for wrapped vulkan calls · 6f1dc51b
      Shahbaz Youssefi authored
      Vulkan wrapper functions are fairly straightforward.  They call the
      Vulkan function and return immediately.  The specialized macros
      introduced in this commit take care of the final return for brevity of
      the warpper.
      
      Additionally, this commit gets rid of ANGLE_EMPTY_STATEMENT in favor of
      the more robust macro definition using do {} while (0).
      
      Bug: none
      Change-Id: Ia7c68962d1aeee2c06ef210122b345b1a2e54f08
      Reviewed-on: https://chromium-review.googlesource.com/c/1262020
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    • Roll clang and other chromium deps · 957e9b82
      Shahbaz Youssefi authored
      A bug in clang is preventing the use of link time optimization.
      
      Bug: angleproject:2892
      Change-Id: Ibe845e82f0db48233f8590189163fd8a5a8df634
      Reviewed-on: https://chromium-review.googlesource.com/c/1263905Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    • Remove unused lambda capture · c20ead32
      Takuto Ikuta authored
      This is a preparation CL to remove -Wno-unused-lambda-capture warning suppression.
      
      Bug: chromium:681136
      Change-Id: Ib5c1c4eeeed3b7406ede2dea33066c54e5fc3da0
      Reviewed-on: https://chromium-review.googlesource.com/c/1286172
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    • Vulkan: Fix deleting in-use descriptor sets. · 78bcd2be
      Jamie Madill authored
      Sequences of many frames with uniform updates could lead to a bug where
      we attempt to delete descriptor sets that are still in use. To trigger
      the bug we need to write enough uniform data to trigger a descriptor
      set to be freed. This would correctly trigger refresh sets in the
      Program. But if there was a second program idle in the background that
      also allocated descriptors from the old pool, the bug would manifest.
      
      Fix this by storing a shared handle to the descriptor pool in the
      Program. The dynamic descriptor pool won't recycle descriptor pools
      internally unless there are zero outstanding references to the pool.
      
      We could also improve this in a resource sharing situation by keeping
      a single shared dynamic descriptor pool per share group.
      
      Includes a contribution from tobine@google.com that adds a test to
      cover the bug.
      
      Bug: angleproject:2863
      Change-Id: Id585b85f33f8cfa3772ceff3af512d1e4fb0b75a
      Reviewed-on: https://chromium-review.googlesource.com/c/1271919Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>