![]() |
VR-Forces 5.0.3 Developer's Guide
|
This class clears buffers using compute shader Theoretically, there are performance gains to be achieved by doing this in compute shader as explained here: https://jira.mak.com/browse/VRV-2672 Furthermore, this is inherently scalable in terms of parallelism (future cards will have more cores/larger work group size)/ Furthermore, glClearNamedBufferData seem to cause crashes because of driver heuristics when memory usage is high. Lastly, Vulkan based applications do it this way anyway.

Public Member Functions | |
| DtIndirectClearBufferProgram (DtDe &de) | |
| virtual | ~DtIndirectClearBufferProgram () |
| DtIndirectClearBufferProgram ()=delete | |
| DtIndirectClearBufferProgram (const DtIndirectClearBufferProgram &)=delete | |
| DtIndirectClearBufferProgram & | operator= (const DtIndirectClearBufferProgram &)=delete |
| virtual void | clearBuffer (DtGlBuffer *buffer, unsigned int clearValue) |
| virtual void | deleteShaders () |
| virtual void | incrementNumUsers () |
| virtual void | decrementNumUsers () |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Member Functions | |
| static DtIndirectClearBufferProgram * | instance (DtDe &de) |
Protected Member Functions | |
| virtual void | initializeShadersIfNecessary (void) |
Protected Attributes | |
| DtGlProgram * | myClearProgram |
| DtVector3< int > | myWorkGroupLocalSize |
| tbb::atomic< int > | myNumUsers |
| int | myBufferSizeLoc |
| int | myClearValueLoc |
| DtDe & | myDe |
Static Protected Attributes | |
| static const std::string | theShaderFilePath |
| makVrv::DtIndirectClearBufferProgram::DtIndirectClearBufferProgram | ( | DtDe & | de | ) |
constructor
|
virtual |
destructor
|
delete |
not allowed
|
delete |
not allowed
|
static |
singleton access to lod manager program
|
delete |
not allowed
|
virtual |
clear a buffer to a given value
|
virtual |
cleanup the gpu shaders
|
virtual |
ref counting tracking
|
virtual |
ref counting tracking
|
protectedvirtual |
create the compute shader if not yet created or after reload shaders is called
|
protected |
handle to the actual gl program
local work group sisze
|
protected |
the ref count (users)
|
protected |
locations of some uniforms
|
protected |
|
protected |
reference to de
|
staticprotected |
the shader file path