Fix tests running on 32-bit

This commit is contained in:
baldurk
2019-10-01 12:54:34 +01:00
parent 87a172167f
commit 16dace3d48
3 changed files with 7 additions and 6 deletions
+2 -2
View File
@@ -24,7 +24,7 @@
#include "gl_test.h"
#ifdef WIN32
#ifdef WIN64
extern "C" __declspec(dllexport) GLenum APIENTRY InternalFunction()
{
return GL_QUERY_BUFFER;
@@ -127,7 +127,7 @@ void main()
if(GLAD_GL_ARB_query_buffer_object)
glBindBuffer(GL_QUERY_BUFFER, trash);
#ifdef WIN32
#if defined(WIN64)
PFNGLGETERRORPROC internalFunc =
(PFNGLGETERRORPROC)GetProcAddress(GetModuleHandleA(NULL), "InternalFunction");
+1
View File
@@ -48,6 +48,7 @@
bool operator==(const int &other) const { return handle == other; } \
bool operator!=(const int &other) const { return handle != other; } \
operator bool() const { return handle != 0; } \
operator uint64_t() const { return handle; } \
uint64_t handle; \
};
+4 -4
View File
@@ -668,25 +668,25 @@ VkCommandBuffer VulkanWindow::GetCommandBuffer(VkCommandBufferLevel level)
template <>
void VulkanGraphicsTest::setName(VkPipeline obj, const std::string &name)
{
setName(VK_OBJECT_TYPE_PIPELINE, (uint64_t)(uintptr_t)obj, name);
setName(VK_OBJECT_TYPE_PIPELINE, (uint64_t)obj, name);
}
template <>
void VulkanGraphicsTest::setName(VkFramebuffer obj, const std::string &name)
{
setName(VK_OBJECT_TYPE_FRAMEBUFFER, (uint64_t)(uintptr_t)obj, name);
setName(VK_OBJECT_TYPE_FRAMEBUFFER, (uint64_t)obj, name);
}
template <>
void VulkanGraphicsTest::setName(VkImage obj, const std::string &name)
{
setName(VK_OBJECT_TYPE_IMAGE, (uint64_t)(uintptr_t)obj, name);
setName(VK_OBJECT_TYPE_IMAGE, (uint64_t)obj, name);
}
template <>
void VulkanGraphicsTest::setName(VkSampler obj, const std::string &name)
{
setName(VK_OBJECT_TYPE_SAMPLER, (uint64_t)(uintptr_t)obj, name);
setName(VK_OBJECT_TYPE_SAMPLER, (uint64_t)obj, name);
}
void VulkanGraphicsTest::setName(VkObjectType objType, uint64_t obj, const std::string &name)