ID2D1ComputeTransform::CalculateThreadgroups method

This method allows a compute-shader–based transform to select the number of thread groups to execute based on the number of output pixels it needs to fill.

Syntax


HRESULT CalculateThreadgroups(
  [in]   const D2D1_RECT_L *outputRect,
  [out]  UINT32 *dimensionX,
  [out]  UINT32 *dimensionY,
  [out]  UINT32 *dimensionZ
);

Parameters

outputRect [in]

Type: const D2D1_RECT_L*

The output rectangle that will be filled by the compute transform.

dimensionX [out]

Type: UINT32*

The number of threads in the x dimension.

dimensionY [out]

Type: UINT32*

The number of threads in the y dimension.

dimensionZ [out]

Type: UINT32*

The number of threads in the z dimension.

Return value

Type: HRESULT

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

If this call fails, the corresponding ID2D1Effect instance is placed into an error state and fails to draw.

Requirements

Minimum supported client

Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1effectauthor.h

Library

D2d1.lib

See also

ID2D1ComputeTransform
ID2D1EffectContext::LoadComputeShader

 

 

Community Additions

ADD
Show:
© 2014 Microsoft