Comments (9)
(But again, there isn't even a hypothetical world where Solaris 10--last official update was in 2013--is getting a Vulkan implementation, so it doesn't really matter if it compiles there. :) )
from sdl.
For SDL2, the configure workaround is probably fine, but we should make sure CMake is doing the right thing in SDL3.
from sdl.
The correct fix, fwiw, is to disable Vulkan if libxcb isn't available, but no one should spend time writing autoconf tests at this point, so I'm just disabling Vulkan for Solaris in SDL2.
(I also don't understand why our Xlib-based code requires libxcb for Vulkan, when Vulkan offers an Xlib equivalent. Didn't we fix this in SDL3?)
from sdl.
I also don't understand why our Xlib-based code requires libxcb for Vulkan
Turns out (in SDL3 at least, if not SDL2) we favor Xlib, but if the Vulkan implementation doesn't have Xlib support but only xcb, we attempt to get the proper lowlevel handles from Xlib to use xcb instead.
We could check for xcb headers in CMake, sprinkle around some ifdefs, and fail in X11_Vulkan_LoadLibrary if we're forced into needing xcb, but I'm not confident this is worth it instead of just turning off Vulkan for Solaris.
Unless we want to do something more for SDL3, this can be closed now.
from sdl.
The xcb.h
include is commented out in both SDL2 and SDL3.
If libxcb is not available on Solaris, then won't the xcb workaround in SDL_x11vulkan.c simply fail always?
Do we really need to conditionally #ifdef
-out the workaround?
Also, because no xcb.h header is included, I think current SDL will build successfully (with and without vulkan enabled) on Solaris.
from sdl.
That one is commented out, but vulkan.h includes it, if VK_USE_PLATFORM_XCB_KHR is defined, which SDL_vulkan_internal.h does.
from sdl.
I have the patch below queued for solaris. I've got some questions unanswered in other issues (CMAKE_C_COMPILER_ID
of the compiler + what predefined macros the toolchain defines)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -232,6 +232,8 @@ if(SDL_SHARED_DEFAULT AND SDL_STATIC_DEFAULT AND SDL_SHARED_AVAILABLE)
endif()
endif()
+set(SDL_VULKAN_DEFAULT ON)
+
set(SDL_X11_OPTIONS Xcursor Xdbe XInput Xfixes Xrandr Xscrnsaver XShape)
foreach(_SUB ${SDL_X11_OPTIONS})
string(TOUPPER "SDL_X11_${_SUB}_DEFAULT" _OPT)
@@ -239,6 +241,7 @@ foreach(_SUB ${SDL_X11_OPTIONS})
endforeach()
if(SOLARIS)
+ set(SDL_VULKAN_DEFAULT OFF)
set(SDL_X11_XRANDR_DEFAULT OFF)
endif()
@@ -351,7 +354,7 @@ dep_option(SDL_WASAPI "Use the Windows WASAPI audio driver" ON "WIN
dep_option(SDL_RENDER_D3D "Enable the Direct3D render driver" ON "SDL_RENDER" OFF)
dep_option(SDL_RENDER_METAL "Enable the Metal render driver" ON "SDL_RENDER;${APPLE}" OFF)
dep_option(SDL_VIVANTE "Use Vivante EGL video driver" ON "${UNIX_SYS};SDL_CPU_ARM32" OFF)
-dep_option(SDL_VULKAN "Enable Vulkan support" ON "SDL_VIDEO;ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
+dep_option(SDL_VULKAN "Enable Vulkan support" "${SDL_VULKAN_DEFAULT}" "SDL_VIDEO;ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
dep_option(SDL_RENDER_VULKAN "Enable the Vulkan render driver" ON "SDL_RENDER;SDL_VULKAN;ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
dep_option(SDL_METAL "Enable Metal support" ON "APPLE" OFF)
dep_option(SDL_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS} "SDL_VIDEO" OFF)
from sdl.
I couldn't coerce CMake itself to build from source, and the prebuilt package of it I dug up fails to load at all...but this isn't my area of expertise, there's probably a super-easy way to install this on Solaris that I missed.
(EDIT: I got it working, see the other bug report.)
from sdl.
Yeah, @madebr, go ahead and push the above patch and close this one.
from sdl.
Related Issues (20)
- Solaris 10 does not include compatible UTF8 support by default, SDL2 cannot compile HOT 2
- SDL_FALLTHROUGH check in ./include/begin_code.h incompatible with Solaris 10 UNIX "make" HOT 8
- SDL2 threading config in ./cmake/sdlchecks.cmake not correct for non-GNU compiler (e.g. SunPro cc) HOT 2
- UNIX version of SDL_GetBasePath in SDL_sysfilesystem.c not correct for Solaris, probably other UNIXes HOT 2
- Compiling SDL on SPARC platform with GNU toolset should target correct CPU by default HOT 3
- SDL incorrectly detects X11_XRANDR with CMake, does not compile on Solaris 10
- SDL loads wrong controller definition from gamecontrolllerdb HOT 6
- VC : Add /MT /MTd and /MD /MDd in artifacts github HOT 2
- Feature: Open SDL_StepUTF8() for public use HOT 3
- Switch SDLK_PERCENT and SDLK_DOLLAR to match ascii values? HOT 1
- KMSDRM: Garbled video with testgles2 on NVIDIA Tegra HOT 5
- doctest + SDL2main : error LNK2019 (despite using DOCTEST_CONFIG_IMPLEMENT) HOT 13
- Multiple Windows and SDL_EVENT_QUIT failure HOT 3
- SDL_RenderReadPixels doesn't give the same data depending on if the app is fullscreen or not HOT 11
- Encoding of paths in file dialogs HOT 3
- SDL_x11shape.c syntax error if SDL_X11_XSHAPE is disabled HOT 1
- segfault in testaudio HOT 2
- Issue with sdl output with AMD graphic
- Cannot create renderer even after `SDL_DestroyWindowSurface` has been called on a window HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdl.