public:
void FlushGpuCacheRange(
UINT Flags,
void *pBaseAddress,
SIZE_T SizeInBytes
)
Flags
Type: UINT
[in] Flags to control the flushing. Enter zero, or a bitwise-OR’d combination of D3D11_FLUSH enumeration constants. Passing zero is the same as passing D3D11_FLUSH_DEFAULT.
pBaseAddress
Type: void *
[in] The base address of the cache. If set to NULL, all of the memory will be flushed.
SizeInBytes
Type: SIZE_T
[in] The size of the data to flush, in bytes.
In DirectX 11.x, this method uses a surface sync packet and can perform both top-of-pipe cache operations and coherency operations. You should not set the values for base address and size to zero simultaneously, because this sometimes causes the DB unit to hang. Instead, use zero for the base and 0xffffffff00 for the size. These values seem to work reasonably well. Instead of specifying 0xffffffff00, you can specify D3D11_FLUSH_GPU_CACHE_RANGE_ALL, which is defined as follows:
#define D3D11_FLUSH_GPU_CACHE_RANGE_ALL 0xFFFFFFFF00
Header: Declared in d3d11_x.h.
Library: Use d3d11_x.lib.
ID3D11DeviceContextX::WriteValueEndOfPipe
ID3D11DeviceContextX::InsertWaitOnMemory
ID3D11DeviceContextX::GpuSendPipelinedEvent