Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Using C how can I detect the currently installed discrete GPUs and if they are currently in CrossFireX or SLI. I am using windows 7 and openGL. I would like to discover this information so that in my game I can support Alternate Frame Rendering more efficiently.
You need to use specific extensions, for each vendor. For CrossFire, you would use WGL_AMD_gpu_association, and specifically wglGetGPUIDsAMD and wglGetGPUInfoAMD to get information about the different GPUs. For Nvidia SLI, you would use WGL_NV_gpu_affinity, and specifically wglEnumGpusNV and wglEnumGpuDevicesNV to get information about the different GPUs.
To actually utilize multi-gpu, you will also need to create your contexts with the functions within those two extensions as well.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm trying to create a Vulkan application in Linux. How can I obtain a Vulkan context from a raw X11 window, no Qt or GTK involved.
Thanks :)
If you already got your X11 window you need to define VK_USE_PLATFORM_XLIB_KHR and create a Vulkan compatible surface from it using vkCreateXlibSurfaceKHR, or if you want to use XCB you'd use vkCreateXcbSurfaceKHR and define VK_USE_PLATFORM_XCB_KHR.
Also note that you need to provide the proper surface extension at instance creation time. Either VK_KHR_XLIB_SURFACE_EXTENSION_NAME or VK_KHR_XCB_SURFACE_EXTENSION_NAME.
You then provide that surface at swapchain creation time (given your application does some visible output).
See the WSI chapter of the spec for details.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am programming for an embedded system, where resources are at premium cost.
A few techniques that I am aware of are -
Remove/Reduce unused variable/memory.
Use macros for small/inline functions.
Is there anything else that I can use for this? Also, please correct if I am wrong.
Please Note: I am not asking exclusively about low level programming.
Let's say I am bound to use some particular amount of stack memory only. My program doesn't use recursion.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am developing an operating system using C, Assembler and the GCC Cross Compiler. I have already implemented a working kernel that prints to the screen and allows the user to type in some simple commands. I have already looked into some file systems such as FAT32 and LFS. What other options do I have about implementing my very own filesystem?
There's always Practical File System Design with the Be File System (PDF).
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am new to C and I would like to know if it is possible to make colorful console menus with simple graphics, like old DOS programs used to look. I am programming on Windows PC and portability is not important for this one.
Take a look at PDCurses which is a dos/windows curses implementation (curses does all the console richness in unix/linux environments).
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How does the Erlang runtime implement a user-space multi-threaded mechanism on UNIX-like systems?
Is it implemented using something like getcontext(2) or longjump(3)?
Any related documentation would be much appreciated.
Each Erlang process is just a struct with a heap and a stack in it. So switching process is just a matter of using another struct in an queue. I think this paper describes it nicely.