diff options
author | 2016-10-04 14:24:23 -0700 | |
---|---|---|
committer | 2016-10-04 14:24:23 -0700 | |
commit | 024229a38d86fc53801092e149d8599b2b2bc9fb (patch) | |
tree | 8ba851c6fb49d195693c0561e6744c4ad5b534dc /tools | |
parent | 777ee88129ae5432209378f861b92ccb52eb0ac4 (diff) |
Use uint64_t for PlatformFence
VkFence is 64 bit even on 32-bit platforms.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2391113002
Review-Url: https://codereview.chromium.org/2391113002
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gpu/FenceSync.h | 2 | ||||
-rw-r--r-- | tools/gpu/gl/GLTestContext.cpp | 1 | ||||
-rw-r--r-- | tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp | 3 | ||||
-rw-r--r-- | tools/gpu/vk/VkTestContext.cpp | 2 |
4 files changed, 6 insertions, 2 deletions
diff --git a/tools/gpu/FenceSync.h b/tools/gpu/FenceSync.h index c3f1182621..8f2bbe2e86 100644 --- a/tools/gpu/FenceSync.h +++ b/tools/gpu/FenceSync.h @@ -12,7 +12,7 @@ namespace sk_gpu_test { -using PlatformFence = intptr_t; +using PlatformFence = uint64_t; static constexpr PlatformFence kInvalidPlatformFence = 0; /* diff --git a/tools/gpu/gl/GLTestContext.cpp b/tools/gpu/gl/GLTestContext.cpp index 1d53bbcd83..1b077d5a02 100644 --- a/tools/gpu/gl/GLTestContext.cpp +++ b/tools/gpu/gl/GLTestContext.cpp @@ -28,6 +28,7 @@ private: static constexpr GrGLbitfield GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001; typedef struct __GLsync *GLsync; + GR_STATIC_ASSERT(sizeof(GLsync) <= sizeof(sk_gpu_test::PlatformFence)); typedef GLsync (GR_GL_FUNCTION_TYPE* GLFenceSyncProc) (GrGLenum, GrGLbitfield); typedef GrGLenum (GR_GL_FUNCTION_TYPE* GLClientWaitSyncProc) (GLsync, GrGLbitfield, GrGLuint64); diff --git a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp index 8fdd3fea86..06bd70f852 100644 --- a/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp +++ b/tools/gpu/gl/egl/CreatePlatformGLTestContext_egl.cpp @@ -320,6 +320,8 @@ void EGLFenceSync::deleteFence(sk_gpu_test::PlatformFence platformFence) const { eglDestroySyncKHR(fDisplay, eglsync); } +GR_STATIC_ASSERT(sizeof(EGLSyncKHR) <= sizeof(sk_gpu_test::PlatformFence)); + } // anonymous namespace namespace sk_gpu_test { @@ -337,4 +339,3 @@ GLTestContext *CreatePlatformGLTestContext(GrGLStandard forcedGpuAPI, return ctx; } } // namespace sk_gpu_test - diff --git a/tools/gpu/vk/VkTestContext.cpp b/tools/gpu/vk/VkTestContext.cpp index c1a2f8ab56..a76a361a37 100644 --- a/tools/gpu/vk/VkTestContext.cpp +++ b/tools/gpu/vk/VkTestContext.cpp @@ -103,6 +103,8 @@ private: typedef sk_gpu_test::FenceSync INHERITED; }; +GR_STATIC_ASSERT(sizeof(VkFence) <= sizeof(sk_gpu_test::PlatformFence)); + // TODO: Implement swap buffers and finish class VkTestContextImpl : public sk_gpu_test::VkTestContext { public: |