D1170: Invalid Flags With Dynamic Texture Bitmap

D2D1_MAP_OPTIONS_WRITE | D2D1_MAP_OPTIONS_DISCARD is required when mapping bitmap created from a dynamic texture.

 

Possible Causes

Direct2D may output this message if an application calls ID2D1Bitmap1::Map with a texture whose underlying Direct3D resource is attributed with D3D11_USAGE_DYNAMIC, but did not specify both D2D1_MAP_OPTIONS_WRITE and D2D1_MAP_OPTIONS_DISCARD flags.

Possible Fixes

If an application requires access to a bitmap using ID2D1Bitmap1::Map and its underlying Direct3D resource is attributed with D3D11_USAGE_DYNAMIC, specify both D2D1_MAP_OPTIONS_WRITE and D2D1_MAP_OPTIONS_DISCARD flags. See D2D1_MAP_OPTIONS for a description of map options.