89
edits
Line 138: | Line 138: | ||
NPDeviceContext* context, | NPDeviceContext* context, | ||
int32 state, | int32 state, | ||
intptr_t *value); | |||
typedef NPError (*NPDeviceSetStateContextPtr)(NPP instance, | typedef NPError (*NPDeviceSetStateContextPtr)(NPP instance, | ||
NPDeviceContext* context, | NPDeviceContext* context, | ||
int32 state, | int32 state, | ||
intptr_t value); | |||
</pre> | </pre> | ||
Line 166: | Line 166: | ||
If no callback is specified, the flush becomes a blocking call. | If no callback is specified, the flush becomes a blocking call. | ||
To facilitate low latency devices, flushContext() can be invoked from non-NPAPI threads. | To facilitate low latency devices, flushContext() can be invoked from non-NPAPI threads (threads other than Tp). | ||
== Destroying a Device Context == | == Destroying a Device Context == | ||
Line 289: | Line 289: | ||
{ | { | ||
void* reserved; | void* reserved; | ||
/* If true, then a flush will only complete once the get offset has advanced | |||
* on the GPU thread. If false, then the get offset might have changed but | |||
* the GPU thread will respond as quickly as possible without guaranteeing | |||
* having made any progress in executing pending commands. Set to true | |||
* to ensure that progress is made or when flushing in a loop waiting for the | |||
* GPU to reach a certain state, for example in advancing beyond a particular | |||
* token. Set to false when flushing to query the current state, for example | |||
* whether an error has occurred. | |||
*/ | |||
bool waitForProgress; | |||
/* Buffer in which commands are stored. */ | /* Buffer in which commands are stored. */ | ||
void* commandBuffer; | void* commandBuffer; | ||
int32 | int32 commandBufferSize; | ||
/* Offset in command buffer reader has reached. Synchronized on flush. */ | /* Offset in command buffer reader has reached. Synchronized on flush. */ | ||
Line 299: | Line 310: | ||
/* Offset in command buffer writer has reached. Synchronized on flush. */ | /* Offset in command buffer writer has reached. Synchronized on flush. */ | ||
int32 putOffset; | int32 putOffset; | ||
/* Last processed token. Synchronized on flush. */ | |||
int32 token; | |||
/* Error status. Synchronized on flush. */ | |||
NPDeviceContext3DError error; | |||
} NPDeviceContext3D;</pre> | } NPDeviceContext3D;</pre> | ||
edits