mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-27 08:05:42 +00:00
Make xlib and xcb support optional (but default on) on linux
* Also allow disabling GL a little better by removing the dependency in renderdoccmd. * Disabling them now completely removes all xcb and xlib build dependencies. The resulting library/executable is only useful in limited situations - e.g. replaying vulkan remotely which doesn't need any window system interaction. Or capturing vulkan as well with the KHR_display WSI extension which doesn't need any built-time includes or libs.
This commit is contained in:
@@ -23,11 +23,6 @@
|
||||
* THE SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#if defined(RENDERDOC_PLATFORM_LINUX)
|
||||
#define RENDERDOC_WINDOWING_XLIB 1
|
||||
#define RENDERDOC_WINDOWING_XCB 1
|
||||
#endif
|
||||
|
||||
#include "common/common.h"
|
||||
#include "maths/matrix.h"
|
||||
#include "serialise/string_utils.h"
|
||||
@@ -38,10 +33,22 @@ static uint64_t GetHandle(WindowingSystem system, void *data)
|
||||
#if defined(RENDERDOC_PLATFORM_LINUX)
|
||||
|
||||
if(system == eWindowingSystem_Xlib)
|
||||
{
|
||||
#if defined(RENDERDOC_WINDOWING_XLIB)
|
||||
return (uint64_t)((XlibWindowData *)data)->window;
|
||||
#else
|
||||
RDCERR("Xlib windowing system data passed in, but support is not compiled in");
|
||||
#endif
|
||||
}
|
||||
|
||||
if(system == eWindowingSystem_XCB)
|
||||
{
|
||||
#if defined(RENDERDOC_WINDOWING_XCB)
|
||||
return (uint64_t)((XCBWindowData *)data)->window;
|
||||
#else
|
||||
RDCERR("XCB windowing system data passed in, but support is not compiled in");
|
||||
#endif
|
||||
}
|
||||
|
||||
RDCERR("Unrecognised window system %d", system);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user