public class AMDBusAddressableMemory
extends java.lang.Object
This extension defines an API that allows improved control of the physical memory used by the graphics device.
It allows to share a memory allocated by the Graphics driver to be used by other device on the bus by exposing a write-only bus address. One example of application would be a video capture device which would DMA into the GPU memory.
It also offers the reverse operation of specifying a buffer allocated on another device to be used for write access by the GPU.
| Modifier and Type | Field and Description |
|---|---|
static int |
CL_COMMAND_MAKE_BUFFERS_RESIDENT_AMD
New command types for the events returned by the amd_bus_addressable_memory functions.
|
static int |
CL_COMMAND_WAIT_SIGNAL_AMD
New command types for the events returned by the amd_bus_addressable_memory functions.
|
static int |
CL_COMMAND_WRITE_SIGNAL_AMD
New command types for the events returned by the amd_bus_addressable_memory functions.
|
static int |
CL_MEM_BUS_ADDRESSABLE_AMD
Accepted by the
flags parameter of CreateBuffer. |
static int |
CL_MEM_EXTERNAL_PHYSICAL_AMD
Accepted by the
flags parameter of CreateBuffer. |
| Modifier and Type | Method and Description |
|---|---|
static int |
clEnqueueMakeBuffersResidentAMD(long command_queue,
org.lwjgl.PointerBuffer mem_objects,
boolean blocking_make_resident,
CLBusAddressAMD.Buffer bus_addresses,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
The application requires the bus address in order to access the buffers from a remote device.
|
static int |
clEnqueueWaitSignalAMD(long command_queue,
long mem_object,
int value,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
Instructs the OpenCL to wait until
value is written to buffer before issuing the next command. |
static int |
clEnqueueWriteSignalAMD(long command_queue,
long mem_object,
int value,
long offset,
org.lwjgl.PointerBuffer event_wait_list,
org.lwjgl.PointerBuffer event)
This command instructs the OpenCL to write
value to the signal address + offset of buffer (which must be a buffer created with
MEM_EXTERNAL_PHYSICAL_AMD). |
static int |
nclEnqueueMakeBuffersResidentAMD(long command_queue,
int num_mem_objs,
long mem_objects,
int blocking_make_resident,
long bus_addresses,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueMakeBuffersResidentAMD |
static int |
nclEnqueueWaitSignalAMD(long command_queue,
long mem_object,
int value,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueWaitSignalAMD |
static int |
nclEnqueueWriteSignalAMD(long command_queue,
long mem_object,
int value,
long offset,
int num_events_in_wait_list,
long event_wait_list,
long event)
Unsafe version of:
EnqueueWriteSignalAMD |
public static final int CL_MEM_BUS_ADDRESSABLE_AMD
flags parameter of CreateBuffer.
This flag specifies that the application wants the OpenCL implementation to create a buffer that can be accessed by remote device DMA.
MEM_BUS_ADDRESSABLE_AMD, MEM_ALLOC_HOST_PTR and MEM_USE_HOST_PTR are mutually exclusive.
public static final int CL_MEM_EXTERNAL_PHYSICAL_AMD
flags parameter of CreateBuffer.
This flag specifies that the application wants the OpenCL implementation to create a buffer from an already allocated memory on remote device.
MEM_EXTERNAL_PHYSICAL_AMD, MEM_ALLOC_HOST_PTR, MEM_COPY_HOST_PTR and MEM_USE_HOST_PTR are mutually exclusive.
MEM_EXTERNAL_PHYSICAL_AMD, MEM_READ_WRITE and MEM_READ_ONLY are mutually exclusive.
public static final int CL_COMMAND_WAIT_SIGNAL_AMD
public static final int CL_COMMAND_WRITE_SIGNAL_AMD
public static final int CL_COMMAND_MAKE_BUFFERS_RESIDENT_AMD
public static int nclEnqueueWaitSignalAMD(long command_queue,
long mem_object,
int value,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueWaitSignalAMDnum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueWaitSignalAMD(long command_queue,
long mem_object,
int value,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
value is written to buffer before issuing the next command.command_queue - a command-queuemem_object - a memory objectvalue - the signal valueevent_wait_list - a list of events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command
does not wait on any event to complete. The events specified in event_wait_list act as synchronization points. The context associated with events in
event_wait_list and command_queue must be the same.event - Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.
event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to
complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the
event_wait_list array.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_MEM_OBJECT is generated if the buffer parameter of clEnqueueWaitSignalAMD is not a valid buffer.INVALID_COMMAND_QUEUE is generated if the command_queue parameter of clEnqueueWaitSignalAMD is not a valid command queue.INVALID_MEM_OBJECT is generated if the buffer parameter of clEnqueueWaitSignalAMD does not represent a buffer allocated with
MEM_BUS_ADDRESSABLE_AMD.INVALID_VALUE is generated if the signal address used by clEnqueueWaitSignalAMD of bufffer is invalid (for example 0).public static int nclEnqueueWriteSignalAMD(long command_queue,
long mem_object,
int value,
long offset,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueWriteSignalAMDnum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueWriteSignalAMD(long command_queue,
long mem_object,
int value,
long offset,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
value to the signal address + offset of buffer (which must be a buffer created with
MEM_EXTERNAL_PHYSICAL_AMD). This should be done after a write operation by the device into that buffer is complete. Consecutive marker values must
keep increasing.command_queue - a command-queuemem_object - a memory objectvalue - the signal valueoffset - the write offsetevent_wait_list - a list of events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command
does not wait on any event to complete. The events specified in event_wait_list act as synchronization points. The context associated with events in
event_wait_list and command_queue must be the same.event - Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.
event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to
complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the
event_wait_list array.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_MEM_OBJECT is generated if the buffer parameter of clEnqueueWriteSignalAMD is not a valid buffer.INVALID_COMMAND_QUEUE is generated if the command_queue parameter of clEnqueueWriteSignalAMD is not a valid command queue.INVALID_MEM_OBJECT is generated if the buffer parameter of clEnqueueWriteSignalAMD does not represent a buffer defined as
MEM_EXTERNAL_PHYSICAL_AMD.INVALID_BUFFER_SIZE is generated if the offset parameter of clEnqueueWriteSignalAMD would lead to a write beyond the size of
buffer.INVALID_VALUE is generated if the signal address used by clEnqueueWriteSignalAMD of bufffer is invalid (for example 0).public static int nclEnqueueMakeBuffersResidentAMD(long command_queue,
int num_mem_objs,
long mem_objects,
int blocking_make_resident,
long bus_addresses,
int num_events_in_wait_list,
long event_wait_list,
long event)
EnqueueMakeBuffersResidentAMDnum_mem_objs - the number of memory objects in mem_objectsnum_events_in_wait_list - the number of events in event_wait_listpublic static int clEnqueueMakeBuffersResidentAMD(long command_queue,
org.lwjgl.PointerBuffer mem_objects,
boolean blocking_make_resident,
CLBusAddressAMD.Buffer bus_addresses,
@Nullable
org.lwjgl.PointerBuffer event_wait_list,
@Nullable
org.lwjgl.PointerBuffer event)
This function is used to make buffers resident.
command_queue - a command-queuemem_objects - a pointer to a list of memory objects created with MEM_BUS_ADDRESSABLE_AMD flagblocking_make_resident - indicates if read operation is blocking or non-blockingbus_addresses - a pointer to a list of CLBusAddressAMD structuresevent_wait_list - a list of events that need to complete before this particular command can be executed. If event_wait_list is NULL, then this particular command
does not wait on any event to complete. The events specified in event_wait_list act as synchronization points. The context associated with events in
event_wait_list and command_queue must be the same.event - Returns an event object that identifies this particular command and can be used to query or queue a wait for this particular command to complete.
event can be NULL in which case it will not be possible for the application to query the status of this command or queue a wait for this command to
complete. If the event_wait_list and the event arguments are not NULL, the event argument should not refer to an element of the
event_wait_list array.SUCCESS if the function is executed successfully. Otherwise, it returns one of the following errors:
INVALID_OPERATION is generated if any of the pointer parameters of clEnqueueMakeBuffersResidentAMD are NULL (and count is > 0).INVALID_OPERATION is generated if any of the mem_objects passed to clEnqueueMakeBuffersResidentAMD was not a valid cl_mem object created with
MEM_BUS_ADDRESSABLE_AMD flag.OUT_OF_HOST_MEMORY is generated if any of the mem_objects passed to clEnqueueMakeBuffersResidentAMD could not be made resident so that the buffer
or signal bus addresses will be returned as 0.Copyright LWJGL. All Rights Reserved. License terms.