From e0c6edc81a6fcf6f9f1ab0a872aa4f2c0e5ff9e2 Mon Sep 17 00:00:00 2001 From: David Pinedo Date: Tue, 10 Feb 2015 15:02:08 -0700 Subject: Win: Build Glave replay on Windows (REQUIRES NEW CMAKE COMMAND). Starting with this commit, building XGL on Windows requires explicitly stating whether a "Release" or "Debug" build is desired when doing the initial cmake command. This is documented in the "Build.md" file. Linux trace of cube plays to completion on windows! Changes to the null driver: advertise support for both WIN WSI and X11 WSI added support for xglCreateBufferView and added a logging capability (turned off by default) Still have some issues: - x11 support emulation/replacement - Windows null driver creates a bad device queue - Need to copy libraries to dir containing the .exe Glave ext libs are now put in same dir as glvreplay64.exe... This change only affects Windows -- on Linux the libs and the glave replay progs were already in the same dir. Also added a line to BUILD.md regarding the need to have XGL.dll in PATH. --- loader/CMakeLists.txt | 5 +- loader/XGL.def | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 loader/XGL.def (limited to 'loader') diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt index 41fd9891..41d60fe8 100644 --- a/loader/CMakeLists.txt +++ b/loader/CMakeLists.txt @@ -19,8 +19,9 @@ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG") if (WIN32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES -D_CRT_SECURE_NO_WARNINGS") - add_library(XGL SHARED loader.c dirent_on_windows.c dispatch.c table_ops.h) - add_library(XGLstatic STATIC loader.c dirent_on_windows.c dispatch.c table_ops.h) + add_library(XGL SHARED loader.c loader.h dirent_on_windows.c dispatch.c table_ops.h XGL.def) + set_target_properties(XGL PROPERTIES LINK_FLAGS "/DEF:${PROJECT_SOURCE_DIR}/loader/XGL.def") + add_library(XGLstatic STATIC loader.c loader.h dirent_on_windows.c dispatch.c table_ops.h) set_target_properties(XGLstatic PROPERTIES OUTPUT_NAME XGL) target_link_libraries(XGL) endif() diff --git a/loader/XGL.def b/loader/XGL.def new file mode 100644 index 00000000..6c560ba1 --- /dev/null +++ b/loader/XGL.def @@ -0,0 +1,150 @@ +;;;; Begin Copyright Notice ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; XGL +; +; Copyright (C) 2015 LunarG, Inc. +; +; Permission is hereby granted, free of charge, to any person obtaining a +; copy of this software and associated documentation files (the "Software"), +; to deal in the Software without restriction, including without limitation +; the rights to use, copy, modify, merge, publish, distribute, sublicense, +; and/or sell copies of the Software, and to permit persons to whom the +; Software is furnished to do so, subject to the following conditions: +; +; The above copyright notice and this permission notice shall be included +; in all copies or substantial portions of the Software. +; +; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +; THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +; DEALINGS IN THE SOFTWARE. +;;;; End Copyright Notice ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; The following is required on Windows, for exporting symbols from the DLL + +LIBRARY XGL +EXPORTS + xglCreateInstance + xglDestroyInstance + xglEnumerateGpus + xglGetGpuInfo + xglGetProcAddr + xglCreateDevice + xglDestroyDevice + xglGetExtensionSupport + xglEnumerateLayers + xglGetDeviceQueue + xglQueueSubmit + xglQueueSetGlobalMemReferences + xglQueueWaitIdle + xglDeviceWaitIdle + xglAllocMemory + xglFreeMemory + xglSetMemoryPriority + xglMapMemory + xglUnmapMemory + xglPinSystemMemory + xglGetMultiGpuCompatibility + xglOpenSharedMemory + xglOpenSharedQueueSemaphore + xglOpenPeerMemory + xglOpenPeerImage + xglDestroyObject + xglGetObjectInfo + xglBindObjectMemory + xglBindObjectMemoryRange + xglBindImageMemoryRange + xglCreateFence + xglGetFenceStatus + xglWaitForFences + xglCreateQueueSemaphore + xglSignalQueueSemaphore + xglWaitQueueSemaphore + xglCreateEvent + xglGetEventStatus + xglSetEvent + xglResetEvent + xglCreateQueryPool + xglGetQueryPoolResults + xglGetFormatInfo + xglCreateBuffer + xglCreateBufferView + xglCreateImage + xglSetFastClearColor + xglSetFastClearDepth + xglGetImageSubresourceInfo + xglCreateImageView + xglCreateColorAttachmentView + xglCreateDepthStencilView + xglCreateShader + xglCreateGraphicsPipeline + xglCreateComputePipeline + xglStorePipeline + xglLoadPipeline + xglCreatePipelineDelta + xglCreateSampler + xglCreateDescriptorSetLayout + xglBeginDescriptorRegionUpdate + xglEndDescriptorRegionUpdate + xglCreateDescriptorRegion + xglClearDescriptorRegion + xglAllocDescriptorSets + xglClearDescriptorSets + xglUpdateDescriptors + xglCreateDynamicViewportState + xglCreateDynamicRasterState + xglCreateDynamicColorBlendState + xglCreateDynamicDepthStencilState + xglCreateCommandBuffer + xglBeginCommandBuffer + xglEndCommandBuffer + xglResetCommandBuffer + xglCmdBindPipeline + xglCmdBindPipelineDelta + xglCmdBindDynamicStateObject + xglCmdBindDescriptorSet + xglCmdBindVertexBuffer + xglCmdBindIndexBuffer + xglCmdDraw + xglCmdDrawIndexed + xglCmdDrawIndirect + xglCmdDrawIndexedIndirect + xglCmdDispatch + xglCmdDispatchIndirect + xglCmdCopyBuffer + xglCmdCopyImage + xglCmdCopyBufferToImage + xglCmdCopyImageToBuffer + xglCmdCloneImageData + xglCmdUpdateBuffer + xglCmdFillBuffer + xglCmdClearColorImage + xglCmdClearColorImageRaw + xglCmdClearDepthStencil + xglCmdResolveImage + xglCmdSetEvent + xglCmdResetEvent + xglCmdWaitEvents + xglCmdPipelineBarrier + xglCmdBeginQuery + xglCmdEndQuery + xglCmdResetQueryPool + xglCmdWriteTimestamp + xglCmdInitAtomicCounters + xglCmdLoadAtomicCounters + xglCmdSaveAtomicCounters + xglCreateFramebuffer + xglCreateRenderPass + xglCmdBeginRenderPass + xglCmdEndRenderPass + xglDbgSetValidationLevel + xglDbgRegisterMsgCallback + xglDbgUnregisterMsgCallback + xglDbgSetMessageFilter + xglDbgSetObjectTag + xglDbgSetGlobalOption + xglDbgSetDeviceOption + xglCmdDbgMarkerBegin + xglCmdDbgMarkerEnd -- cgit v1.2.3