1. 27 Oct, 2018 1 commit
  2. 26 Oct, 2018 7 commits
    • Add flags to shader translator to emulate gl_DrawID · 7cf9cd24
      Austin Eng authored
      Adds support for translating gl_DrawID for implementation of
      GL_ANGLE_multi_draw.
      
      Currently the change only supports and allows emulation of the
      draw id using a uniform variable named `gl_DrawID`. This uniform is
      mapped in the translated shader to a hashed name that does not
      use the gl_ namespace
      
      Bug: chromium:890539
      
      Change-Id: I08a246ca911e88e733ccdf22f1ed69dcae948e05
      Reviewed-on: https://chromium-review.googlesource.com/c/1271957
      Commit-Queue: Austin Eng <enga@chromium.org>
      Reviewed-by: 's avatarKai Ninomiya <kainino@chromium.org>
    • Fix entry points. · e357535f
      Jamie Madill authored
      A race broke the ANGLE tree due to an entry point formatting change.
      
      Bug: angleproject:2890
      Bug: angleproject:2928
      Change-Id: I08cc4e13c9d5bd1888c0d891113d3042759d43dc
      Reviewed-on: https://chromium-review.googlesource.com/c/1302534Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
    • Support GL_OES_texture_border_clamp · b8543630
      Till Rathmann authored
      Added support for GL_TEXTURE_BORDER_COLOR and GL_CLAMP_TO_BORDER in
      OpenGL/OpenGLES, Direct3D9 and Direct3D11 backends.
      For integer textures in OpenGLES3 contexts these additional entry points
      are available now:
      
      void glTexParameterIivOES(enum target, enum pname, const int *params);
      void glTexParameterIuivOES(enum target, enum pname, const uint *params);
      
      void glGetTexParameterIivOES(enum target, enum pname, int *params);
      void glGetTexParameterIuivOES(enum target, enum pname, uint *params);
      
      void glSamplerParameterIivOES(uint sampler, enum pname, const int *params);
      void glSamplerParameterIuivOES(uint sampler, enum pname, const uint *params);
      
      void glGetSamplerParameterIivOES(uint sampler, enum pname, int *params);
      void glGetSamplerParameterIuivOES(uint sampler, enum pname, uint *params);
      
      BUG=angleproject:2890
      TEST=angle_end2end_tests.TextureBorderClamp*
      
      Change-Id: Iee3eeb399d8d7851b3b30694ad8f21a2111f5828
      Reviewed-on: https://chromium-review.googlesource.com/c/1257824
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    • Vulkan: Make layers not depend on libvulkan. · 20dc1c9b
      Jamie Madill authored
      On Android the layers were adding a dependency on libvulkan. This
      isn't necessary. We can move this dependency up the change to
      libANGLE.
      
      Bug: angleproject:2935
      Change-Id: I63460c05ca99c5afb6e863af9d6142576aa910b9
      Reviewed-on: https://chromium-review.googlesource.com/c/1301721Reviewed-by: 's avatarYuly Novikov <ynovikov@chromium.org>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
    • Add compiler printf attribute to relevant functions · a390ebd9
      Shahbaz Youssefi authored
      Relands 27a472c6 with reinterpret_cast changed to C-style cast to
      support types that are pointers on some platforms and integers on
      others.
      
      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", (uintptr_t)x);
          printf("|%016" PRIxPTR "|\n", (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: Idf9f705c3d00f69e41e7603453016276a2e13a64
      Reviewed-on: https://chromium-review.googlesource.com/c/1300913Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
    • Don't set native blob cache callbacks if the driver doesn't support it. · ad8fe588
      Geoff Lang authored
      BUG=angleproject:2516
      
      Change-Id: I147705e22a7c694d1f22088a9270c579b0941c7d
      Reviewed-on: https://chromium-review.googlesource.com/c/1302113Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
      Commit-Queue: Geoff Lang <geofflang@chromium.org>
    • Fix Win32Timer's Frequency init. · 3ce69ba3
      Jamie Madill authored
      This could cause some problems on the perf bots.
      
      Bug: angleproject:2908
      Change-Id: If12e5939ba80b3fd0b9609e7b76df6045e60cb94
      Reviewed-on: https://chromium-review.googlesource.com/c/1301849Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
  3. 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>
  4. 24 Oct, 2018 2 commits
  5. 23 Oct, 2018 1 commit
  6. 22 Oct, 2018 3 commits
  7. 20 Oct, 2018 2 commits
  8. 19 Oct, 2018 10 commits
  9. 18 Oct, 2018 7 commits