If I am writing a visualizer with glsl, how can I guarantee it will take advantage of more gpu's? Right out of the box it only works on one, what sort of steps / design of the software will allow the pixel shader to be run in parallel on more than one card?
How should I design GLSL shader to run on crossfire / SLI
1.4k Views Asked by jett At
2
There are 2 best solutions below
5
sleep
On
Zero steps required in GLSL. The SLI/crossfire driver takes care of dividing the workload across the GPUs for you. Same for nVidia surround and AMD Eyefinity: as far as the shader is concerned, it's just a bigger render target.
See these slides by nVidia: SLI in OpenGL, especially the slides "Things Interfering with SLI".
You want to make sure that your rendering loop is correctly set up (i.e. SwapBuffers is called), and that you are at least double buffered for AFR mode SLI.
Related Questions in C++
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Why can't I use templates members in its specialization?
- How to fix "Access violation executing location" when using GLFW and GLAD
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- How do I apply the interface concept with the base-class in design?
- File refuses to compile std::erase() even if using -std=g++23
- How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
- Can std::bit_cast be applied to an empty object?
- Unexpected inter-thread happens-before relationships from relaxed memory ordering
- How i can move element of dynamic vector in argument of function push_back for dynamic vector
- Brick Breaker Ball Bounce
- Thread-safe lock-free min where both operands can change c++
- Watchdog Timer Reset on ESP32 using Webservers
- How to solve compiler error: no matching function for call to 'dmhFS::dmhFS()' in my case?
- Conda CMAKE CXX Compiler error while compiling Pytorch
Related Questions in GLSL
- GLSL clamps indices on array access
- Issue with Loading Images in Flutter FragmentShader and GLSL Code
- How to use bitwise operators in GLSL
- Why isn't my glfw window showing anything?
- Three.js how to determine if backfacing in a RawShaderMaterial that's double sided and transparent?
- Does addition-assignment cause dependency chain in GLSL?
- Why is the value of `gl_FragCoord.z` is always 0.5?
- How to draw a WebGLTexture into another Canvas?
- How to display GLSL shaders on a png
- Single WebGL 2.0 shader for multiple texture precisions
- Problem when rendering a red triangle using modernGL and Pygame
- GLSL fragment shader: How do I prevent seams when sampling half of texture to repeat? (with mipmapping or linear filtering on)
- How can I send large arrays of objects to a fragment shader using WebGL2?
- WebGL 2.0 unsigned integer input variable
- GLSL issue with smoothstep function where edge0 is bigger than edge1
Related Questions in SHADER
- How to use bitwise operators in GLSL
- Three.js how to determine if backfacing in a RawShaderMaterial that's double sided and transparent?
- UNITY_VERTEX_INPUT_INSTANCE_ID use in custom shader
- How to draw a WebGLTexture into another Canvas?
- How can I improve my brush on mobile with Unity slow touch interpretation problem?
- FrameBuffer texture reading black for each pixel WebGL
- Single WebGL 2.0 shader for multiple texture precisions
- How you can make a 3D mask in the UI so that it is displayed correctly. Unity
- Could I use multiple materials in Skybox?
- C++ DirectX compress 3D texture into 2D texture
- Enabling transparency on objects rendered to render texture makes them disappear completely on iOS - React Three Fiber
- i have a glslf file how do i convert that to rgb (primitive lua knowledge)
- Why unity do not include my shader to build but log them?
- Compiling vertex shader from vulkan tutorial with glslc gives error: linking multiple files in not supported yet
- Three.js using EffectComposer renderTarget texture is causing flickering / strobing
Related Questions in GPGPU
- OpenCL dynamic parallelism enqueue_kernel() functionality
- Sign a PGP public key using a private key and password, then save the signed key to a file
- Passing arguments to OpenCL kernel, before execution finished
- CUDA kernel for finding the min and max index of values in a 1D array greater than particular threshold
- Cuda __device__ member function with explicit template declaration
- AMD GPU Compute with c++
- Why is webgpu on mac "max binding size" much smaller than reported "max buffer size"?
- Running multiple times a python script from different threads using different gpus
- GPGPU with Radeon Pro VII in Windows
- Pytorch Memory Management Issue
- Perform vector calculation on GPU in C++, regardless of brand
- Reinterpret cast on *shared memory*
- Can I really launch a library kernel (CUkernel) rather than an in-context kernel (CUfunction)?
- How to use shared memory in PyCuda, LogicError: cuModuleLoadDataEx failed: an illegal memory access was encountered
- What (if anything) is this GPU compute or shader pattern called?
Related Questions in SLI
- How to setup SLI on two GTX 560Ti's
- Druid metric shows more Good Response than Total Request in a particular time interval
- Designing SLO based on Prometheus Counters
- PromQL query to calculate service uptime & downtime from a fixed date
- prometheus alert expression for 99% availability of rest API
- Is the error budget in GCP UI supposed to rise above 100%?
- Tensorflow with 2 GPUs ignores one of them
- D3D11 - How to deal with SLI and Nvidia Surround?
- SLO compliance report according to google SRE book
- How to enable SLI in OpenGL?
- override comments in system.xml in magento2
- OpenGL multi-GPU support
- Y510P Fedora doesn't start X after faulty drivers installation
- OpenGL Draw call on SLI/CrossFire Graphic Cards
- How does SLI decide which VBO belongs to which GPU in OpenGL?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
From the comments in Jarrod's answer it looks like the 'problem' you are running into is AFR mode (alternate frame rendering) vs SFR mode (split frame rendering), which is a driver mode setup issue.
In AFR mode, the driver sends each entire frame to a single GPU and sends alternate frames to the other GPU. This is great for games and animations where you're most interested in maximizing frame rate and don't care so much about frame latency. Using the GPUs this way gives you pretty much a 2x fps speedup for SLI with little effort. But if you're only drawing a single frame (as seems to be the case from your comment), it will just use the one GPU.
In SFR mode, the driver will split each frame and render part of each frame on each GPU. The problem with this mode is that both GPUs need to do all the setup for every frame, so you won't get 2x speedup. In fact pretty much the only thing that will be sped up is fragment shaders (since each GPU will run half the fragments), so if only 50% of your (single GPU) render time is fragment shaders, you'll only get (at best) a 33% speedup. You might get less as the split may be imbalanced (so one GPU ends up with most of the fragments).
As SFR is generally slower, AFR tends to be the default. You can control AFR vs SFR via the control panel.