Difference between revisions of "Portal:OpenGL Shading Language/Compute Shader"

From OpenGL Wiki
Jump to navigation Jump to search
m (Clarification)
m (Bot: Updating section links to use redirects.)
Line 1: Line 1:
 
The '''Compute Shader''' is the shader stage for doing arbitrary computations. It uses an execution model based on groups of shader invocations which can share data. The invocations within this "work groups" can inter-communicate reasonably freely, with relatively minimal overhead. The number of invocations within a work group is limited, but the shader can select any number within those limits.
 
The '''Compute Shader''' is the shader stage for doing arbitrary computations. It uses an execution model based on groups of shader invocations which can share data. The invocations within this "work groups" can inter-communicate reasonably freely, with relatively minimal overhead. The number of invocations within a work group is limited, but the shader can select any number within those limits.
  
Compute shaders are not invoked by rendering operations. They are instead started by [[Compute Shader#Dispatch|calling a special dispatch function]]. Each execution of a compute shader will run the given number of work groups.
+
Compute shaders are not invoked by rendering operations. They are instead started by [[Compute Dispatch|calling a special dispatch function]]. Each execution of a compute shader will run the given number of work groups.
  
 
While compute shaders could in theory take the place of rendering, this is not a practical use for them.
 
While compute shaders could in theory take the place of rendering, this is not a practical use for them.

Revision as of 16:36, 6 May 2015

The Compute Shader is the shader stage for doing arbitrary computations. It uses an execution model based on groups of shader invocations which can share data. The invocations within this "work groups" can inter-communicate reasonably freely, with relatively minimal overhead. The number of invocations within a work group is limited, but the shader can select any number within those limits.

Compute shaders are not invoked by rendering operations. They are instead started by calling a special dispatch function. Each execution of a compute shader will run the given number of work groups.

While compute shaders could in theory take the place of rendering, this is not a practical use for them.