DarkBASIC Professional Help File

DX11:DIRECTCOMPUTE

Contains functionality for using the GPU as a general purpose processing unit (GPGPU).
This means you can use the parallel nature of the GPU for things other than rendering, something that is for example used to provide the
hardware accelleration of PhysX.
In order to facilitate this, compute shaders and pixel shaders can access special read/write resources that can be accessed in an unordered fashion
through indexing (as compared to the ordered output of for example a pixel shader to a render target where only one specific pixel is written at a time and information
about neighbouring pixels cannot be obtained). These resources can then be read back to the CPU or used as input to other shader stages (for example a compute shader can
generate and update particle data to a buffer which is then bound as (a read-only) input resource of a geometry shader which expands this into polygons for drawing the particles).
A limited version of the DirectCompute functionality is available on DX10 hardware, but DX11 hardware offers greatly enchanced functionality as well as an increased amount of writable resource types.

    DX11 LOAD COMPUTE SHADER : Return Dword = DX11 LOAD COMPUTE SHADER(fileName, functionName, [profile])

    DX11 DELETE COMPUTE SHADER : DX11 DELETE COMPUTE SHADER shader

    DX11 COMPUTE SHADER EXISTS : Return Boolean = DX11 COMPUTE SHADER EXISTS(shader)

    DX11 CREATE ARRAY BUFFER : Return Dword = DX11 CREATE ARRAY BUFFER(elementCount, format, accessMode)

    DX11 CREATE STRUCTURED BUFFER : Return Dword = DX11 CREATE STRUCTURED BUFFER(elementCount, elementSize, accessMode)

    DX11 CREATE APPEND CONSUME BUFFER : Return Dword = DX11 CREATE APPEND CONSUME BUFFER(maxElementCount, elementSize)

    DX11 CREATE BYTE ADDRESS BUFFER : Return Dword = DX11 CREATE BYTE ADDRESS BUFFER(byteSize, accessMode)

    DX11 CREATE INDIRECT BUFFER : Return Dword = DX11 CREATE INDIRECT BUFFER(byteSize)

    DX11 DELETE BUFFER : DX11 DELETE BUFFER buffer

    DX11 BUFFER EXISTS : Return Boolean = DX11 BUFFER EXISTS(buffer)

    DX11 GET BUFFER SIZE : Return Dword = DX11 GET BUFFER SIZE(buffer)

    DX11 IS BUFFER GPU WRITABLE : Return Boolean = DX11 IS BUFFER GPU WRITABLE(buffer)

    DX11 GET APPEND CONSUME BUFFER ELEMENT COUNT : Return Integer = DX11 GET APPEND CONSUME BUFFER ELEMENT COUNT(appendConsumeBuffer)

    DX11 COPY APPEND CONSUME BUFFER ELEMENT COUNT TO BUFFER : DX11 COPY APPEND CONSUME BUFFER ELEMENT COUNT TO BUFFER appendConsumeBuffer, targetBuffer, byteOffset

    DX11 COPY APPEND CONSUME BUFFER ELEMENT COUNT TO CBUFFER : DX11 COPY APPEND CONSUME BUFFER ELEMENT COUNT TO CBUFFER appendConsumeBuffer, targetCBuffer, byteOffset

    DX11 SET APPEND CONSUME BUFFER ELEMENT COUNT : DX11 SET APPEND CONSUME BUFFER ELEMENT COUNT appendConsumeBuffer, count

    DX11 SET BUFFER BOOLEAN : DX11 SET BUFFER BOOLEAN buffer, offset, [offsetInElement], value

    DX11 SET BUFFER INTEGER : DX11 SET BUFFER INTEGER buffer, offset, [offsetInElement], value

    DX11 SET BUFFER DWORD : DX11 SET BUFFER DWORD buffer, offset, [offsetInElement], value

    DX11 SET BUFFER FLOAT : DX11 SET BUFFER FLOAT buffer, offset, [offsetInElement], value

    DX11 SET BUFFER VECTOR2 : DX11 SET BUFFER VECTOR2 buffer, offset, [offsetInElement], vector2

    DX11 SET BUFFER VECTOR3 : DX11 SET BUFFER VECTOR3 buffer, offset, [offsetInElement], vector3

    DX11 SET BUFFER VECTOR4 : DX11 SET BUFFER VECTOR4 buffer, offset, [offsetInElement], vector4

    DX11 SET BUFFER MATRIX : DX11 SET BUFFER MATRIX buffer, offset, [offsetInElement], matrix

    DX11 FETCH BUFFER CONTENTS : DX11 FETCH BUFFER CONTENTS buffer

    DX11 GET BUFFER BOOLEAN : Return Boolean = DX11 GET BUFFER BOOLEAN(buffer, offset, [offsetInElement])

    DX11 GET BUFFER INTEGER : Return Integer = DX11 GET BUFFER INTEGER(buffer, offset, [offsetInElement])

    DX11 GET BUFFER DWORD : Return Dword = DX11 GET BUFFER DWORD(buffer, offset, [offsetInElement])

    DX11 GET BUFFER FLOAT : Return Float = DX11 GET BUFFER FLOAT(buffer, offset, [offsetInElement])

    DX11 GET BUFFER VECTOR2 : Return Dword = DX11 GET BUFFER VECTOR2(buffer, offset, [offsetInElement], [destinationVector])

    DX11 GET BUFFER VECTOR3 : Return Dword = DX11 GET BUFFER VECTOR3(buffer, offset, [offsetInElement], [destinationVector])

    DX11 GET BUFFER VECTOR4 : Return Dword = DX11 GET BUFFER VECTOR4(buffer, offset, [offsetInElement], [destinationVector])

    DX11 GET BUFFER MATRIX : Return Dword = DX11 GET BUFFER MATRIX(buffer, offset, [offsetInElement], [destinationVector])

    DX11 SET COMPUTE SHADER BUFFER : DX11 SET COMPUTE SHADER BUFFER shader, slot, buffer

    DX11 SET COMPUTE SHADER IMAGE : DX11 SET COMPUTE SHADER IMAGE shader, slot, image

    DX11 SET COMPUTE SHADER RWBUFFER : DX11 SET COMPUTE SHADER RWBUFFER shader, slot, buffer

    DX11 SET COMPUTE SHADER APPEND CONSUME BUFFER : DX11 SET COMPUTE SHADER APPEND CONSUME BUFFER shader, slot, buffer

    DX11 SET COMPUTE SHADER RWIMAGE : DX11 SET COMPUTE SHADER RWIMAGE shader, slot, image

    DX11 SET COMPUTE SHADER CBUFFER : DX11 SET COMPUTE SHADER CBUFFER shader, slot, cbuffer

    DX11 SET COMPUTE SHADER SAMPLER STATE : DX11 SET COMPUTE SHADER SAMPLER STATE shader, slot, cbuffer

    DX11 DISPATCH COMPUTE SHADER : DX11 DISPATCH COMPUTE SHADER shader, threadGroupCountX, threadGroupCountY, [threadGroupCountZ]

    DX11 DISPATCH COMPUTE SHADER INDIRECT : DX11 DISPATCH COMPUTE SHADER INDIRECT shader, indirectArgumentBuffer, [byteOffset]